Re: [PATCHv3 03/32] x86/tdx: Detect running as a TDX guest in early boot

From: Kirill A. Shutemov
Date: Sun Feb 20 2022 - 10:02:01 EST


On Fri, Feb 18, 2022 at 01:07:11PM -0800, Dave Hansen wrote:
> > Since cc_plaform_has() API will be used frequently across the boot
> > code, instead of repeatedly detecting the TDX guest status using the
> > CPUID instruction, detect once and cache the result.
>
> Isn't this a remnant of an old implementation where there was a separate
> 'tdx_enabled' variable in addition to X86_FEATURE_TDX_GUEST?
>
> Does this "caching" refer to X86_FEATURE_TDX_GUEST or the old thing?

Yeah, sorry. I failed to update commit message properly.

Updated patch is below.