From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFF8CC67863 for ; Thu, 18 Oct 2018 22:53:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 92C65204FD for ; Thu, 18 Oct 2018 22:53:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="HNI28ShT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 92C65204FD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amd.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727877AbeJSG4N (ORCPT ); Fri, 19 Oct 2018 02:56:13 -0400 Received: from mail-eopbgr730047.outbound.protection.outlook.com ([40.107.73.47]:20824 "EHLO NAM05-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726733AbeJSGzi (ORCPT ); Fri, 19 Oct 2018 02:55:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cSBiRHWECyoxJfzTRZD+7PccMX8FDciLWMmAGx5rNSI=; b=HNI28ShTRjV7VqEBF1labpY1Iiny7tRsFbkF55swqD19ltHxxFmNNWdenAA/hVsFhmhvjjNePjDh9zfra6h/NfLr+IoHS5w1XxbC8UJXYBnRQwCI/3nKLb3gbBGxx/Upz4JWQEMtLrI3wJ288j473VQSYcERk2h2bnh7zUCuqfA= Received: from DM5PR12MB2471.namprd12.prod.outlook.com (52.132.141.138) by DM5PR12MB1340.namprd12.prod.outlook.com (10.168.238.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.23; Thu, 18 Oct 2018 22:52:25 +0000 Received: from DM5PR12MB2471.namprd12.prod.outlook.com ([fe80::bd60:9d30:b818:b828]) by DM5PR12MB2471.namprd12.prod.outlook.com ([fe80::bd60:9d30:b818:b828%3]) with mapi id 15.20.1250.028; Thu, 18 Oct 2018 22:52:25 +0000 From: "Moger, Babu" To: "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "corbet@lwn.net" , "fenghua.yu@intel.com" , "reinette.chatre@intel.com" , "peterz@infradead.org" , "gregkh@linuxfoundation.org" , "davem@davemloft.net" , "akpm@linux-foundation.org" CC: "hpa@zytor.com" , "x86@kernel.org" , "mchehab+samsung@kernel.org" , "arnd@arndb.de" , "kstewart@linuxfoundation.org" , "pombredanne@nexb.com" , "rafael@kernel.org" , "kirill.shutemov@linux.intel.com" , "tony.luck@intel.com" , "qianyue.zj@alibaba-inc.com" , "xiaochen.shen@intel.com" , "pbonzini@redhat.com" , "Singh, Brijesh" , "Hurwitz, Sherry" , "dwmw2@infradead.org" , "Lendacky, Thomas" , "luto@kernel.org" , "joro@8bytes.org" , "jannh@google.com" , "vkuznets@redhat.com" , "rian@alum.mit.edu" , "jpoimboe@redhat.com" , "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" Subject: [PATCH v5 10/13] arch/x86: Add AMD feature bit X86_FEATURE_MBA in cpuid bits array Thread-Topic: [PATCH v5 10/13] arch/x86: Add AMD feature bit X86_FEATURE_MBA in cpuid bits array Thread-Index: AQHUZzU8GAAIYswFkUyDPJW5mYzhoA== Date: Thu, 18 Oct 2018 22:52:25 +0000 Message-ID: <20181018225124.23043-11-babu.moger@amd.com> References: <20181018225124.23043-1-babu.moger@amd.com> In-Reply-To: <20181018225124.23043-1-babu.moger@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SN4PR0201CA0044.namprd02.prod.outlook.com (2603:10b6:803:2e::30) To DM5PR12MB2471.namprd12.prod.outlook.com (2603:10b6:4:b5::10) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Babu.Moger@amd.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [165.204.78.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR12MB1340;20:1qyO/Lsx4aXLa+2c+/fOC0w4Y0ijyRI8QAYhdmeFjgWrSiggFpqmtlHKbTACpqYeAKujFwU2ZyRCeXSswo6fICMoA4JqOmOA2eZqR8HTwcnwWHmazNVA44NKHuvZ2oV8x2XFb4M6a9w7+2VL08to2IP3XM8FS9BuOCc0CW0ZU2GuIk+iA940Pbb21T6KZE/8TR+4Q6FiAfdVW6VrjtXPhEdcKHycyRRnhe5qu23+7p4S4pCHECKiSBEtiFCDarrB x-ms-office365-filtering-correlation-id: fb357676-e7af-4706-5a73-08d6354c5f20 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:DM5PR12MB1340; x-ms-traffictypediagnostic: DM5PR12MB1340: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(767451399110); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(823302103)(3002001)(3231355)(944501410)(52105095)(10201501046)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095);SRVR:DM5PR12MB1340;BCL:0;PCL:0;RULEID:;SRVR:DM5PR12MB1340; x-forefront-prvs: 08296C9B35 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(39860400002)(366004)(396003)(136003)(346002)(199004)(189003)(86362001)(54906003)(186003)(71200400001)(110136005)(102836004)(478600001)(26005)(106356001)(76176011)(52116002)(105586002)(72206003)(1076002)(66066001)(81156014)(71190400001)(8676002)(8936002)(14454004)(5660300001)(7416002)(7406005)(2906002)(68736007)(99286004)(6486002)(6506007)(386003)(6116002)(81166006)(2501003)(7736002)(6512007)(446003)(2201001)(53936002)(14444005)(25786009)(97736004)(5250100002)(256004)(6436002)(305945005)(11346002)(4326008)(3846002)(316002)(36756003)(476003)(486006)(2900100001)(2616005)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR12MB1340;H:DM5PR12MB2471.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: lV+U3UeXnuLOd62IijBeLXMdRMOpvvEKG7QhU5UI55arMTOFmwQ2xcYzDQYlNtxuz5KTd5aY8BEajins6kguZPcOIwefhqctMsBr5YZ3vbqwPBmeMC0k1Wl2kroJVcWceFVP+J8SjvuGMPQ75skzuuwLTkx3vFytyOWqGR2NSYfhS42hAE1WPxcf3oLQ2Bw02MkVPxRluMzoMjMQhPcC6nERf2jOW/Ao6OfaLOBoTzdeQ2Omw4H+/ou+sHLsDyi3YNYHvKGHplrKgnEAz1MXKcrMEFxJPcimRtP4eGgT4MSh4vePfCRVGsDB5y8NlrV6kH4ehkyIOF9B496+8bjTw+yUNaDd31mEwJr2FZ0NnuI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb357676-e7af-4706-5a73-08d6354c5f20 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Oct 2018 22:52:25.3329 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1340 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sherry Hurwitz The feature bit X86_FEATURE_MBA is detected via CPUID leaf 0x80000008 EBX Bit 06. This bit indicates the support of AMD's MBA feature. This feature is supported by both Intel and AMD. But they are detected in different CPUID leaves. Signed-off-by: Sherry Hurwitz Signed-off-by: Babu Moger Reviewed-by: Borislav Petkov --- arch/x86/kernel/cpu/scattered.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/scattered.c b/arch/x86/kernel/cpu/scattere= d.c index 772c219b6889..bd7853334b27 100644 --- a/arch/x86/kernel/cpu/scattered.c +++ b/arch/x86/kernel/cpu/scattered.c @@ -17,7 +17,11 @@ struct cpuid_bit { u32 sub_leaf; }; =20 -/* Please keep the leaf sorted by cpuid_bit.level for faster search. */ +/* + * Please keep the leaf sorted by cpuid_bit.level for faster search. + * X86_FEATURE_MBA supported by both Intel and AMD. But the cpuid + * levels are different. Add a separate enty for each. + */ static const struct cpuid_bit cpuid_bits[] =3D { { X86_FEATURE_APERFMPERF, CPUID_ECX, 0, 0x00000006, 0 }, { X86_FEATURE_EPB, CPUID_ECX, 3, 0x00000006, 0 }, @@ -29,6 +33,7 @@ static const struct cpuid_bit cpuid_bits[] =3D { { X86_FEATURE_HW_PSTATE, CPUID_EDX, 7, 0x80000007, 0 }, { X86_FEATURE_CPB, CPUID_EDX, 9, 0x80000007, 0 }, { X86_FEATURE_PROC_FEEDBACK, CPUID_EDX, 11, 0x80000007, 0 }, + { X86_FEATURE_MBA, CPUID_EBX, 6, 0x80000008, 0 }, { X86_FEATURE_SME, CPUID_EAX, 0, 0x8000001f, 0 }, { X86_FEATURE_SEV, CPUID_EAX, 1, 0x8000001f, 0 }, { 0, 0, 0, 0, 0 } --=20 2.17.1