Re: [x86/cpuid] Question regarding historic leaf 0x80000000 code

From: Ahmed S. Darwish
Date: Thu Mar 20 2025 - 15:56:14 EST


On Thu, 20 Mar 2025, Andrew Cooper wrote:
>
> The problem is that for an out-of-range leaf, Intel returns the data
> from the maximum in-range leaf, rather than zeroes.
>
> On pre-AMD64-capable Intel CPUs, you'll get what amounts to junk in a
> query for leaf 0x80000000, where it's probably leaf 5 or so.
>
> Checking for the upper half of the output matching the input is a way of
> distinguishing Intel behaviour from all the other vendors.
>

Thanks a lot Andrew for all your help!

Then I'll mention that, in a comment, on top of the new CPUID scanner's
leaf 0x8000000 code.

Kind regards,

--
Ahmed S. Darwish
Linutronix GmbH