From d639bdd9bbed8d003ad9be0b13535aca636b9d18 Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Wed, 3 Jun 2015 09:25:43 +0200 Subject: [PATCH] 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 --- 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 06a833e314..8caa0bce33 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(); } -- 2.39.5