]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commitdiff
x86/smp: perform disabling on interrupts ahead of AP shutdown
authorRoger Pau Monné <roger.pau@citrix.com>
Mon, 17 Feb 2025 12:23:50 +0000 (13:23 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 17 Feb 2025 12:23:50 +0000 (13:23 +0100)
Move the disabling of interrupt sources so it's done ahead of the offlining
of APs.  This is to prevent AMD systems triggering "Receive accept error"
when interrupts target CPUs that are no longer online.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: db6daa9bf411260d2c1f5301e4fc786ae4a5cef8
master date: 2025-02-12 15:56:07 +0100

xen/arch/x86/smp.c

index bd92496d3de5c9a07aa883e7f85809e4d91d352b..eb134ecac887a9ab8f8800d378e6f062f0ed5bb4 100644 (file)
@@ -372,6 +372,8 @@ void smp_send_stop(void)
         smp_call_function(stop_this_cpu, &stop_aps, 0);
 
     local_irq_disable();
+    disable_IO_APIC();
+    hpet_disable();
 
     if ( num_online_cpus() > 1 )
     {
@@ -387,8 +389,6 @@ void smp_send_stop(void)
 
     if ( cpu_online(cpu) )
     {
-        disable_IO_APIC();
-        hpet_disable();
         __stop_this_cpu();
         x2apic_enabled = (current_local_apic_mode() == APIC_MODE_X2APIC);
     }