Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp249030ybv; Wed, 5 Feb 2020 05:00:54 -0800 (PST) X-Google-Smtp-Source: APXvYqxqJLucHRPYeu19nwFin6AD+6iOlUiB5LX0KHSYMpFRzXiXRObWoTkuMMU17svhAnrahdL6 X-Received: by 2002:aca:c383:: with SMTP id t125mr2536351oif.122.1580907654105; Wed, 05 Feb 2020 05:00:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580907654; cv=none; d=google.com; s=arc-20160816; b=FnRERszO4Bbpn9L4VLBnigwspSykqUC/XlDMOgTOfJ2x6FuQt4nznkuk9cFudZsP8B R/LNZaIGPF+uzR9mGv4XLj7FFyG1N3cxtd4gE+ei9DjzUeA2omuQXhsrgRArhCknKXaR Zgf6+mng0RR8xJRgoKzOocX/YvWgb4Pcu9a950zH/8cABgcp0ExVJVXzzFiPc5AwaRKR 8aqr0XxxbiwSwdaNOEmaOVlNS/SuOzApEFU3KJlMCd5aa3E6vwDHTPTNXofHkCvKtb5G Nwk+QnqvhVcDv+0WgxqwpttGpAlZb34VFI7kYDg481caek5ueRbTYujDv84w8kM8gLKn vYOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=EsKI13uEInV1+e+5h+hQckTbAfRjcgKQBLxQjiFbWOU=; b=P33sbrZjeJTOuIQ+aXmKR3YqJih9/cCt+uQZ87YmwyyP8MJT8mnbc9cRg3OftQ2WD9 MVHopchIJuoaAHkEzbQmkEBcBHGiIJAl3sn0sde+Wug+cZTNzYjS1LIGF4fSLFMfemsh 1QsDKR1sDL7SZCppLTPE6UgSf0x9YuD3yPBor4Akzw5gU2aGpgoZcMXEHA//agQoN6Qe h77fu6HMedCpOds2yUibmg16NghW0bCtBb1KO8kUC55XFTv3XbzsfJ+YgeRG2/D7qa92 JalSAR9mRxslvw/rnC8hVvE1Vaar65QH0IUPqjApsv3+5/vtwL6bM0PY66VQTPVlCFtK HTqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Mfz+4QrW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 22si5897806oin.34.2020.02.05.05.00.40; Wed, 05 Feb 2020 05:00:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Mfz+4QrW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728068AbgBEM6l (ORCPT + 99 others); Wed, 5 Feb 2020 07:58:41 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:26413 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726748AbgBEM6k (ORCPT ); Wed, 5 Feb 2020 07:58:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580907520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=EsKI13uEInV1+e+5h+hQckTbAfRjcgKQBLxQjiFbWOU=; b=Mfz+4QrWmKR4w7tUiqf6HBe/IdRK3NHnzGxS22huJJ43p4A9hjJLg3a3sfsQBlJIYxjycv Hg0bcjaq3TWUvh7/L+Ci0Sow1iOldFuDaRz9jvFGVH1b932x3Nk9tr9+LHRGIv4oGo9qEi rCJSzPbap9e0hwAqmPipNv4wxGmqL7c= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-231-Jl4Bo-I3NZyj9UCfKmcPvQ-1; Wed, 05 Feb 2020 07:58:36 -0500 X-MC-Unique: Jl4Bo-I3NZyj9UCfKmcPvQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 900698010EF; Wed, 5 Feb 2020 12:58:34 +0000 (UTC) Received: from prarit.bos.redhat.com (prarit-guest.7a2m.lab.eng.bos.redhat.com [10.16.222.26]) by smtp.corp.redhat.com (Postfix) with ESMTP id 02FCB5DA7D; Wed, 5 Feb 2020 12:58:32 +0000 (UTC) From: Prarit Bhargava To: linux-kernel@vger.kernel.org Cc: Prarit Bhargava , Alexander Krupp , Tony Luck , Borislav Petkov , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, linux-edac@vger.kernel.org Subject: [PATCH] x86/mce: Enable HSD131, HSM142, HSW131, BDM48, and HSM142 Date: Wed, 5 Feb 2020 07:58:31 -0500 Message-Id: <20200205125831.20430-1-prarit@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Intel Errata HSD131, HSM142, HSW131, and BDM48 report that "spurious corrected errors may be logged in the IA32_MC0_STATUS register with the valid field (bit 63) set, the uncorrected error field (bit 61) not set, a Model Specific Error Code (bits [31:16]) of 0x000F, and an MCA Error Code (bits [15:0]) of 0x0005." Block these spurious errors from the console and logs. Links to Intel Specification updates: HSD131: https://www.intel.com/content/www/us/en/products/docs/processors/= core/4th-gen-core-family-desktop-specification-update.html HSM142: https://www.intel.com/content/www/us/en/products/docs/processors/= core/4th-gen-core-family-mobile-specification-update.html HSW131: https://www.intel.com/content/www/us/en/processors/xeon/xeon-e3-1= 200v3-spec-update.html BDM48: https://www.intel.com/content/www/us/en/products/docs/processors/c= ore/5th-gen-core-family-spec-update.html Signed-off-by: Alexander Krupp Signed-off-by: Prarit Bhargava Cc: Tony Luck Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: linux-edac@vger.kernel.org --- arch/x86/kernel/cpu/mce/core.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/cor= e.c index 2c4f949611e4..d893cc764a06 100644 --- a/arch/x86/kernel/cpu/mce/core.c +++ b/arch/x86/kernel/cpu/mce/core.c @@ -121,6 +121,8 @@ static struct irq_work mce_irq_work; =20 static void (*quirk_no_way_out)(int bank, struct mce *m, struct pt_regs = *regs); =20 +static int (*quirk_noprint)(struct mce *m); + /* * CPU/chipset specific EDAC code can register a notifier call here to p= rint * MCE errors in a human-readable form. @@ -232,6 +234,9 @@ struct mca_msr_regs msr_ops =3D { =20 static void __print_mce(struct mce *m) { + if (quirk_noprint && quirk_noprint(m)) + return; + pr_emerg(HW_ERR "CPU %d: Machine Check%s: %Lx Bank %d: %016Lx\n", m->extcpu, (m->mcgstatus & MCG_STATUS_MCIP ? " Exception" : ""), @@ -1622,6 +1627,15 @@ static void quirk_sandybridge_ifu(int bank, struct= mce *m, struct pt_regs *regs) m->cs =3D regs->cs; } =20 +static int quirk_spurious_ce_noprint(struct mce *m) +{ + if (m->bank =3D=3D 0 && + (m->status & 0xa0000000ffffffff) =3D=3D 0x80000000000f0005) + return 1; + + return 0; +} + /* Add per CPU specific workarounds here */ static int __mcheck_cpu_apply_quirks(struct cpuinfo_x86 *c) { @@ -1696,6 +1710,13 @@ static int __mcheck_cpu_apply_quirks(struct cpuinf= o_x86 *c) =20 if (c->x86 =3D=3D 6 && c->x86_model =3D=3D 45) quirk_no_way_out =3D quirk_sandybridge_ifu; + + if ((c->x86 =3D=3D 6) && + ((c->x86_model =3D=3D 0x3c) || (c->x86_model =3D=3D 0x3d) || + (c->x86_model =3D=3D 0x45) || (c->x86_model =3D=3D 46))) { + pr_info("MCE errata HSD131, HSM142, HSW131, BDM48, or HSM142 enabled.= \n"); + quirk_noprint =3D quirk_spurious_ce_noprint; + } } =20 if (c->x86_vendor =3D=3D X86_VENDOR_ZHAOXIN) { --=20 2.21.1