Re: [PATCH v6 00/90] x86: Introduce a centralized CPUID data model

From: Borislav Petkov

Date: Tue May 05 2026 - 11:15:30 EST


On Tue, May 05, 2026 at 03:33:50PM +0200, Borislav Petkov wrote:
> On Mon, Apr 27, 2026 at 08:45:23PM +0200, Ahmed S. Darwish wrote:
> > * Keep the current synthetic CPUID(0x4c780001) and CPUID(0x4c780002)
> > bitfield listings, with their hardware-backed scattered bits, as is.
> > Mark them as "v1" instead of setting them in stone.
>
> Except that they're already cast in stone:
>
> https://gitlab.com/x86-cpuid.org/x86-cpuid-db/-/blob/tip/db/xml/leaf_4c780001.xml
>
> and that 02 one.
>
> I don't want any of that to be in any database - this is Linux-internal only
> and needs to go from there and nothing should depend on it.
>
> So, instead of taking this and then converting stuff ontop, the proper thing
> to do would be:
>
> - rip out the linux-specific leafs from the cpuid db
> - keep both facilities in the kernel for querying and convert the hardware
> leafs to the new method but use the old method for querying the synthetic
> leafs. I'm sure we can multiplex between the two in cpu_feature_enabled()
>
> - then start converting the synthetic ones to hidden, Linux-specific ones
>
> Ok?

Ok, talked it over with tglx - he brought up the argument that actually
having those flags documented is good for other tools like crash, etc, where
you want to consult a single db for *all* X86_FEATURE flags in the kernel - no
matter how they're defined.

So, what we will do is, we'll leave those leafs as is and not touch them.

If we need to add new, solely synthetic bits, we'll add them where there's
room, document them in the db and that's it. Synthetic bits will be add-only
and the cpuid-db will collect them.

This way you have a single source for all CPUID info.

The scattered.c thing goes away because we have full CPUID leaf
representation now.

We only get purely synthetic new additions to the db and we can use the Lx
namespace for that. I guess that's plenty of room for the foreseeable future.

Makes sense?

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette