xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [Xen-devel] [PATCH] x86/crash: fix kexec transition breakage
@ 2019-07-19 13:07 Igor Druzhinin
  2019-07-22 17:06 ` Andrew Cooper
  0 siblings, 1 reply; 2+ messages in thread
From: Igor Druzhinin @ 2019-07-19 13:07 UTC (permalink / raw)
  To: xen-devel; +Cc: andrew.cooper3, Igor Druzhinin, wl, jbeulich, roger.pau

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().

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
---
 xen/arch/x86/crash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/crash.c b/xen/arch/x86/crash.c
index f9772dc..a9f3e18 100644
--- a/xen/arch/x86/crash.c
+++ b/xen/arch/x86/crash.c
@@ -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();
 
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Xen-devel] [PATCH] x86/crash: fix kexec transition breakage
  2019-07-19 13:07 [Xen-devel] [PATCH] x86/crash: fix kexec transition breakage Igor Druzhinin
@ 2019-07-22 17:06 ` Andrew Cooper
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Cooper @ 2019-07-22 17:06 UTC (permalink / raw)
  To: Igor Druzhinin, xen-devel; +Cc: wl, jbeulich, roger.pau

On 19/07/2019 14:07, Igor Druzhinin wrote:
> 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().
>
> Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

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

> ---
>  xen/arch/x86/crash.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/arch/x86/crash.c b/xen/arch/x86/crash.c
> index f9772dc..a9f3e18 100644
> --- a/xen/arch/x86/crash.c
> +++ b/xen/arch/x86/crash.c
> @@ -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
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-22 17:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-19 13:07 [Xen-devel] [PATCH] x86/crash: fix kexec transition breakage Igor Druzhinin
2019-07-22 17:06 ` Andrew Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).