Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1489219pxu; Fri, 27 Nov 2020 08:20:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJy7VI5jcOU21OgwbUfLpioC4nxo3eKUN4NMdSdDy2aYyAdfsNogpl9dPADCCgimACCjMGt4 X-Received: by 2002:a17:907:aaf:: with SMTP id bz15mr8322587ejc.199.1606494028815; Fri, 27 Nov 2020 08:20:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606494028; cv=none; d=google.com; s=arc-20160816; b=IdTZNhH36ZswzMesTCasOLibqajsiO8HbZ2SazUXH+aT+bC0NZrHvu1D87kO6gAckL owpWx8pfoICCOmA+oOHy4cc6WL9yI1dtK2qsSxhuc3ZnmCttbJgqYVAPQnIb8uPhfAu4 2r0Gj+p7h1EGvlSBux0GNxnpwtoSdcd/mcE37cZdFKMa7Vj6lVHZUMeD0rp6M2Ji4vj5 VIWEbRFtVBSCtgdkCRvCrsOLTMB/7DMv3VENGIRO+9d/kWm1crAH1xuxqMZ4e9I2fQPV UErkaJG4CFrO2DY53zbVFerzHn65JvDF7eIf5D7zjA5+Y5Mx94qrDwciNGXyC+M2LyQT lPFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=QNioECAuIYRgU1kTgK6RAjVaI6CCYG8n9XkldJSn4Ug=; b=Alhxo9CLqF3Y1I7n0Tgf8Qg1PwjXaWQP8xuSEAY20Ga0jcgeDAmN+mo9u7+NiXoutO OHMYfuCf3Az9MSPSRZLlCc76K2ZhUzqypjN/GtEO4yBau9DRJsHWTLu7EkOmkOSR6/t+ K54Goe61JBTDzXSTgUDdbPLrvWI6OXHcJ/nWxeFDWbK+/Wu4JxrS82y+KaZBrOq0H4lR 4SDD58lp6sKpFZNlcXSdeXc4zVnLM3pVGJh6HdzcXyKj8hQjgBss3HyQvnOT3w3npneg 5ou5CTbOno5PNN1ne9/Sl2hEN6p1JJ65KPJrqInO43QiIgV8QlKLqb1ma1asNOzz9sI4 TutA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u4si5700307ejm.412.2020.11.27.08.20.06; Fri, 27 Nov 2020 08:20:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731324AbgK0QSb (ORCPT + 99 others); Fri, 27 Nov 2020 11:18:31 -0500 Received: from mga09.intel.com ([134.134.136.24]:46780 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730324AbgK0QSb (ORCPT ); Fri, 27 Nov 2020 11:18:31 -0500 IronPort-SDR: EIzixuHmI4qXF0jDJc/dKENp7O0qE3CoNz+N+jyhAbyzN7Q4+EZSZMbhMumDpOkVKU78/ZpCYK 3sVpp/8IRtpQ== X-IronPort-AV: E=McAfee;i="6000,8403,9818"; a="172567159" X-IronPort-AV: E=Sophos;i="5.78,375,1599548400"; d="scan'208";a="172567159" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2020 08:18:31 -0800 IronPort-SDR: R3L7FpdmHwaVEKeBO7+K7LfahIOeVMyvER/9hR1i17fDLFYSBJ3MZQja+1XSI8fItQ9uqBoh3U pRRkS8SQAgkQ== X-IronPort-AV: E=Sophos;i="5.78,375,1599548400"; d="scan'208";a="548095144" Received: from paolonig001.ir.intel.com ([163.33.183.93]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2020 08:18:28 -0800 From: Gabriele Paoloni To: tony.luck@intel.com, bp@alien8.de, tglx@linutronix.de, mingo@redhat.com, x86@kernel.org, hpa@zytor.com, linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org Cc: gabriele.paoloni@intel.com, linux-safety@lists.elisa.tech Subject: [PATCH v2 3/5] x86/mce: for LMCE panic only if mca_cfg.tolerant < 3 Date: Fri, 27 Nov 2020 16:18:17 +0000 Message-Id: <20201127161819.3106432-4-gabriele.paoloni@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201127161819.3106432-1-gabriele.paoloni@intel.com> References: <20201127161819.3106432-1-gabriele.paoloni@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Right now for LMCE if no_way_out is set mce_panic() is called regardless of mca_cfg.tolerant. This is not correct as, if mca_cfg.tolerant = 3, the code should never panic. Signed-off-by: Gabriele Paoloni Reviewed-by: Tony Luck --- arch/x86/kernel/cpu/mce/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c index 50e9b0893a92..d766a3f6a343 100644 --- a/arch/x86/kernel/cpu/mce/core.c +++ b/arch/x86/kernel/cpu/mce/core.c @@ -1367,7 +1367,7 @@ noinstr void do_machine_check(struct pt_regs *regs) * to see it will clear it. */ if (lmce) { - if (no_way_out) + if (no_way_out && mca_cfg.tolerant < 3) mce_panic("Fatal local machine check", &m, msg); } else { order = mce_start(&no_way_out); -- 2.20.1 --------------------------------------------------------------------- INTEL CORPORATION ITALIA S.p.A. con unico socio Sede: Milanofiori Palazzo E 4 CAP 20094 Assago (MI) Capitale Sociale Euro 104.000,00 interamente versato Partita I.V.A. e Codice Fiscale 04236760155 Repertorio Economico Amministrativo n. 997124 Registro delle Imprese di Milano nr. 183983/5281/33 Soggetta ad attivita' di direzione e coordinamento di INTEL CORPORATION, USA This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.