Re: [patch V6 01/19] x86/cpu: Provide cpuid_read() et al.
From: Borislav Petkov
Date: Tue Feb 13 2024 - 16:37:53 EST
On Tue, Feb 13, 2024 at 10:04:00PM +0100, Thomas Gleixner wrote:
> +static inline void __cpuid_read(unsigned int leaf, unsigned int subleaf, u32 *regs)
> +{
> + regs[CPUID_EAX] = leaf;
> + regs[CPUID_ECX] = subleaf;
> + __cpuid(regs, regs + 1, regs + 2, regs + 3);
Yeah,
__cpuid(regs, regs + CPUID_EBX, regs + CPUID_ECX, regs + CPUID_EDX);
explains what those numbers are.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette