Received: by 10.213.65.68 with SMTP id h4csp2113569imn; Sun, 8 Apr 2018 20:03:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx48m7yG0bdBEKm436oeC9SiVUcjUZQfS6M74fc8UAXX5M6a/z05XWHw8WwXtLEifWuIiOpKm X-Received: by 10.99.126.71 with SMTP id o7mr14964560pgn.366.1523243016322; Sun, 08 Apr 2018 20:03:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243016; cv=none; d=google.com; s=arc-20160816; b=RA6dANAquOT5tNROorq6jToLPdPkW/vlEJOklXQRmVk0n9j0jxRx6uPXRSap8xRemR EqjFPNZnj3nDIuNipF/VFMKMvtaTw5vShPGBbVNKCX0AcXN2pUDXXNzjgjeERyZkapPq wo+z5qHkaqDqXO3DKjP4MKyWxxFEJMRuE7l63bDEMrWr/fiQgdEUrizJTrh/0qb93OSs 3fUE7gl34QYlvCoCnjUHmWrR6ZCiMZ/hdd/zB4amJqDz/GqxGWWfUPRY4rTwFcPANNft z8m76snLbxYcYMo9Br14Z8QP0uwnnmIX/cmsAWkMsbJnhT6Iawgp7xFnF3L0x9QeXmVS R4EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=2GUdenecmg5ePh2Znep/ovKxhpBKmR97oMIspYMamno=; b=GMbV/XPoQFdCjznkCGzY12/sfTRtipN6Kx20LWTzTl/pcma6m4s6n7WTAK+Y9LVF5u Zy7qrgE4o/ilQdGBnpzxMzFpw60nnU8HaHWIOqvbSunp2dMMIfCMt5BlFMBrJsgh1mfX ITmmjA9hZJTLXyvxbZTv+hgc1w9N2xz4XxJDghsNb2ICdkC1TFKOqt89sHiQrjRNCQJZ RYWc2KstoyV6wHbid5+O83Tl/DuUkshY4FBsD5OlFojD6gx5K6Feli8xyLzZn/7E9RC+ icoeKu0NPYu2U8jaYakaiu8i3BHfrljJzZaC9yW5EpSRfEAINx+bcPP16AhswdnKmC61 y7YQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=MnEOJH8h; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z69si12022157pfl.209.2018.04.08.20.02.59; Sun, 08 Apr 2018 20:03:36 -0700 (PDT) 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=@microsoft.com header.s=selector1 header.b=MnEOJH8h; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755838AbeDIA21 (ORCPT + 99 others); Sun, 8 Apr 2018 20:28:27 -0400 Received: from mail-sn1nam02on0134.outbound.protection.outlook.com ([104.47.36.134]:61393 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755812AbeDIA2W (ORCPT ); Sun, 8 Apr 2018 20:28:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=2GUdenecmg5ePh2Znep/ovKxhpBKmR97oMIspYMamno=; b=MnEOJH8hMfFK3y4jBuEWefhqYeHDm+fSzBXcSndIk9b2ioIrN5wQkzExBm8WZ9T+4kQCYpk/CNKztD8kTGLNW9sx28mX4Ix+XrFai+BXMgmlIHRXj5+wr4kzvPKY9Z1uBvLFUmpK+gDwzqKabnVROW9YqfsCNYkdczLc26PoGvk= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0871.namprd21.prod.outlook.com (10.167.110.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.2; Mon, 9 Apr 2018 00:28:19 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:28:19 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Yazen Ghannam , Borislav Petkov , Borislav Petkov , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , Tony Luck , linux-edac , Ingo Molnar , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 071/293] x86/mce: Don't disable MCA banks when offlining a CPU on AMD Thread-Topic: [PATCH AUTOSEL for 4.9 071/293] x86/mce: Don't disable MCA banks when offlining a CPU on AMD Thread-Index: AQHTz5kHvHpWssP4c0CBSQs9GaphXA== Date: Mon, 9 Apr 2018 00:23:49 +0000 Message-ID: <20180409002239.163177-71-alexander.levin@microsoft.com> References: <20180409002239.163177-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002239.163177-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0871;7:rqvsb0WEOSWqqRbr++iDvodwr4tIcP8GBOJw3XPCl8FZmXQRJEv7dk6lxChyCFxuEXWL0BfbgiKOHLExDDPlvMWwh7Xm2gMqr2cmDoAmLJeUR/DUaaLAxFc1BSECdxos7rQnYtj8XtnrdaO8SZm8JnAUra9UjbziNxzDbITaR1mxqcOa8wbkjehBC9+vcyK6+B+Ypn0tg1AXAqcueuR3AHtaU0+X6+bpdMjD9yYpmAc9qcMDoPOds3bzXfUebzAs;20:u1tEl/QumzEli9FcKeQu/+J+pBnXVpsZwmxfYOverus7whZZQcR5k4PKZHL79bs5VpXg8dkY17mP6sAHN310dpubmK1oDJGJ9KRXqx18+DmefatpGna0+Z0c37qehFGCM8T5ywrQ/oKGnlK1LilGJBgY0GdH9NSNRxPB29zeVOs= X-MS-Office365-Filtering-Correlation-Id: 48e71d91-8cf3-448c-2fb0-08d59db0cb93 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(48565401081)(2017052603328)(7193020);SRVR:DM5PR2101MB0871; x-ms-traffictypediagnostic: DM5PR2101MB0871: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(9452136761055)(767451399110)(42068640409301)(211171220733660)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(3231221)(944501327)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB0871;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0871; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(366004)(396003)(39380400002)(376002)(39860400002)(199004)(189003)(105586002)(8676002)(59450400001)(3660700001)(3280700002)(6506007)(81156014)(81166006)(14454004)(99286004)(72206003)(110136005)(8936002)(54906003)(305945005)(2906002)(316002)(966005)(10290500003)(478600001)(7736002)(53936002)(6512007)(486006)(11346002)(4326008)(6306002)(86362001)(446003)(10710500007)(3846002)(102836004)(76176011)(476003)(25786009)(22452003)(36756003)(107886003)(6666003)(10090500001)(7110500001)(5660300001)(6486002)(86612001)(6436002)(2420400007)(2616005)(68736007)(8666007)(26005)(1076002)(186003)(15650500001)(2501003)(5250100002)(2900100001)(106356001)(7416002)(66066001)(6116002)(97736004)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0871;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 5ZIo9JdaW2Y2SgvjSBteGEI4hyVmJ1DEWhlze3SUl50XCozYqqmvWQX4ynlqXOcSMW+23e/SX0EEvdoMp3j0o8XdD1gSKHYB5qvs2Mqm60Xh7uv+0kZQf/Z8P4Ao7NSI+CTyWjUjkNnCvGa5FbcgKMsPzbmd5keWSAC3Bx0dpeAEzT7cB203yDxY58o+UDNEg3ifYXpAj/z6N4wXbhLCVtlSddnjvNrjrGeKu+vYPWd0/5/cim6KqjYxoXAXvJvjr9Ik9yJzkFMS7b8yUlwVrLzp7fbdd/nO/9Mhd4V+a5O/Aj8iecrUkPTPbTy4aAwGv8Hry+bVX9h9RYgFzrviCY0DF302r3oLpjWTSK03sktAl8HTinVqRBg1gb7N8ltJKE2zEXvF+dgEFLQoVHKVZxmzraVJlLtNAx4bNhTt+ZU= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 48e71d91-8cf3-448c-2fb0-08d59db0cb93 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:23:49.2062 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0871 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yazen Ghannam [ Upstream commit ec33838244c8535b23b8d24b167996fd1318bb68 ] AMD systems have non-core, shared MCA banks within a die. These banks are controlled by a master CPU per die. If this CPU is offlined then all the shared banks are disabled in addition to the CPU's core banks. Also, Fam17h systems may have SMT enabled. The MCA_CTL register is shared between SMT thread siblings. If a CPU is offlined then all its sibling's MCA banks are also disabled. Extend the existing vendor check to AMD too. Signed-off-by: Yazen Ghannam [ Fix up comment. ] Signed-off-by: Borislav Petkov Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tony Luck Cc: linux-edac Link: http://lkml.kernel.org/r/20170613162835.30750-8-bp@alien8.de Signed-off-by: Ingo Molnar Signed-off-by: Sasha Levin --- arch/x86/kernel/cpu/mcheck/mce.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/= mce.c index 7bbd50fa72ad..0a8ba9adb04a 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -2187,12 +2187,13 @@ static void mce_disable_error_reporting(void) static void vendor_disable_error_reporting(void) { /* - * Don't clear on Intel CPUs. Some of these MSRs are socket-wide. + * Don't clear on Intel or AMD CPUs. Some of these MSRs are socket-wide. * Disabling them for just a single offlined CPU is bad, since it will * inhibit reporting for all shared resources on the socket like the * last level cache (LLC), the integrated memory controller (iMC), etc. */ - if (boot_cpu_data.x86_vendor =3D=3D X86_VENDOR_INTEL) + if (boot_cpu_data.x86_vendor =3D=3D X86_VENDOR_INTEL || + boot_cpu_data.x86_vendor =3D=3D X86_VENDOR_AMD) return; =20 mce_disable_error_reporting(); --=20 2.15.1