mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Maciej Wieczor-Retman <m.wieczorretman@pm.me>
To: Sohil Mehta <sohil.mehta@intel.com>
Cc: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Farrah Chen <farrah.chen@intel.com>,
	Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>,
	stable@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 1/3] x86/cpu: Clear feature bits disabled at compile-time
Date: Tue, 10 Mar 2026 10:49:14 +0000	[thread overview]
Message-ID: <aa_1Bmc64hvAzvG-@wieczorr-mobl1.localdomain> (raw)
In-Reply-To: <eb26dda1-f0bf-498f-b4c6-874a6c2878e3@intel.com>

On 2026-03-09 at 16:47:49 -0700, Sohil Mehta wrote:
>On 3/2/2026 7:25 AM, Maciej Wieczor-Retman wrote:
>
>>  /* Aligned to unsigned long to avoid split lock in atomic bitmap ops */
>> -__u32 cpu_caps_cleared[NCAPINTS + NBUGINTS] __aligned(sizeof(unsigned long));
>> +__u32 cpu_caps_cleared[NCAPINTS + NBUGINTS] __aligned(sizeof(unsigned long)) =
>> +	DISABLED_MASK_INITIALIZER;
>
>IIUC, DISABLED_MASK_INITIALIZER only contains the X86_FEATURE_* bits.
>So, the NBUGINTS bits in cpu_caps_cleared[] are implicitly set to 0.
>
>Should that be mentioned in the comment above? It wasn't obvious to me
>when I first looked at it.

As I understand the features can be compile time disabled while bugs can't? So
it wouldn't be practical to initialize the BUGS part of cpu_caps_cleared. But I
suppose it doesn't hurt to clarify it in the patch message. 

-- 
Kind regards
Maciej Wieczór-Retman


  reply	other threads:[~2026-03-10 10:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-02 15:24 [PATCH v8 0/3] x86: Capability bits fix and required bits sanity check Maciej Wieczor-Retman
2026-03-02 15:25 ` [PATCH v8 1/3] x86/cpu: Clear feature bits disabled at compile-time Maciej Wieczor-Retman
2026-03-02 19:31   ` Borislav Petkov
2026-03-02 19:48     ` Maciej Wieczor-Retman
2026-03-02 20:25       ` Borislav Petkov
2026-03-02 20:38         ` Maciej Wieczor-Retman
2026-03-02 20:59           ` Borislav Petkov
2026-03-02 21:22             ` Maciej Wieczor-Retman
2026-03-03  5:59               ` Borislav Petkov
2026-03-09 23:47   ` Sohil Mehta
2026-03-10 10:49     ` Maciej Wieczor-Retman [this message]
2026-03-02 15:25 ` [PATCH v8 2/3] x86/cpu: Check if feature string is non-zero Maciej Wieczor-Retman
2026-03-10  6:23   ` Sohil Mehta
2026-03-10 12:29     ` Maciej Wieczor-Retman
2026-03-02 15:25 ` [PATCH v8 3/3] x86/cpu: Do a sanity check on required feature bits Maciej Wieczor-Retman
2026-03-10  7:05   ` Sohil Mehta
2026-03-10 13:06     ` Maciej Wieczor-Retman

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=aa_1Bmc64hvAzvG-@wieczorr-mobl1.localdomain \
    --to=m.wieczorretman@pm.me \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=farrah.chen@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maciej.wieczor-retman@intel.com \
    --cc=mingo@redhat.com \
    --cc=sohil.mehta@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@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®