]> xenbits.xensource.com Git - xen.git/commitdiff
IO-APIC: Prevent using EOI broadcast suppression if user specified
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 7 Mar 2012 10:54:11 +0000 (10:54 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 7 Mar 2012 10:54:11 +0000 (10:54 +0000)
ioapic_ack=new on the command line.

Currently, if EOI broadcast suppression is advertised on the BSP
LAPIC, Xen will discard any user specified option regarding IO-APIC
ack mode.

This patch introduces a check which prevents EOI Broadcast suppression
from forcing the IO-APIC ack mode to old if the user has explicitly
asked for the new ack mode on the command line.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   24870:9bf3ec036bef
xen-unstable date:        Thu Feb 23 09:58:47 2012 +0000

xen/arch/x86/apic.c
xen/arch/x86/io_apic.c
xen/include/asm-x86/io_apic.h

index 9bbf1540ae6b69c3a153e1c9c7892979ec5c09cb..2845d23b0191678c14e40b429b05dde0d506279a 100644 (file)
@@ -437,9 +437,15 @@ int __init verify_local_APIC(void)
      */
     if ( reg0 & APIC_LVR_DIRECTED_EOI )
     {
-        ioapic_ack_new = 0;
-        directed_eoi_enabled = 1;
-        printk("Enabled directed EOI with ioapic_ack_old on!\n");
+        if ( ioapic_ack_new == 1 && ioapic_ack_forced == 1 )
+            printk("Not enabling directed EOI because ioapic_ack_new has been "
+                   "forced on the command line\n");
+        else
+        {
+            ioapic_ack_new = 0;
+            directed_eoi_enabled = 1;
+            printk("Enabled directed EOI with ioapic_ack_old on!\n");
+        }
     }
 
     /*
index c09657b7f2114cf5c0e004b5f085a06fbaec05c6..b22c3936c85306c1bd4cba1b4a2b7b930fc22bee 100644 (file)
@@ -44,6 +44,7 @@ static struct { int pin, apic; } ioapic_i8259 = { -1, -1 };
 static DEFINE_SPINLOCK(ioapic_lock);
 
 bool_t __read_mostly skip_ioapic_setup;
+bool_t __read_mostly ioapic_ack_forced = 0;
 
 #ifndef sis_apic_bug
 /*
@@ -1610,9 +1611,15 @@ int __read_mostly ioapic_ack_new = 1;
 static void setup_ioapic_ack(char *s)
 {
     if ( !strcmp(s, "old") )
+    {
         ioapic_ack_new = 0;
+        ioapic_ack_forced = 1;
+    }
     else if ( !strcmp(s, "new") )
+    {
         ioapic_ack_new = 1;
+        ioapic_ack_forced = 1;
+    }
     else
         printk("Unknown ioapic_ack value specified: '%s'\n", s);
 }
index 14c95dd6c8e515fb2ace9d1ba5045547ec9ce0af..1b42f85d8ff93755224314a3548d9f9b2c513549 100644 (file)
@@ -179,6 +179,7 @@ static inline void io_apic_modify(unsigned int apic, unsigned int reg, unsigned
 
 /* 1 if "noapic" boot option passed */
 extern bool_t skip_ioapic_setup;
+extern bool_t ioapic_ack_forced;
 
 #ifdef CONFIG_ACPI_BOOT
 extern int io_apic_get_unique_id (int ioapic, int apic_id);