Skip to content

Commit

Permalink
xen/events: use the FIFO-based ABI if available
Browse files Browse the repository at this point in the history
Implement all the event channel port ops for the FIFO-based ABI.

If the hypervisor supports the FIFO-based ABI, enable it by
initializing the control block for the boot VCPU and subsequent VCPUs
as they are brought up and on resume.  The event array is expanded as
required when event ports are setup.

The 'xen.fifo_events=0' command line option may be used to disable use
of the FIFO-based ABI.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
  • Loading branch information
David Vrabel authored and Konrad Rzeszutek Wilk committed Jan 6, 2014
1 parent 8785c67 commit 1fe5655
Show file tree
Hide file tree
Showing 4 changed files with 448 additions and 1 deletion.
1 change: 1 addition & 0 deletions drivers/xen/events/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ obj-y += events.o

events-y += events_base.o
events-y += events_2l.o
events-y += events_fifo.o
14 changes: 13 additions & 1 deletion drivers/xen/events/events_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1563,6 +1563,7 @@ void xen_irq_resume(void)

/* New event-channel space is not 'live' yet. */
xen_evtchn_mask_all();
xen_evtchn_resume();

/* No IRQ <-> event-channel mappings. */
list_for_each_entry(info, &xen_irq_list_head, list)
Expand Down Expand Up @@ -1659,9 +1660,20 @@ void xen_callback_vector(void)
void xen_callback_vector(void) {}
#endif

#undef MODULE_PARAM_PREFIX
#define MODULE_PARAM_PREFIX "xen."

static bool fifo_events = true;
module_param(fifo_events, bool, 0);

void __init xen_init_IRQ(void)
{
xen_evtchn_2l_init();
int ret = -EINVAL;

if (fifo_events)
ret = xen_evtchn_fifo_init();
if (ret < 0)
xen_evtchn_2l_init();

evtchn_to_irq = kcalloc(EVTCHN_ROW(xen_evtchn_max_channels()),
sizeof(*evtchn_to_irq), GFP_KERNEL);
Expand Down
Loading

0 comments on commit 1fe5655

Please sign in to comment.