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/xen | |
parent | d8e0420603cf1ce9cb459c00ea0b7337de41b968 (diff) | |
download | kernel_samsung_espresso10-d46a78b05c0e37f76ddf4a7a67bf0b6c68bada55.zip kernel_samsung_espresso10-d46a78b05c0e37f76ddf4a7a67bf0b6c68bada55.tar.gz kernel_samsung_espresso10-d46a78b05c0e37f76ddf4a7a67bf0b6c68bada55.tar.bz2 |
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/xen')
-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 a15d932..8f62320 100644 --- a/include/xen/events.h +++ b/include/xen/events.h @@ -63,4 +63,15 @@ int xen_set_callback_via(uint64_t via); void xen_evtchn_do_upcall(struct pt_regs *regs); void xen_hvm_evtchn_do_upcall(void); +/* Allocate an irq for a physical interrupt, given a gsi. "Legacy" + * GSIs are identity mapped; others are dynamically allocated as + * usual. */ +int xen_allocate_pirq(unsigned gsi); + +/* Return vector allocated to pirq */ +int xen_vector_from_irq(unsigned pirq); + +/* Return gsi allocated to pirq */ +int xen_gsi_from_irq(unsigned pirq); + #endif /* _XEN_EVENTS_H */ |