diff options
author | royger <royger@FreeBSD.org> | 2014-08-04 08:42:29 +0000 |
---|---|---|
committer | royger <royger@FreeBSD.org> | 2014-08-04 08:42:29 +0000 |
commit | eb7b09e785fab81b14e9ab4facb46c82d1f1b92f (patch) | |
tree | c2b2d5b8bf9dbb2e2f2d1cba1c14327943670708 /sys/xen | |
parent | f4b5494cddde52e504f6d8e2adc50ab660f543e0 (diff) | |
download | FreeBSD-src-eb7b09e785fab81b14e9ab4facb46c82d1f1b92f.zip FreeBSD-src-eb7b09e785fab81b14e9ab4facb46c82d1f1b92f.tar.gz |
xen: implement event channel PIRQ support
This allows Dom0 to manage physical hardware, redirecting the
physical interrupts to event channels.
Sponsored by: Citrix Systems R&D
x86/xen/xen_intr.c:
- Expand struct xenisrc to hold the level and triggering of PIRQ
event channels.
- Implement missing methods in xen_intr_pirq_pic.
- Allow xen_intr_alloc_isrc to take a vector parameter that globally
identifies the interrupt. This is only used for PIRQs that are
bound to a specific hardware IRQ.
- Introduce xen_register_pirq used to register IO APIC legacy PIRQ
interrupts.
- Add support for the dynamic PIRQ EOI map, this shared memory is
modified by Xen (if it suppoorts that feature), and notifies the
guest if an EOI is needed or not. If it's not available fall back
to the old implementation using PHYSDEVOP_irq_status_query.
- Rename xen_intr_isrc_count to xen_intr_auto_vector_count and
replace it's usages.
- Align static variables by name.
xen/xen_intr.h:
- Add prototype for xen_register_pirq.
Diffstat (limited to 'sys/xen')
-rw-r--r-- | sys/xen/xen_intr.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/xen/xen_intr.h b/sys/xen/xen_intr.h index 3b339a5..a1ff666 100644 --- a/sys/xen/xen_intr.h +++ b/sys/xen/xen_intr.h @@ -159,6 +159,18 @@ int xen_intr_alloc_and_bind_ipi(device_t dev, u_int cpu, xen_intr_handle_t *handlep); /** + * Register a physical interrupt vector and setup the interrupt source. + * + * \param vector The global vector to use. + * \param trig Default trigger method. + * \param pol Default polarity of the interrupt. + * + * \returns 0 on success, otherwise an errno. + */ +int xen_register_pirq(int vector, enum intr_trigger trig, + enum intr_polarity pol); + +/** * Unbind an interrupt handler from its interrupt source. * * \param handlep A pointer to the opaque handle that was initialized |