From patchwork Fri Jul 19 13:07:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Druzhinin X-Patchwork-Id: 11050061 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D3098746 for ; Fri, 19 Jul 2019 13:09:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C33AB2023F for ; Fri, 19 Jul 2019 13:09:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7D6427FA5; Fri, 19 Jul 2019 13:09:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5F8672023F for ; Fri, 19 Jul 2019 13:09:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hoScW-0007tu-1H; Fri, 19 Jul 2019 13:08:20 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hoScU-0007tj-Tj for xen-devel@lists.xenproject.org; Fri, 19 Jul 2019 13:08:18 +0000 X-Inumbo-ID: 456bb9e8-aa26-11e9-97e8-afc52c91b028 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 456bb9e8-aa26-11e9-97e8-afc52c91b028; Fri, 19 Jul 2019 13:08:16 +0000 (UTC) Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=igor.druzhinin@citrix.com; spf=Pass smtp.mailfrom=igor.druzhinin@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of igor.druzhinin@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="igor.druzhinin@citrix.com"; x-sender="igor.druzhinin@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa3.hc3370-68.iphmx.com: domain of igor.druzhinin@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="igor.druzhinin@citrix.com"; x-sender="igor.druzhinin@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ~all" Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa3.hc3370-68.iphmx.com; envelope-from="igor.druzhinin@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: 0RQYjNoFlcvkczk0XGFi+hODCidiu/fYGSWqaDRdYFT1zrYgbzl1rQJzFrFUNVhgWbcyCPZp9N OpufiRm3Bwe8/qZPpVDYsV5v4WeAa8UtAhEuwxC4/4gbQNKpBYxbHaKRB9tnYpMmpkUK+PQnR5 GHmyH3XdvZcU2XDAZXMjD8QXI9O8zs+OXgLuOCCQStBBRdMkRgl2OP/bROAcyNPEu0O5jiowSM BguVY5khVvSCY3W9EUNYYscJ/e2cAH7XNYdsqiCBWtjdzxP+k/lbN0vlkKDfA4jTnqXLFI7QVu w60= X-SBRS: 2.7 X-MesageID: 3197137 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.64,282,1559534400"; d="scan'208";a="3197137" From: Igor Druzhinin To: Date: Fri, 19 Jul 2019 14:07:48 +0100 Message-ID: <1563541668-6012-1-git-send-email-igor.druzhinin@citrix.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] x86/crash: fix kexec transition breakage 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: andrew.cooper3@citrix.com, Igor Druzhinin , wl@xen.org, jbeulich@suse.com, roger.pau@citrix.com Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Andrew Cooper --- 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();