[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86/KEXEC: disable hpet legacy broadcasts earlier

# HG changeset patch
# User Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
# Date 1313744302 -3600
# Node ID 0ddb4481f883ddf55c12a0b8d1445cf137ef0b63
# Parent  9957bef3e7b4511f83ed8883cd5ecd49ea3ee95d
x86/KEXEC: disable hpet legacy broadcasts earlier

On x2apic machines which booted in xapic mode,
hpet_disable_legacy_broadcast() sends an event check IPI to all online
processors.  This leads to a protection fault as the genapic blindly
pokes x2apic MSRs while the local apic is in xapic mode.

One option is to change genapic when we shut down the local apic, but
there are still problems with trying to IPI processors in the online
processor map which are actually sitting in NMI loops

Another option is to have each CPU take itself out of the online CPU
map during the NMI shootdown.

Realistically however, disabling hpet legacy broadcasts earlier in the
kexec path is the easiest fix to the problem.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

diff -r 9957bef3e7b4 -r 0ddb4481f883 xen/arch/x86/crash.c
--- a/xen/arch/x86/crash.c      Fri Aug 19 09:57:42 2011 +0100
+++ b/xen/arch/x86/crash.c      Fri Aug 19 09:58:22 2011 +0100
@@ -29,6 +29,7 @@
 #include <asm/io_apic.h>
 #include <xen/iommu.h>
 #include <xen/pci.h>
+#include <asm/hpet.h>
 static atomic_t waiting_for_crash_ipi;
 static unsigned int crashing_cpu;
@@ -61,6 +62,9 @@
+    if ( hpet_broadcast_is_available() )
+        hpet_disable_legacy_broadcast();
     crashing_cpu = smp_processor_id();
     local_irq_count(crashing_cpu) = 0;
diff -r 9957bef3e7b4 -r 0ddb4481f883 xen/arch/x86/machine_kexec.c
--- a/xen/arch/x86/machine_kexec.c      Fri Aug 19 09:57:42 2011 +0100
+++ b/xen/arch/x86/machine_kexec.c      Fri Aug 19 09:58:22 2011 +0100
@@ -85,9 +85,6 @@
         .limit = LAST_RESERVED_GDT_BYTE
-    if ( hpet_broadcast_is_available() )
-        hpet_disable_legacy_broadcast();
     /* We are about to permenantly jump out of the Xen context into the kexec
      * purgatory code.  We really dont want to be still servicing interupts.

Xen-changelog mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.