From: Xin Li <xin@zytor.com>
To: Borislav Petkov <bp@alien8.de>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
tglx@linutronix.de, mingo@redhat.com,
dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com,
will@kernel.org, peterz@infradead.org, akpm@linux-foundation.org,
acme@kernel.org, namhyung@kernel.org
Subject: Re: [RESEND v1 1/3] x86/cpufeatures: Add {required,disabled} feature configs
Date: Wed, 12 Jun 2024 19:56:28 -0700 [thread overview]
Message-ID: <7bf64b12-ea59-470c-ac31-8226be4eb496@zytor.com> (raw)
In-Reply-To: <20240612133340.GBZmmjtD40dzhsWVyg@fat_crate.local>
On 6/12/2024 6:33 AM, Borislav Petkov wrote:
> On Thu, May 09, 2024 at 01:53:38PM -0700, Xin Li (Intel) wrote:
>> diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
>> index 2a7279d80460..719302d37053 100644
>> --- a/arch/x86/Kconfig.cpu
>> +++ b/arch/x86/Kconfig.cpu
>> @@ -358,6 +358,10 @@ config X86_P6_NOP
>> depends on X86_64
>> depends on (MCORE2 || MPENTIUM4 || MPSC)
>>
>> +config X86_REQUIRED_FEATURE_NOPL
>
> Can we keep the X86_{REQUIRED,DISABLED}_ prefixes solely in
> arch/x86/Kconfig.cpufeatures and not spill them out into the rest of the tree?
Good point, let me try.
>
> This way there will be no confusion between X86_FEATURE_, X86_REQUIRED_FEATURE_,
> X86_DISABLED_FEATURE_ and so on, and which one I am supposed to use where...
Currently X86_DISABLED_FEATURE_ macros are defined only in:
arch/x86/Kconfig.cpufeatures. But X86_REQUIRED_FEATURE_ macros are not.
>> diff --git a/arch/x86/Kconfig.cpufeatures b/arch/x86/Kconfig.cpufeatures
>> new file mode 100644
>> index 000000000000..326a8410ff06
>> --- /dev/null
>> +++ b/arch/x86/Kconfig.cpufeatures
>> @@ -0,0 +1,153 @@
>> +# SPDX-License-Identifier: GPL-2.0
>> +#
>> +# x86 feature bits (see arch/x86/include/asm/cpufeatures.h) that are
>> +# either REQUIRED to be enabled, or DISABLED (always ignored) for this
>> +# particular compile-time configuration. The tests for these features
>> +# are turned into compile-time constants via the generated
>> +# <asm/featuremasks.h>.
>> +#
>> +# The naming of these variables *must* match asm/cpufeatures.h.
>
> I presume they must match X86_FEATURE_<name>?
Right, let me add this.
>
> And REQUIRED and DISABLED is manipulated in by the script?
>
> I guess I'll see later.
Yep!
Thanks!
Xin
next prev parent reply other threads:[~2024-06-13 2:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-09 20:53 [RESEND v1 0/3] x86/cpufeatures: Automatically generate required and disabled feature masks Xin Li (Intel)
2024-05-09 20:53 ` [RESEND v1 1/3] x86/cpufeatures: Add {required,disabled} feature configs Xin Li (Intel)
2024-06-12 13:33 ` Borislav Petkov
2024-06-13 2:56 ` Xin Li [this message]
2024-05-09 20:53 ` [RESEND v1 2/3] x86/cpufeatures: Generate a feature mask header based on build config Xin Li (Intel)
2024-06-16 7:26 ` Xin Li
2024-06-17 13:46 ` H. Peter Anvin
2024-06-22 17:34 ` Xin Li
2024-05-09 20:53 ` [RESEND v1 3/3] x86/cpufeatures: Remove {disabled,required}-features.h Xin Li (Intel)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7bf64b12-ea59-470c-ac31-8226be4eb496@zytor.com \
--to=xin@zytor.com \
--cc=acme@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=will@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®