Re: [PATCH v1 03/11] x86/cpufeatures: Add TDX Guest CPU feature

Kirill A. Shutemov
2021-06-10T14:29:33Z

On Thu, Jun 10, 2021 at 02:28:06PM +0200, Borislav Petkov wrote:
> > diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
> > index ac37830ae941..dddc3a27cc8a 100644
> > --- a/arch/x86/include/asm/cpufeatures.h
> > +++ b/arch/x86/include/asm/cpufeatures.h
> > @@ -238,6 +238,7 @@
> > #define X86_FEATURE_VMW_VMMCALL ( 8*32+19) /* "" VMware prefers VMMCALL hypercall instruction */
> > #define X86_FEATURE_PVUNLOCK ( 8*32+20) /* "" PV unlock function */
> > #define X86_FEATURE_VCPUPREEMPT ( 8*32+21) /* "" PV vcpu_is_preempted function */
> > +#define X86_FEATURE_TDX_GUEST ( 8*32+22) /* Trusted Domain Extensions Guest */
>
> What's the name of the feature bit? "TDX guest"? Why not only
> X86_FEATURE_TDX and then you can have "tdx" in cpuinfo?

No, "tdx" is host feature. It is part TDX host enabling. This feature
indicates that kernel runs within TDX guest and named accordingly.

--
Kirill A. Shutemov