Re: [PATCH v5 03/12] x86/cpufeatures: Add TDX Guest CPU feature
From: Borislav Petkov
Date: Thu Aug 12 2021 - 03:38:41 EST
On Wed, Aug 04, 2021 at 11:13:20AM -0700, Kuppuswamy Sathyanarayanan wrote:
> +static inline bool cpuid_has_tdx_guest(void)
> +{
> + u32 eax, sig[3];
> +
> + if (cpuid_eax(0) < TDX_CPUID_LEAF_ID)
> + return false;
> +
> + cpuid_count(TDX_CPUID_LEAF_ID, 0, &eax, &sig[0], &sig[2], &sig[1]);
Ok, good, in the meantime you've caught that the order was wrong - you
had:
cpuid_count(TDX_CPUID_LEAF_ID, 0, &eax, &sig[0], &sig[1], &sig[2]);
but that would've been "Inte lTDX"
:-)
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette