RE: [tip: perf/core] x86/cpu: Add helper function to get the type of the current hybrid CPU

From: Luck, Tony
Date: Wed May 10 2023 - 15:16:00 EST


> I read the SDM again. It seems that cpuid_eax(0x0000001a) already returns
> 0 when the leaf does not exist.

Quick correction. SDM says that read of an unimplemented leaf will return 0 in all registers
if the leaf you try to read is not the highest one. But if you try to read a leaf higher than the
highest implemented on, then CPUID returns data from the highest implemented leaf.

E.g. my CLX system only goes up to leaf 0x16. So, on my system, cpuid_eax(0x0000001a)
would return 0x00000ce4

-Tony