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=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT 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 14945C00449 for ; Fri, 5 Oct 2018 21:31:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C92C5206B2 for ; Fri, 5 Oct 2018 21:31:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C92C5206B2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=alien8.de 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 S1727177AbeJFEbw (ORCPT ); Sat, 6 Oct 2018 00:31:52 -0400 Received: from mail.skyhub.de ([5.9.137.197]:56038 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726037AbeJFEbw (ORCPT ); Sat, 6 Oct 2018 00:31:52 -0400 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ZZeBF67jClDa; Fri, 5 Oct 2018 23:31:17 +0200 (CEST) Received: from zn.tnic (p200300EC2BCA7500329C23FFFEA6A903.dip0.t-ipconnect.de [IPv6:2003:ec:2bca:7500:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 74BA81EC00E8; Fri, 5 Oct 2018 23:31:17 +0200 (CEST) Date: Fri, 5 Oct 2018 23:31:12 +0200 From: Borislav Petkov To: "Moger, Babu" Cc: "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" , "x86@kernel.org" , "peterz@infradead.org" , "pombredanne@nexb.com" , "gregkh@linuxfoundation.org" , "kstewart@linuxfoundation.org" , "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: Re: [PATCH v2 10/11] arch/x86: Add AMD feature bit X86_FEATURE_MBA in cpuid bits array Message-ID: <20181005213112.GG10285@zn.tnic> References: <20181005205512.29545-1-babu.moger@amd.com> <20181005205512.29545-11-babu.moger@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20181005205512.29545-11-babu.moger@amd.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 05, 2018 at 08:56:09PM +0000, Moger, Babu wrote: > 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: Babu Moger > Signed-off-by: Sherry Hurwitz This SOB chain should be the other way around - first Sherry, then you. > --- > 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/scattered.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; > }; > > -/* 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[] = { > { 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[] = { > { 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 } > -- With that fixed: Reviewed-by: Borislav Petkov -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.