Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp3010468rwl; Tue, 27 Dec 2022 03:06:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXuqS598hVxw2Z2Bn4M7PcxfR1o3ggZt64WJrOtAbEpv6LNd9V1HXDA//EgtMrnpHN874nqq X-Received: by 2002:a17:907:cb14:b0:849:ea61:511e with SMTP id um20-20020a170907cb1400b00849ea61511emr14181503ejc.44.1672139161166; Tue, 27 Dec 2022 03:06:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672139161; cv=none; d=google.com; s=arc-20160816; b=PC5Ge01n4mm2SkYFxL3qAXpGyEsefGYkfaa/nbCnd53Kf1UEvMYPyBXHcMEwmXW0j5 wNp65rzsXmvUYy2Gsre8KNOKbGmyvydGxGktrcvVfSxUb/V0gMvDT76Oweh+Rl5f6Zjv QrGdqeKXwrDGjNDU/WDGWWHzPL/eF0VX21KTXtyuX375FuUQKX0EisrdgBiV3JAQZ2gu uI1ZhJDYaVjh8Fslq1lavXsHmIxM3riVUjWZtSfdnJmJTtBrpGitmp4qJwpAAsH1ohB1 aSFlGlPYHWN4eIaAuYMrlkLwmzjykMW5B6aiVlqOsv04yYSmh4CZKEBMCxJ5Aqjs9BSd 6YXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=7wsM9e/T5jFmAKOSFCalMkh4dI5J+2K4eCkXRgsYmo8=; b=YtdkRwA9MHlnR1dRhAvc2y+wAETRxPrPntVvXkjpwefKvyL2lCwC8SSRUCRjFEHYdR 9Xo5cxKl9CR+yuRuGMgmVnJulzVK+nA9CPbUDOib+ioEV9WGVnf7/ChOxxOJEUyzRoiZ yBixH7k5st6+dPebJsSy/8xDdBNruhkEqn2YwdA3GQrS3xDGq7ORatTN1wCp8++I4X/X ArMc9Mf7u/ROIBhHySIbM3mHDvblwIWNXcZscPcYLEHWyevVR1K89qoXrQv+luSWtTtY jO2CidoXPVFyAjkbve+V6Ere48T74WeEu5IiZkmzqyrAUP/yopzfcnCE5IvB+sd/Oz71 w8nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=C+4r1rC5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb25-20020a170907961900b007c195fb9e24si12100418ejc.42.2022.12.27.03.05.45; Tue, 27 Dec 2022 03:06:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=C+4r1rC5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229635AbiL0KwL (ORCPT + 66 others); Tue, 27 Dec 2022 05:52:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230026AbiL0KwF (ORCPT ); Tue, 27 Dec 2022 05:52:05 -0500 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E548AA479; Tue, 27 Dec 2022 02:52:02 -0800 (PST) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (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 262641EC02FE; Tue, 27 Dec 2022 11:52:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1672138321; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=7wsM9e/T5jFmAKOSFCalMkh4dI5J+2K4eCkXRgsYmo8=; b=C+4r1rC5FKIlTfYqTx3bdvejoL3qLxrMNBIyYEuO3uBoFG22UeJfL25ny1lFyFMDG0mxaH bkFGlloegp21piRKOmH03lLE4GVVoJ3BYxx5+qlBbzJDYRmfjLfw6eGHU/eGsExFzPeklb 9vImevDL8aT0AYPt2Zse5Kk+mj3ko7s= Date: Tue, 27 Dec 2022 11:51:56 +0100 From: Borislav Petkov To: Kim Phillips Cc: x86@kernel.org, Babu Moger , Borislav Petkov , Boris Ostrovsky , Dave Hansen , "H. Peter Anvin" , Ingo Molnar , Joao Martins , Jonathan Corbet , Konrad Rzeszutek Wilk , Paolo Bonzini , Sean Christopherson , Thomas Gleixner , David Woodhouse , Greg Kroah-Hartman , Juergen Gross , Peter Zijlstra , Tony Luck , Tom Lendacky , Alexey Kardashevskiy , kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 3/7] x86/cpu: Make X86_FEATURE_LFENCE_RDTSC a scattered feature bit Message-ID: References: <20221205233235.622491-1-kim.phillips@amd.com> <20221205233235.622491-4-kim.phillips@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221205233235.622491-4-kim.phillips@amd.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 05, 2022 at 05:32:31PM -0600, Kim Phillips wrote: > It's a part of the CPUID 0x80000021 leaf, and will be grouped > with other feature bits to being propagated via kvm_set_cpu_caps() > instead of open-coding them in __do_cpuid_func(). > > Unlike the other CPUID 0x80000021 EAX feature bits, > X86_FEATURE_LFENCE_RDTSC already had an entry in cpufeatures.h. > > Signed-off-by: Kim Phillips > --- > arch/x86/kernel/cpu/scattered.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/x86/kernel/cpu/scattered.c b/arch/x86/kernel/cpu/scattered.c > index d0734cc19d37..caa03466cd9e 100644 > --- a/arch/x86/kernel/cpu/scattered.c > +++ b/arch/x86/kernel/cpu/scattered.c > @@ -46,6 +46,7 @@ static const struct cpuid_bit cpuid_bits[] = { > { X86_FEATURE_PROC_FEEDBACK, CPUID_EDX, 11, 0x80000007, 0 }, > { X86_FEATURE_MBA, CPUID_EBX, 6, 0x80000008, 0 }, > { X86_FEATURE_NO_NESTED_DATA_BP,CPUID_EAX, 0, 0x80000021, 0 }, > + { X86_FEATURE_LFENCE_RDTSC, CPUID_EAX, 2, 0x80000021, 0 }, Hmm, so this patchset keeps growing and growing with new bits. Perhaps my initial suggestion to make it a scattered one doesn't make a whole lot of sense anymore. /me goes and looks at CPUID_Fn80000021_EAX [Extended Feature 2 EAX] (Core::X86::Cpuid::FeatureExt2Eax) Yah, judging by what's there in that leaf, we are likely to use a lot more bits in the future I think you should go back to https://lore.kernel.org/lkml/20221104213651.141057-2-kim.phillips@amd.com/ But please state in that commit message that the majority of the feature bits in CPUID_Fn80000021_EAX will be used in the kernel and thus a separate leaf makes sense. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette