Skip to contentSkip to conversation

Allow all unused GSI to be configured via IO-APIC

PATCH New Bastian Blank 1 participant 1 message Mar 24, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow all unused GSI to be configured via IO-APIC

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.

xen/arch/x86/mpparse.c +4 -0
diff -r 7b63f677f245 xen/arch/x86/mpparse.c
@@ -1103,6 +1103,7 @@
 	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 @@
 	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);
xen/arch/x86/physdev.c +1 -5
diff -r 7b63f677f245 xen/arch/x86/physdev.c
@@ -476,12 +476,8 @@
         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,
+        ret = mp_register_gsi(setup_gsi.gsi, setup_gsi.triggering,
                             setup_gsi.polarity);
-        else 
-            ret = -EEXIST;
         break; 
     }
     default:
Signature · 1 line
Hailing frequencies open, Captain.