mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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: [PATCH v2 1/3] x86/cpufeatures: Add {required,disabled} feature configs
Date: Sat, 22 Jun 2024 10:16:32 -0700	[thread overview]
Message-ID: <cdeb6742-5bbb-4b06-8f6d-f53eb1e3cac5@zytor.com> (raw)
In-Reply-To: <20240621173245.GKZnW5PVnf4ota5pL4@fat_crate.local>

On 6/21/2024 10:32 AM, Borislav Petkov wrote:
> On Sun, Jun 16, 2024 at 01:57:41AM -0700, Xin Li (Intel) wrote:
>> diff --git a/arch/x86/Kconfig.cpufeatures b/arch/x86/Kconfig.cpufeatures
>> new file mode 100644
>> index 000000000000..5ed24e45df87
>> --- /dev/null
>> +++ b/arch/x86/Kconfig.cpufeatures
>> @@ -0,0 +1,197 @@
>> +# 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, e.g.,
>> +#     X86_FEATURE_ALWAYS <==> X86_REQUIRED_FEATURE_ALWAYS
>> +#     X86_FEATURE_FRED   <==> X86_DISABLED_FEATURE_FRED
>> +#
>> +# And these REQUIRED and DISABLED config options are manipulated in an
>> +# AWK script as the following example:
>> +#
>> +#                          +----------------------+
>> +#                          |    X86_FRED = y ?    |
>> +#                          +----------------------+
>> +#                              /             \
>> +#                           Y /               \ N
>> +#  +-------------------------------------+   +-------------------------------+
>> +#  | X86_DISABLED_FEATURE_FRED undefined |   | X86_DISABLED_FEATURE_FRED = y |
>> +#  +-------------------------------------+   +-------------------------------+
>> +#                                                        |
>> +#                                                        |
>> +#     +-------------------------------------------+      |
>> +#     | X86_FEATURE_FRED: feature word 12, bit 17 | ---->|
>> +#     +-------------------------------------------+      |
>> +#                                                        |
>> +#                                                        |
>> +#                                     +-------------------------------+
>> +#                                     | set bit 17 of DISABLED_MASK12 |
>> +#                                     +-------------------------------+
>> +#
> 
> Look ma, a picture. :-)
> 
> But yeah, this is better.
> 

We are better in intercepting pictures :)

Thanks!
     Xin

  reply	other threads:[~2024-06-22 17:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-16  8:57 [PATCH v2 0/3] x86/cpufeatures: Automatically generate required and disabled feature masks Xin Li (Intel)
2024-06-16  8:57 ` [PATCH v2 1/3] x86/cpufeatures: Add {required,disabled} feature configs Xin Li (Intel)
2024-06-21 17:32   ` Borislav Petkov
2024-06-22 17:16     ` Xin Li [this message]
2024-06-16  8:57 ` [PATCH v2 2/3] x86/cpufeatures: Generate a feature mask header based on build config Xin Li (Intel)
2024-06-17 16:34   ` Brian Gerst
2024-06-18  7:33     ` Xin Li
2024-06-16  8:57 ` [PATCH v2 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=cdeb6742-5bbb-4b06-8f6d-f53eb1e3cac5@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®