Re: [PATCH v5 07/35] x86: Introduce a centralized CPUID data model

Borislav Petkov <[email protected]> Thu, 29 Jan 2026 17:07:09 +0100
Newsgroups dev.linux.lists.x86-cpuid,org.kernel.vger.linux-kernel
Message-ID <20260129160709.GSaXuFreAkumbetUYJ@fat_crate.local>
On Mon, Jan 26, 2026 at 02:04:51PM +0100, Ahmed S. Darwish wrote:
> So the root-cause of all these "static" vs. "dynamic" distinctions was to
> catch call sites, at compile-time, when using the wrong CPUID storage
> output type relative to the requested leaf/subleaf.

Hmm, ok, I guess we want to catch stuff like that.

> I'll get rid of this static/dynamic terminology and think of something
> better.

But this is not about static and dynamic - you simply have different subleaf
layouts. And I guess you don't have to call them anything. You simply have
different struct types: leaf_0xd_0, leaf_0xd_1, leaf_0xd_n, ...

And that's fine.

The point being: we want our definitions to be as close to the hw spec
definition as possible. Not invent new things. Just use what the SDM says and
that's it.

Thx.

-- 
Regards/Gruss,
    Boris.

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