Received: by 10.213.65.68 with SMTP id h4csp2116796imn; Sun, 8 Apr 2018 20:07:45 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/Czw539hdrjEDBBu/WPFgF/S7ntKIZ+DCJ5O/1CwI1eT8z3+FP2j18crHctdqfOGN1aMjG X-Received: by 2002:a17:902:ba81:: with SMTP id k1-v6mr37247873pls.170.1523243265953; Sun, 08 Apr 2018 20:07:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243265; cv=none; d=google.com; s=arc-20160816; b=igxApWR3ceFiwNg8BeYOYooMi1SLd2sXjWWNoHR42H4VQL/eaptG6f9Qethncjq0tp RgmvfOHIMhbQmu3tCXoIIGphuoIoYvedY69YnxeIl3mvrW6CPoYuizzWlF4sbmepGsJe iTj6YLlruW0IqCZRaN+mkFtlz7RTF9YEQkQRcp9/HxWmtkgkWoNhpJl94fgj7gX9a9hU tr3lONhU+sPAX9zAiZymyj/qQ8iweUOQvSTqF5d/aMVIeH/l6uPLeykbCcdIOArqYG3G q9XOwEQDbKU83+NRLkf6LR0TOCguWK6GbpEDKSagGagXi8PGhIvHr6pv5HBpqL7DSUqW 9MVQ== 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=opADDpGdTHNMAAMyLpqBwyma6g07nnCQMJwGZJ/NExA=; b=w0v0k6xmOB1qQwhwyUj4WRUxaa5TlW27xpIWFMxH/s85i9HPoRwGftyuilxHifuGdI Lmh3ox6yX4pXrh5mx5EYAOi/xc0NEIhw1zF495kGY9H+9Zmvx1gkrhc8QqMEracnp/KG sA8adQfwvdD4/H79tqe6uaGlATP6GyybuWrxVSSmkb/gSaoj4WQ8PCwZJ2UoMs7LQSlk vpuorytNn/dVn8RFhIrM3pIk/n1K0WPZuQoNLMnX9VqaR+sI1CSEiUKZNUJbgJgSfg66 itxLWIqZzvMvwXUXvzyQEMovCf3VygBUEQLDqxZKiOOGziA98vEolAtJgfaWgwRGnhSg I9FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=d3jk/Nr+; 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 b9-v6si8245802plb.160.2018.04.08.20.07.09; Sun, 08 Apr 2018 20:07:45 -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=d3jk/Nr+; 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 S1757391AbeDIBcW (ORCPT + 99 others); Sun, 8 Apr 2018 21:32:22 -0400 Received: from mail-sn1nam02on0112.outbound.protection.outlook.com ([104.47.36.112]:45420 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755359AbeDIAfs (ORCPT ); Sun, 8 Apr 2018 20:35:48 -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=opADDpGdTHNMAAMyLpqBwyma6g07nnCQMJwGZJ/NExA=; b=d3jk/Nr+k23RVCLvlbBejaJfqbyW3dAjyuZdZNXxPK93WhpRkv1nHB7GLpJqTNPP8JUACkVmstynAdv4crhZQoGBJlAIrOTBWAhXZ29gZdC5xQgE6IZMzXlbpJFan38FvU3YLbEJ71GCEMOUm/kmmMVqCGbT6jwA7qY1DDywtME= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0725.namprd21.prod.outlook.com (10.167.107.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:35:46 +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:35:46 +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.4 036/162] x86/mce: Don't disable MCA banks when offlining a CPU on AMD Thread-Topic: [PATCH AUTOSEL for 4.4 036/162] x86/mce: Don't disable MCA banks when offlining a CPU on AMD Thread-Index: AQHTz5mibCh2+0HdpUKZAAd0snQgSA== Date: Mon, 9 Apr 2018 00:28:08 +0000 Message-ID: <20180409002738.163941-36-alexander.levin@microsoft.com> References: <20180409002738.163941-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002738.163941-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;DM5PR2101MB0725;7:Y16iSRRYD6WXK74cY5i+0Y8jPmQo4xdEX28DphkJcIDFphqPzeofXCguG7/yu8nEFkOzYoswwH7LTAVIpaVydJ/s68yCi7GfC5O8K5gTWsLfX+yTlohPPwuK+Rzj1HYH6ayRpAanSsFJGJ2hPDBOl40UzedryD1tjTWWbN6Kc1G3bH+cGHVkztiwH7CA28yQ0GcQenOo2kmuCXDBfNEaP3NXWpTk1pPr+eemqt9tZwkdzh58K1P3m+TBQsfdiaVQ;20:Drb/1VCY1UGnzabov7kPUT6Cq/hr6n+YYHle3NOk2NTvnjGhwTgEi1M83NGoNWVYHCHHLvW2YLvfRUb03nUyQNr7VsD7o9vd/YFseeVd4ll4MzgRRKfEIDvUJyRbHeSUm/4JeKD5tdNv251i78txxFUlvMWP6W/pWTiv8YnPvbk= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: c06437f0-1ff2-46b7-dbba-08d59db1d5a6 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0725; x-ms-traffictypediagnostic: DM5PR2101MB0725: 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)(5005006)(8121501046)(10201501046)(3231221)(944501327)(52105095)(93006095)(93001095)(3002001)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB0725;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0725; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39860400002)(396003)(376002)(39380400002)(346002)(366004)(189003)(199004)(86612001)(102836004)(5660300001)(14454004)(476003)(68736007)(11346002)(66066001)(446003)(99286004)(7416002)(76176011)(486006)(10090500001)(3660700001)(110136005)(305945005)(106356001)(316002)(105586002)(3280700002)(59450400001)(3846002)(10290500003)(6116002)(22452003)(6506007)(2616005)(1076002)(7736002)(54906003)(478600001)(2900100001)(2501003)(5250100002)(8936002)(25786009)(8666007)(81156014)(8676002)(6666003)(6436002)(7110500001)(4326008)(6306002)(26005)(6512007)(6486002)(81166006)(107886003)(53936002)(2420400007)(10710500007)(2906002)(966005)(86362001)(186003)(15650500001)(97736004)(36756003)(72206003)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0725;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Zi3iNh7K4xEQ295a90DXZYfE+WnrCNcgqSTClQC1+peJvMfPSl3l6sbqxVoF16khDO5BxRRjT1BsYuKyI+BEgZceMvvXUpf0hNCg6fo3YoPgZk1KFYsxqs7APK5BnEpCVI83M525oWoVSwxUZmOgfPtSGXqVTBHbeUWUhHnU9s1U3o8kJ76wkgoveknSDmW2HvhwmU+GZRzYkGoozDOuZSNDqgTk5ki+rO+JWdGHYN/qp3j2B5iwZoM/b0ljV34VPbYKAtTPyc5OaWOnOdL3O1VW1E/mNsS0fitpfnRh3KwrGLIeRYQQNdNHd3jCeJRxs0snwumUBNCI5O6nk0wkYUxLp/IU6k7Nd0kdznjph8LW6ftXdZGoQZ67fkkwMrl6J8B81N8x7zRWp1k/7S7M9+QPaFxPNuHlYbmVqvyeLR0= 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: c06437f0-1ff2-46b7-dbba-08d59db1d5a6 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:28:08.8642 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0725 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 6edb9530d7e9..8a79833e627d 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -2081,12 +2081,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