Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0203ECA9EAE for ; Tue, 29 Oct 2019 10:46:46 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6B4D02054F for ; Tue, 29 Oct 2019 10:46:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ts.fujitsu.com header.i=@ts.fujitsu.com header.b="LlRhL/1H" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B4D02054F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=ts.fujitsu.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iPP18-0005z4-7e; Tue, 29 Oct 2019 10:46:26 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iPP16-0005yw-RW for xen-devel@lists.xenproject.org; Tue, 29 Oct 2019 10:46:25 +0000 X-Inumbo-ID: 5809c7da-fa39-11e9-a531-bc764e2007e4 Received: from mail1.bemta25.messagelabs.com (unknown [195.245.230.3]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 5809c7da-fa39-11e9-a531-bc764e2007e4; Tue, 29 Oct 2019 10:46:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ts.fujitsu.com; s=200619tsfj; t=1572345980; i=@ts.fujitsu.com; bh=gZjeM7x0Kbrw1ILYb+O15J153TQ+YtOIb65yyIaikZU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type:Content-Transfer-Encoding; b=LlRhL/1HDIs7UguhFUEyOyNyWBbuc9VowbuKWNC/jH3W+IRg1RPVMP/+j3TznWgcy YK1cIWT4/9WmViQeCIDnLr6nF4QLkCKjJvRFy1UwQiIrAYbWQSJPazdx/+v8HhCLhv d4Pw439zGkvl7Mi2nlrDYf0SzdBNG4dr8YT4uvDT+MxmGeikd5W4RWglkzmlWCD1XT v4szSFA5G0Teh1kuS8BAhR+eC87gyzjUnorx1zisrk24xgkj62nFjGLc/8HW52OKmv YmLtHrpeAmLJzmBo2R5h5Sz51pvh/wv9jdXAlIT25Kswxg4KLytnHamCl2cJJrMFxG 233aAeEQfmPxA== Received: from [46.226.52.101] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-3.bemta.az-a.eu-west-1.aws.symcld.net id BF/72-31201-C7818BD5; Tue, 29 Oct 2019 10:46:20 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrHKsWRWlGSWpSXmKPExsViZ8MRqlstsSP W4MlPM4tZW8Utfu55yGaxZMkPRovJ96+xW3zfMpnJgdVj1eZtTB4rLnSxehz+cIXFY/2WqywB LFGsmXlJ+RUJrBntU2YxFaypq2h4fYe9gfFAYRcjF4eQwBxGiX23HjFCOPMZJQ5Oec3SxcjJw SZgILHr1SFmEFtEQEni3qrJTCBFzAI7GCXuzr8F5ggLdDFKzPm0mx2kikVAVeLdhS6wbl4BQ4 nli3aD2ZwCdhL3/p1jBbGFBGwlnl9bwwpRIyhxcuYTsBpmAS+JpzvnQ9nyEh2XG1knMPLOQlI 2C0nZLCRlmGwdiQW7P7FhimtLnDnwmGkBI/sqRoukosz0jJLcxMwcXUMDA11DQyNdQ0sTXUMz c73EKt1EvdRS3fLU4hJdQ73E8mK94src5JwUvbzUkk2MwAhJKTi0fAfj/y9v9Q4xSnIwKYny/ jm2PVaILyk/pTIjsTgjvqg0J7X4EKMMB4eSBO9n8R2xQoJFqempFWmZOcBohUlLcPAoifC+Fw NK8xYXJOYWZ6ZDpE4xhnNcvj5vETPH2X8g8uOqJUDyO5h8sxZEvgWTbffuAsl2ECnEkpeflyo lzssFsk0AZFxGaR7cMlgyusQoKyXMy8jAwCDEU5BalJtZgir/ilGcg1FJmHctyFE8mXklcDe9 AjqXCehcnZ/bQM4tSURISTUwWcilmz55IeW3vteQ//NB/38KO9for3Ncw/Lm7T/tO6x6zb/tH n7dl6YY2cvrzdl3/Z3EjmxJ97klwq80LL0+fxKoebEyp2qlb6uAbbHbjZ3dazR8ut3N/qS8uu 7lyyhwt1LzlYKtfuIV+7i2BTa6yoqRB6L4fFXX7ngatufBqygz53kfpknd2q48acdx8xrprau FGllceNxVIk4ysX5PvSihsNxLOmfv3Z8PYxdWT98keu181puTjpXhfn3Z6lPfLRUOzI2Qv89n zfHqkMIC/dZazcVP/twRuBFcJKJlKfrg0H1Vbc05wd5ZSx4GWnzd3+ZQsH9RGLPVK1X3y4X3h FXZI9kVBP9JbBUS/KbEUpyRaKjFXFScCABhWAmZwQMAAA== X-Env-Sender: dietmar.hahn@ts.fujitsu.com X-Msg-Ref: server-3.tower-265.messagelabs.com!1572345979!331322!1 X-Originating-IP: [62.60.8.85] X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.43.12; banners=-,-,- X-VirusChecked: Checked Received: (qmail 18120 invoked from network); 29 Oct 2019 10:46:19 -0000 Received: from unknown (HELO mailhost4.uk.fujitsu.com) (62.60.8.85) by server-3.tower-265.messagelabs.com with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 29 Oct 2019 10:46:19 -0000 Received: from sanpedro.mch.fsc.net ([172.17.20.6]) by mailhost4.uk.fujitsu.com (8.14.5/8.14.5) with SMTP id x9TAkIQa011521; Tue, 29 Oct 2019 10:46:18 GMT Received: from amur.mch.fsc.net (unknown [10.172.102.12]) by sanpedro.mch.fsc.net (Postfix) with ESMTP id BB14D569E066; Tue, 29 Oct 2019 11:46:10 +0100 (CET) From: Dietmar Hahn To: xen-devel@lists.xenproject.org Date: Tue, 29 Oct 2019 11:46:10 +0100 Message-ID: <2898026.oPHHLnqm1a@amur.mch.fsc.net> In-Reply-To: References: MIME-Version: 1.0 Subject: Re: [Xen-devel] [stable-4.11] Heads-up: c719519 (x86/SMP: don't try to stop already stopped CPUs) causes 100% kexec/kdump failure X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: "Durrant, Paul" , "Stonehouse, Robert" , "Elnikety, Eslam" , Jan Beulich Content-Type: multipart/mixed; boundary="===============8295406896495270805==" Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This is a multi-part message in MIME format. --===============8295406896495270805== Content-Type: multipart/alternative; boundary="nextPart5538791.lYZ8q3bBHN" Content-Transfer-Encoding: 7Bit This is a multi-part message in MIME format. --nextPart5538791.lYZ8q3bBHN Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Hi, Am Montag, 28. Oktober 2019, 18:30:12 CET schrieb Stonehouse, Robert: > This is a heads-up as I have observed that the following commit (backported onto an Amazon 4.11 tree) causes kexec (and hence kdump) to fail. > ======== > commit c719519a4183d0630121f6abeba420f49dbc3229 > Author: Jan Beulich > AuthorDate: Fri Jul 5 10:32:41 2019 +0200 > Commit: Jan Beulich > CommitDate: Fri Jul 5 10:32:41 2019 +0200 > > x86/SMP: don't try to stop already stopped CPUs > > In particular with an enabled IOMMU (but not really limited to this > case), trying to invoke fixup_irqs() after having already done > disable_IO_APIC() -> clear_IO_APIC() is a rather bad idea: > ======== > > The test was performing "echo c > /proc/sysrq-trigger" in dom0 and the loaded crash kernel fails to show any signs of starting. This is the end of the Xen console ... > ======== > (XEN) Hardware Dom0 crashed: rebooting machine in 5 seconds. > (XEN) Resetting with ACPI MEMORY or I/O RESET_REG. > > ======== > Expected behaviour is that the kdump kernel immediately loads and then performs the crash dump I can confirm this behavior but with xen version (4.11.0_08-1) from SuSE SLES12 SP4 which doesn't contain the said commit c719519a4183d0630121f6abeba420f49dbc3229.But I can see this only on systems with newer Intel CPUS like "Intel(R) Xeon(R) Gold 6242 CPU". > > I'm sorry that I have not yet had time to check if this affects vanilla stable-4.11 or master. I just wanted to be certain that you don't have the same issue. > > > Reverting one hunk via the following commit fixes things for me (this is an experiment and not at all a proposed fix) > ======== > --- a/xen/arch/x86/smp.c > +++ b/xen/arch/x86/smp.c > @@ -303,15 +303,15 @@ static void stop_this_cpu(void *dummy) > void smp_send_stop(void) > { > unsigned int cpu = smp_processor_id(); > + > + local_irq_disable(); > + fixup_irqs(cpumask_of(cpu), 0); > + local_irq_enable(); > > if ( num_online_cpus() > 1 ) > { > int timeout = 10; > > - local_irq_disable(); > - fixup_irqs(cpumask_of(cpu), 0); > - local_irq_enable(); > - > smp_call_function(stop_this_cpu, NULL, 0); > > /* Wait 10ms for all other CPUs to go offline. */ > ======== > > Regards > Rob > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xenproject.org > https://lists.xenproject.org/mailman/listinfo/xen-devel --nextPart5538791.lYZ8q3bBHN Content-Transfer-Encoding: 7Bit Content-Type: text/html; charset="us-ascii"

Hi,

 

Am Montag, 28. Oktober 2019, 18:30:12 CET schrieb Stonehouse, Robert:

> This is a heads-up as I have observed that the following commit (backported onto an Amazon 4.11 tree) causes kexec (and hence kdump) to fail.

> ========

> commit c719519a4183d0630121f6abeba420f49dbc3229

> Author: Jan Beulich <jbeulich@suse.com>

> AuthorDate: Fri Jul 5 10:32:41 2019 +0200

> Commit: Jan Beulich <jbeulich@suse.com>

> CommitDate: Fri Jul 5 10:32:41 2019 +0200

>

> x86/SMP: don't try to stop already stopped CPUs

>

> In particular with an enabled IOMMU (but not really limited to this

> case), trying to invoke fixup_irqs() after having already done

> disable_IO_APIC() -> clear_IO_APIC() is a rather bad idea:

> ========

>

> The test was performing "echo c > /proc/sysrq-trigger" in dom0 and the loaded crash kernel fails to show any signs of starting. This is the end of the Xen console ...

> ========

> (XEN) Hardware Dom0 crashed: rebooting machine in 5 seconds.

> (XEN) Resetting with ACPI MEMORY or I/O RESET_REG.

> <machine hangs here then reboots via the BIOS after 5 seconds>

> ========

> Expected behaviour is that the kdump kernel immediately loads and then performs the crash dump

 

I can confirm this behavior but with xen version (4.11.0_08-1) from

SuSE SLES12 SP4 which doesn't contain the said commit

c719519a4183d0630121f6abeba420f49dbc3229.
But I can see this only on systems with newer Intel CPUS like

"Intel(R) Xeon(R) Gold 6242 CPU".


Dietmar.

 

>

> I'm sorry that I have not yet had time to check if this affects vanilla stable-4.11 or master. I just wanted to be certain that you don't have the same issue.

>

>

> Reverting one hunk via the following commit fixes things for me (this is an experiment and not at all a proposed fix)

> ========

> --- a/xen/arch/x86/smp.c

> +++ b/xen/arch/x86/smp.c

> @@ -303,15 +303,15 @@ static void stop_this_cpu(void *dummy)

> void smp_send_stop(void)

> {

> unsigned int cpu = smp_processor_id();

> +

> + local_irq_disable();

> + fixup_irqs(cpumask_of(cpu), 0);

> + local_irq_enable();

>

> if ( num_online_cpus() > 1 )

> {

> int timeout = 10;

>

> - local_irq_disable();

> - fixup_irqs(cpumask_of(cpu), 0);

> - local_irq_enable();

> -

> smp_call_function(stop_this_cpu, NULL, 0);

>

> /* Wait 10ms for all other CPUs to go offline. */

> ========

>

> Regards

> Rob

>

> _______________________________________________

> Xen-devel mailing list

> Xen-devel@lists.xenproject.org

> https://lists.xenproject.org/mailman/listinfo/xen-devel

 

--nextPart5538791.lYZ8q3bBHN-- --===============8295406896495270805== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcKaHR0cHM6Ly9saXN0 cy54ZW5wcm9qZWN0Lm9yZy9tYWlsbWFuL2xpc3RpbmZvL3hlbi1kZXZlbA== --===============8295406896495270805==--