xcp-1.6-updates/xen-4.1.hg

changeset 23258:dc7fc50b3594

IO-APIC: Prevent using EOI broadcast suppression if user specified
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
author Andrew Cooper <andrew.cooper3@citrix.com>
date Wed Mar 07 10:54:11 2012 +0000 (2012-03-07)
parents bcf1250a14e8
children ed5c1ad51a23
files xen/arch/x86/apic.c xen/arch/x86/io_apic.c xen/include/asm-x86/io_apic.h
line diff
     1.1 --- a/xen/arch/x86/apic.c	Wed Mar 07 09:39:45 2012 +0000
     1.2 +++ b/xen/arch/x86/apic.c	Wed Mar 07 10:54:11 2012 +0000
     1.3 @@ -437,9 +437,15 @@ int __init verify_local_APIC(void)
     1.4       */
     1.5      if ( reg0 & APIC_LVR_DIRECTED_EOI )
     1.6      {
     1.7 -        ioapic_ack_new = 0;
     1.8 -        directed_eoi_enabled = 1;
     1.9 -        printk("Enabled directed EOI with ioapic_ack_old on!\n");
    1.10 +        if ( ioapic_ack_new == 1 && ioapic_ack_forced == 1 )
    1.11 +            printk("Not enabling directed EOI because ioapic_ack_new has been "
    1.12 +                   "forced on the command line\n");
    1.13 +        else
    1.14 +        {
    1.15 +            ioapic_ack_new = 0;
    1.16 +            directed_eoi_enabled = 1;
    1.17 +            printk("Enabled directed EOI with ioapic_ack_old on!\n");
    1.18 +        }
    1.19      }
    1.20  
    1.21      /*
     2.1 --- a/xen/arch/x86/io_apic.c	Wed Mar 07 09:39:45 2012 +0000
     2.2 +++ b/xen/arch/x86/io_apic.c	Wed Mar 07 10:54:11 2012 +0000
     2.3 @@ -44,6 +44,7 @@ static struct { int pin, apic; } ioapic_
     2.4  static DEFINE_SPINLOCK(ioapic_lock);
     2.5  
     2.6  bool_t __read_mostly skip_ioapic_setup;
     2.7 +bool_t __read_mostly ioapic_ack_forced = 0;
     2.8  
     2.9  #ifndef sis_apic_bug
    2.10  /*
    2.11 @@ -1610,9 +1611,15 @@ int __read_mostly ioapic_ack_new = 1;
    2.12  static void setup_ioapic_ack(char *s)
    2.13  {
    2.14      if ( !strcmp(s, "old") )
    2.15 +    {
    2.16          ioapic_ack_new = 0;
    2.17 +        ioapic_ack_forced = 1;
    2.18 +    }
    2.19      else if ( !strcmp(s, "new") )
    2.20 +    {
    2.21          ioapic_ack_new = 1;
    2.22 +        ioapic_ack_forced = 1;
    2.23 +    }
    2.24      else
    2.25          printk("Unknown ioapic_ack value specified: '%s'\n", s);
    2.26  }
     3.1 --- a/xen/include/asm-x86/io_apic.h	Wed Mar 07 09:39:45 2012 +0000
     3.2 +++ b/xen/include/asm-x86/io_apic.h	Wed Mar 07 10:54:11 2012 +0000
     3.3 @@ -179,6 +179,7 @@ static inline void io_apic_modify(unsign
     3.4  
     3.5  /* 1 if "noapic" boot option passed */
     3.6  extern bool_t skip_ioapic_setup;
     3.7 +extern bool_t ioapic_ack_forced;
     3.8  
     3.9  #ifdef CONFIG_ACPI_BOOT
    3.10  extern int io_apic_get_unique_id (int ioapic, int apic_id);