Skip to contentSkip to conversation

x86/crash: fix kexec transition breakage

PATCH In review Igor Druzhinin 2 participants 2 messages Jul 19, 2019 – Jul 22, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/crash: fix kexec transition breakage

Following 6ff560f7f ("x86/SMP: don't try to stop already stopped CPUs") an incorrect condition was placed into kexec transition path leaving crashing CPU always online breaking kdump kernel entering. Correct it by unifying the condition with smp_send_stop().

---
 xen/arch/x86/crash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/crash.c +1 -1
index f9772dc..a9f3e18 100644
@@ -169,7 +169,7 @@ static void nmi_shootdown_cpus(void)
      */
     iommu_crash_shutdown();
 
-    if ( num_online_cpus() > 1 )
+    if ( cpu_online(cpu) )
     {
         __stop_this_cpu();
 
Signature · 7 lines
2.7.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Igor Druzhinin

Following 6ff560f7f ("x86/SMP: don't try to stop already stopped CPUs") an incorrect condition was placed into kexec transition path leaving crashing CPU always online breaking kdump kernel entering. Correct it by unifying the condition with smp_send_stop().

Given how easily I can reproduce the problem now, I can't explain why the previous version appeared to work...

Quoted 9 lines
---
 xen/arch/x86/crash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/crash.c +0 -0
index f9772dc..a9f3e18 100644

xen/arch/x86/crash.c static void nmi_shootdown_cpus(void) · line 175

Quoted 8 lines
xen/arch/x86/crash.c +1 -1
@@ -169,7 +169,7 @@ static void nmi_shootdown_cpus(void)
      */
     iommu_crash_shutdown();
 
-    if ( num_online_cpus() > 1 )
+    if ( cpu_online(cpu) )
     {
         __stop_this_cpu();
 

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel