Re: [PATCH v6 11/11] x86/tdx: Handle CPUID via #VE
From: Sean Christopherson
Date: Fri Sep 03 2021 - 19:43:23 EST
On Fri, Sep 03, 2021, Kuppuswamy, Sathyanarayanan wrote:
> On 9/3/21 11:35 AM, Dave Hansen wrote:
> > On 9/3/21 10:28 AM, Kuppuswamy Sathyanarayanan wrote:
> > > From: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>
> > >
> > > TDX has three classes of CPUID leaves: some CPUID leaves are always
> > > handled by the CPU, others are handled by the TDX module, and some
> > > others are handled by the VMM. Since the VMM cannot directly intercept
> > > the instruction these are reflected with a #VE exception to the guest,
> > > which then converts it into a hypercall to the VMM, or handled
> > > directly.
> > Does this patch do any of the "handled directly" leaves? If not, why
> > mention it?
> It was added to give more information about CPUID leaves handling. Since
> it has nothing to do with this patch, I can remove it.
What leaves are "always handled by the CPU"? VTx doesn't allow disabling
CPUID exiting, let alone conditionally exiting on a specific CPUID leaf. I don't
see anything in the TDX specs that suggests that's any different in SEAM non-root