[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86/apic: fix potential Protection Fault during shutdown
# HG changeset patch # User Andrew Cooper <andrew.cooper3@xxxxxxxxxx> # Date 1308052065 -3600 # Node ID 0feb98534a87b9eab6c3ac94f078fa8efbfad9e0 # Parent 450f1d198e1e299b69489d513f591f0301cc5166 x86/apic: fix potential Protection Fault during shutdown This is a rare case, but if the BIOS is set to uniprocessor, and Xen is booted with 'lapic x2apic', Xen will switch into x2apic mode, which will cause a protection fault when disabling the local APIC. This leads to a general protection fault as this code is also in the fault handler. When x2apic mode is enabled, the only tranlsation which does not result in a protection fault is to clear both the EN and EXTD bits, which is safe to do in all cases, even if you are in xapic mode rather than x2apic mode. The linux code from which this is derrived is protected by an if ( ! x2apic_mode ...) clause which is how they get away with it. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxxxx> --- diff -r 450f1d198e1e -r 0feb98534a87 xen/arch/x86/apic.c --- a/xen/arch/x86/apic.c Tue Jun 14 12:46:29 2011 +0100 +++ b/xen/arch/x86/apic.c Tue Jun 14 12:47:45 2011 +0100 @@ -340,7 +340,8 @@ if (enabled_via_apicbase) { uint64_t msr_content; rdmsrl(MSR_IA32_APICBASE, msr_content); - wrmsrl(MSR_IA32_APICBASE, msr_content & ~MSR_IA32_APICBASE_ENABLE); + wrmsrl(MSR_IA32_APICBASE, msr_content & + ~(MSR_IA32_APICBASE_ENABLE|MSR_IA32_APICBASE_EXTD)); } } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |