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 6449EC677FC for ; Thu, 11 Oct 2018 20:34:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1D7AC2087D for ; Thu, 11 Oct 2018 20:34:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amdcloud.onmicrosoft.com header.i=@amdcloud.onmicrosoft.com header.b="ZRcNve6r" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1D7AC2087D 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 S1726933AbeJLEDF (ORCPT ); Fri, 12 Oct 2018 00:03:05 -0400 Received: from mail-co1nam03on0052.outbound.protection.outlook.com ([104.47.40.52]:2515 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725850AbeJLEDE (ORCPT ); Fri, 12 Oct 2018 00:03:04 -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=d7WDLgaSVAWFYByJ8A5XXf+UQRJVzQW69ARzj6ocHjE=; b=ZRcNve6r3UqO7VX5CM3idxwOCULLN2wjzU/f28XuJILJTCiRMcVVpBRAzi7M4DJ4IDOcyfZFssP5VHorWBksLlrp5fatRgYnc05IxMdd5xljj642s+qDrn76eGWGcz3+hb9yQ81TleNaxH2M8Oj+aoAe5jYLfjV/878ZZlUZudI= Received: from DM5PR12MB2471.namprd12.prod.outlook.com (52.132.141.138) by DM5PR12MB2408.namprd12.prod.outlook.com (52.132.141.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1228.23; Thu, 11 Oct 2018 20:33:39 +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.1228.020; Thu, 11 Oct 2018 20:33:39 +0000 From: "Moger, Babu" To: "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" , "reinette.chatre@intel.com" , "fenghua.yu@intel.com" , "james.morse@arm.com" , "vikas.shivappa@linux.intel.com" , "tony.luck@intel.com" CC: "x86@kernel.org" , "peterz@infradead.org" , "Moger, Babu" , "pombredanne@nexb.com" , "gregkh@linuxfoundation.org" , "kstewart@linuxfoundation.org" , "bp@suse.de" , "rafael.j.wysocki@intel.com" , "ak@linux.intel.com" , "kirill.shutemov@linux.intel.com" , "xiaochen.shen@intel.com" , "colin.king@canonical.com" , "Hurwitz, Sherry" , "Lendacky, Thomas" , "pbonzini@redhat.com" , "dwmw@amazon.co.uk" , "luto@kernel.org" , "jroedel@suse.de" , "jannh@google.com" , "dima@arista.com" , "jpoimboe@redhat.com" , "vkuznets@redhat.com" , "linux-kernel@vger.kernel.org" Subject: [PATCH v3 10/11] arch/x86: Add AMD feature bit X86_FEATURE_MBA in cpuid bits array Thread-Topic: [PATCH v3 10/11] arch/x86: Add AMD feature bit X86_FEATURE_MBA in cpuid bits array Thread-Index: AQHUYaGxG6/V4V3Mb0aTh+XEKkTfDQ== Date: Thu, 11 Oct 2018 20:33:39 +0000 Message-ID: <20181011203223.18157-11-babu.moger@amd.com> References: <20181011203223.18157-1-babu.moger@amd.com> In-Reply-To: <20181011203223.18157-1-babu.moger@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MWHPR22CA0062.namprd22.prod.outlook.com (2603:10b6:300:12a::24) 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;DM5PR12MB2408;20:ihukASn73XDZNrGOvtJm8KtPZyaBizvsOeSwFTLthIHQy050QeKfBKXs4KVIXf5tHeh6TMKv2e4vKbo8IPa7r+NhNWdjGVcbk8pXAi6enD5lRBTremURJGAqKlH+W4dsTh9jsum/7tbgbHpHCnoSR/i2ZDBLPI/69cAFTzlCm29XaxrkcAsFF9LqkPaXbjCYXm+qlmejmTlOFQDEX0N+Dco2EETmKrkAfNJzCMFxyDv4neC9xVgVxeQLyJNMB0/U x-ms-office365-filtering-correlation-id: 88741832-51c6-4ff5-7b14-08d62fb8d3a0 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:DM5PR12MB2408; x-ms-traffictypediagnostic: DM5PR12MB2408: 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)(3231355)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(20161123562045)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051);SRVR:DM5PR12MB2408;BCL:0;PCL:0;RULEID:;SRVR:DM5PR12MB2408; x-forefront-prvs: 08220FA8D6 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39860400002)(366004)(376002)(396003)(136003)(346002)(189003)(199004)(25786009)(99286004)(52116002)(256004)(4326008)(54906003)(316002)(110136005)(68736007)(71200400001)(71190400001)(102836004)(36756003)(2900100001)(305945005)(66066001)(81166006)(106356001)(8676002)(7416002)(478600001)(14454004)(105586002)(8936002)(81156014)(6512007)(2501003)(5250100002)(11346002)(446003)(476003)(2616005)(97736004)(486006)(72206003)(6486002)(7736002)(53936002)(26005)(186003)(6436002)(2201001)(5660300001)(14444005)(86362001)(1076002)(386003)(6506007)(3846002)(76176011)(2906002)(6116002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR12MB2408;H:DM5PR12MB2471.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: G2ntopbLyHU8MJWHlDEi8UePHkckhN3fc7Qa38g8Gs11Wgkr8ch4DUVzvI7Fp+jYL9Hxyj433aNt2PS+WbwEuBLxJvy8P9Ne1w1vWNVTYCUfMH1VJs1vuSwN7+cryaTLVtt4U3DsTfzmiUBswNsRtWmm8v7oSsQ7z4iG9zvJUk2UJaMZDq7byRZM5GIyFbdhK8i6NnyWocmpa65gnn+ynYzaxvYqQDndE29GjeRYdB0JmClQRpmRD93Gp+cGdkWYZX/0qGAJxYhrAZsBUrTO+EsfMAFDouLPYkLVQyyNKq0h5Z+M4075rE8PO7mbsGge/UyHcgYKm1sEpwyjUd285X8ChzyU02UoLVedzsX12/Q= 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: 88741832-51c6-4ff5-7b14-08d62fb8d3a0 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Oct 2018 20:33:39.3954 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB2408 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 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