]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
IO-APIC: Prevent using EOI broadcast suppression if user specified ioapic_ack=new...
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 23 Feb 2012 09:58:47 +0000 (09:58 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 23 Feb 2012 09:58:47 +0000 (09:58 +0000)
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/arch/x86/apic.c
xen/arch/x86/io_apic.c
xen/include/asm-x86/io_apic.h

index f3f1781880174e9333b4f5534f805beae79d026d..42802b43c02efd7c2fd13ca3139a124a6c1a7205 100644 (file)
@@ -424,9 +424,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 1c8334924a2239adbbc5ade2b229e86530f13718..31f1541aea0581cea688d0f43ae8eaa96c1b09fd 100644 (file)
@@ -44,6 +44,7 @@ static DEFINE_SPINLOCK(ioapic_lock);
 
 bool_t __read_mostly skip_ioapic_setup;
 bool_t __read_mostly ioapic_ack_new = 1;
+bool_t __read_mostly ioapic_ack_forced = 0;
 
 #ifndef sis_apic_bug
 /*
@@ -1543,9 +1544,15 @@ static unsigned int startup_level_ioapic_irq(struct irq_desc *desc)
 static void __init 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 a6d16f6c257e1d7aaeb65e6f81d4b133806c3b14..cee283ebe7d45ee101cc84c6a70f392d5dde5445 100644 (file)
@@ -180,6 +180,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_new;
+extern bool_t ioapic_ack_forced;
 
 #ifdef CONFIG_ACPI_BOOT
 extern int io_apic_get_unique_id (int ioapic, int apic_id);