diff options
author | Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> | 2010-10-01 12:20:09 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2010-10-18 10:40:29 -0400 |
commit | d46a78b05c0e37f76ddf4a7a67bf0b6c68bada55 (patch) | |
tree | 0cdea39b1ede2fa88c58be01457a83c39a01e6a8 /include | |
parent | d8e0420603cf1ce9cb459c00ea0b7337de41b968 (diff) |
xen: implement pirq type event channels
A privileged PV Xen domain can get direct access to hardware. In
order for this to be useful, it must be able to get hardware
interrupts.
Being a PV Xen domain, all interrupts are delivered as event channels.
PIRQ event channels are bound to a pirq number and an interrupt
vector. When a IO APIC raises a hardware interrupt on that vector, it
is delivered as an event channel, which we can deliver to the
appropriate device driver(s).
This patch simply implements the infrastructure for dealing with pirq
event channels.
[ Impact: integrate hardware interrupts into Xen's event scheme ]
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/xen/events.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/xen/events.h b/include/xen/events.h index a15d93262e30..8f6232023b75 100644 --- a/include/xen/events.h +++ b/include/xen/events.h | |||
@@ -63,4 +63,15 @@ int xen_set_callback_via(uint64_t via); | |||
63 | void xen_evtchn_do_upcall(struct pt_regs *regs); | 63 | void xen_evtchn_do_upcall(struct pt_regs *regs); |
64 | void xen_hvm_evtchn_do_upcall(void); | 64 | void xen_hvm_evtchn_do_upcall(void); |
65 | 65 | ||
66 | /* Allocate an irq for a physical interrupt, given a gsi. "Legacy" | ||
67 | * GSIs are identity mapped; others are dynamically allocated as | ||
68 | * usual. */ | ||
69 | int xen_allocate_pirq(unsigned gsi); | ||
70 | |||
71 | /* Return vector allocated to pirq */ | ||
72 | int xen_vector_from_irq(unsigned pirq); | ||
73 | |||
74 | /* Return gsi allocated to pirq */ | ||
75 | int xen_gsi_from_irq(unsigned pirq); | ||
76 | |||
66 | #endif /* _XEN_EVENTS_H */ | 77 | #endif /* _XEN_EVENTS_H */ |