diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-04-01 09:56:42 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-04-01 09:56:42 +0100 |
commit | 4852301b178fe472fda4ad4ac508485a077410ba (patch) | |
tree | 9fc0fd368dc146dcc92c767d11fd1617f14f12fb | |
parent | 2cfc9e78a7bacef719fb2421343b0bb239ce7702 (diff) | |
download | xen-4852301b178fe472fda4ad4ac508485a077410ba.tar.gz xen-4852301b178fe472fda4ad4ac508485a077410ba.tar.bz2 xen-4852301b178fe472fda4ad4ac508485a077410ba.zip |
Allow all unused GSI to be configured via IO-APIC by new pv_ops dom0
Currently Xen disallows setting up any GSI < 16. This makes it
impossible by the kernel to use any PCI devices without ACPI override
but a mapping to this interrupts via IO-APIC.
The patch allows all unused interrupts to be setup via IO-APIC.
Signed-off-by: Bastian Blank <waldi@debian.org>
xen-unstable changeset: 21092:537451477469
xen-unstable date: Thu Apr 01 09:55:27 2010 +0100
-rw-r--r-- | xen/arch/x86/mpparse.c | 4 | ||||
-rw-r--r-- | xen/arch/x86/physdev.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c index 1917862cd3..95aff543f2 100644 --- a/xen/arch/x86/mpparse.c +++ b/xen/arch/x86/mpparse.c @@ -1103,6 +1103,7 @@ int mp_register_gsi (u32 gsi, int triggering, int polarity) int ioapic = -1; int ioapic_pin = 0; int idx, bit = 0; + /* * Mapping between Global System Interrups, which * represent all possible interrupts, and IRQs @@ -1126,6 +1127,9 @@ int mp_register_gsi (u32 gsi, int triggering, int polarity) if (ioapic_renumber_irq) gsi = ioapic_renumber_irq(ioapic, gsi); + if (!(irq_to_desc(gsi)->status & IRQ_DISABLED)) + return -EEXIST; + /* * Avoid pin reprogramming. PRTs typically include entries * with redundant pin->gsi mappings (but unique PCI devices); diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c index b0d777a6e8..baaff24ba2 100644 --- a/xen/arch/x86/physdev.c +++ b/xen/arch/x86/physdev.c @@ -476,12 +476,8 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE(void) arg) ret = -EINVAL; if ( setup_gsi.gsi < 0 || setup_gsi.gsi >= nr_irqs_gsi ) break; - /* GSI < 16 has been setup by hypervisor */ - if ( setup_gsi.gsi >= 16 ) - ret = mp_register_gsi(setup_gsi.gsi, setup_gsi.triggering, - setup_gsi.polarity); - else - ret = -EEXIST; + ret = mp_register_gsi(setup_gsi.gsi, setup_gsi.triggering, + setup_gsi.polarity); break; } default: |