[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 1/4] x86/apic: Disable the LAPIC later in smp_send_stop()
__stop_this_cpu() may reset the LAPIC mode back from x2apic to xapic, but will leave x2apic_enabled alone. This may cause disconnect_bsp_APIC() in disable_IO_APIC() to suffer a #GP fault. Disabling the LAPIC can safely be deferred to being the last action. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CC: Jan Beulich <JBeulich@xxxxxxxx> --- I still think that x2apic_enabled is not appropriate an appropriate predicate for apic_read/write() to use. Currently LAPIC mode is inherently a per-pcpu properly rather than a global properly, and can result in all kinds of fun depending on the exact nature of the crash. In this example, had the original crash attempt got further before reentering, x2apic_enabled would have already changed, and smp_call_function() higher would have failed to IPI the other cpus (by trying to drive the LAPIC in xapic mode when it was actually in x2apic mode). --- xen/arch/x86/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/smp.c b/xen/arch/x86/smp.c index 06a833e..8caa0bc 100644 --- a/xen/arch/x86/smp.c +++ b/xen/arch/x86/smp.c @@ -311,9 +311,9 @@ void smp_send_stop(void) mdelay(1); local_irq_disable(); - __stop_this_cpu(); disable_IO_APIC(); hpet_disable(); + __stop_this_cpu(); local_irq_enable(); } -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |