]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
x86/apic: Disable the LAPIC later in smp_send_stop()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 3 Jun 2015 07:25:43 +0000 (09:25 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 3 Jun 2015 07:25:43 +0000 (09:25 +0200)
__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@citrix.com>
xen/arch/x86/smp.c

index 06a833e3145eab738666d0c8dd50b94b93de1c0f..8caa0bce3383fc1da87cef548ad23e29b18a88da 100644 (file)
@@ -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();
 }