[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aW88jAPU8Bt_SiBQ@black.igk.intel.com>
Date: Tue, 20 Jan 2026 09:27:56 +0100
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, sohil.mehta@...el.com,
Borislav Petkov <bp@...en8.de>, "H. Peter Anvin" <hpa@...or.com>,
Ingo Molnar <mingo@...hat.com>, Jon Kohler <jon@...anix.com>,
Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Thomas Gleixner <tglx@...nel.org>, Tony Luck <tony.luck@...el.com>,
x86@...nel.org
Subject: Re: [PATCH 4/6] x86/cpu: Add platform ID to CPU info structure
On Mon, Jan 19, 2026 at 11:50:55AM -0800, Dave Hansen wrote:
>
> The end goal here is to be able to do x86_match_cpu() and match on a
> specific platform ID. While it would be possible to stash this ID
> off somewhere or read it dynamically, that approaches would not be
> consistent with the other fields which can be matched.
>
> Read the platform ID and store it in cpuinfo_x86->x86_platform_id.
>
> There are lots of sites to set this new field. Place it near
> the place c->microcode is established since the platform ID is
> so closely intertwined with microcode updates.
>
> Note: This should not grow the size of 'struct cpuinfo_x86' in
> practice since the u8 fits next to another u8 in the structure.
Have you run `pahole` to confirm?
...
> c->x86_cache_size = 0;
> c->x86_vendor = X86_VENDOR_UNKNOWN;
> - c->x86_model = c->x86_stepping = 0; /* So far unknown... */
Shan't we preserve the comment?
/* So far model, stepping, and platform_id are unknown... */
> + c->x86_model = 0;
> + c->x86_stepping = 0;
> + c->x86_platform_id = 0;
> c->x86_vendor_id[0] = '\0'; /* Unset */
> c->x86_model_id[0] = '\0'; /* Unset */
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists