aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Cooper <andrew.cooper3@citrix.com>2011-08-19 10:00:25 +0100
committerAndrew Cooper <andrew.cooper3@citrix.com>2011-08-19 10:00:25 +0100
commite8685728a2aa87c2b236908ff5276338af353179 (patch)
tree034da2fcb8359a37e25b7c0d3e1d20a5676aa0a2
parent0258b9db5465123fbcd40e5efa846de1f4a07338 (diff)
downloadxen-e8685728a2aa87c2b236908ff5276338af353179.tar.gz
xen-e8685728a2aa87c2b236908ff5276338af353179.tar.bz2
xen-e8685728a2aa87c2b236908ff5276338af353179.zip
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@citrix.com> xen-unstable changeset: 23776:0ddb4481f883 xen-unstable date: Fri Aug 19 09:58:22 2011 +0100
-rw-r--r--xen/arch/x86/crash.c4
-rw-r--r--xen/arch/x86/machine_kexec.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/xen/arch/x86/crash.c b/xen/arch/x86/crash.c
index 392c8d2395..2636950dbc 100644
--- a/xen/arch/x86/crash.c
+++ b/xen/arch/x86/crash.c
@@ -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 @@ static void nmi_shootdown_cpus(void)
local_irq_disable();
+ if ( hpet_broadcast_is_available() )
+ hpet_disable_legacy_broadcast();
+
crashing_cpu = smp_processor_id();
local_irq_count(crashing_cpu) = 0;
diff --git a/xen/arch/x86/machine_kexec.c b/xen/arch/x86/machine_kexec.c
index 592d82aebc..a352d04010 100644
--- a/xen/arch/x86/machine_kexec.c
+++ b/xen/arch/x86/machine_kexec.c
@@ -96,9 +96,6 @@ void machine_kexec(xen_kexec_image_t *image)
.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.
*/