diff options
author | David Vrabel <david.vrabel@citrix.com> | 2013-03-15 06:55:41 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2014-01-06 10:07:52 -0500 |
commit | bf2bbe07f13846a90d4447521d87566d6f87bc0e (patch) | |
tree | 930d312f8d74a5892fb37429969de6016cc3eb6a /drivers/xen/events | |
parent | 0dc0064add422bc0ef5165ebe9ece3052bbd457d (diff) |
xen/events: Add the hypervisor interface for the FIFO-based event channels
Add the hypercall sub-ops and the structures for the shared data used
in the FIFO-based event channel ABI.
The design document for this new ABI is available here:
http://xenbits.xen.org/people/dvrabel/event-channels-H.pdf
In summary, events are reported using a per-domain shared event array
of event words. Each event word has PENDING, LINKED and MASKED bits
and a LINK field for pointing to the next event in the event queue.
There are 16 event queues (with different priorities) per-VCPU.
Key advantages of this new ABI include:
- Support for over 100,000 events (2^17).
- 16 different event priorities.
- Improved fairness in event latency through the use of FIFOs.
The ABI is available in Xen 4.4 and later.
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>
Diffstat (limited to 'drivers/xen/events')
-rw-r--r-- | drivers/xen/events/events_2l.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/xen/events/events_2l.c b/drivers/xen/events/events_2l.c index ecb402a149e3..d7ff91757307 100644 --- a/drivers/xen/events/events_2l.c +++ b/drivers/xen/events/events_2l.c | |||
@@ -38,12 +38,12 @@ | |||
38 | /* Find the first set bit in a evtchn mask */ | 38 | /* Find the first set bit in a evtchn mask */ |
39 | #define EVTCHN_FIRST_BIT(w) find_first_bit(BM(&(w)), BITS_PER_EVTCHN_WORD) | 39 | #define EVTCHN_FIRST_BIT(w) find_first_bit(BM(&(w)), BITS_PER_EVTCHN_WORD) |
40 | 40 | ||
41 | static DEFINE_PER_CPU(xen_ulong_t [NR_EVENT_CHANNELS/BITS_PER_EVTCHN_WORD], | 41 | static DEFINE_PER_CPU(xen_ulong_t [EVTCHN_2L_NR_CHANNELS/BITS_PER_EVTCHN_WORD], |
42 | cpu_evtchn_mask); | 42 | cpu_evtchn_mask); |
43 | 43 | ||
44 | static unsigned evtchn_2l_max_channels(void) | 44 | static unsigned evtchn_2l_max_channels(void) |
45 | { | 45 | { |
46 | return NR_EVENT_CHANNELS; | 46 | return EVTCHN_2L_NR_CHANNELS; |
47 | } | 47 | } |
48 | 48 | ||
49 | static void evtchn_2l_bind_to_cpu(struct irq_info *info, unsigned cpu) | 49 | static void evtchn_2l_bind_to_cpu(struct irq_info *info, unsigned cpu) |
@@ -316,7 +316,7 @@ irqreturn_t xen_debug_interrupt(int irq, void *dev_id) | |||
316 | i % 8 == 0 ? "\n " : " "); | 316 | i % 8 == 0 ? "\n " : " "); |
317 | 317 | ||
318 | printk("\nlocal cpu%d mask:\n ", cpu); | 318 | printk("\nlocal cpu%d mask:\n ", cpu); |
319 | for (i = (NR_EVENT_CHANNELS/BITS_PER_EVTCHN_WORD)-1; i >= 0; i--) | 319 | for (i = (EVTCHN_2L_NR_CHANNELS/BITS_PER_EVTCHN_WORD)-1; i >= 0; i--) |
320 | printk("%0*"PRI_xen_ulong"%s", (int)(sizeof(cpu_evtchn[0])*2), | 320 | printk("%0*"PRI_xen_ulong"%s", (int)(sizeof(cpu_evtchn[0])*2), |
321 | cpu_evtchn[i], | 321 | cpu_evtchn[i], |
322 | i % 8 == 0 ? "\n " : " "); | 322 | i % 8 == 0 ? "\n " : " "); |
@@ -332,7 +332,7 @@ irqreturn_t xen_debug_interrupt(int irq, void *dev_id) | |||
332 | } | 332 | } |
333 | 333 | ||
334 | printk("\npending list:\n"); | 334 | printk("\npending list:\n"); |
335 | for (i = 0; i < NR_EVENT_CHANNELS; i++) { | 335 | for (i = 0; i < EVTCHN_2L_NR_CHANNELS; i++) { |
336 | if (sync_test_bit(i, BM(sh->evtchn_pending))) { | 336 | if (sync_test_bit(i, BM(sh->evtchn_pending))) { |
337 | int word_idx = i / BITS_PER_EVTCHN_WORD; | 337 | int word_idx = i / BITS_PER_EVTCHN_WORD; |
338 | printk(" %d: event %d -> irq %d%s%s%s\n", | 338 | printk(" %d: event %d -> irq %d%s%s%s\n", |