Re: [PATCH v5 04/12] x86/tdx: Add protected guest support for TDX guest

From: Kuppuswamy, Sathyanarayanan
Date: Wed Aug 04 2021 - 19:00:24 EST




On 8/4/21 3:42 PM, Sean Christopherson wrote:
What other possible use case is there for invoking tdx_prot_guest_has() beyond
running as a TDX guest? If it were e.g. intel_prot_guest_has() then I would at
least understand the code, if not agree with the sub-optimal approach, but as is
it makes no sense.

Yes. I think his original intention is to implement intel_prot_guest_has() in
arch/x86/kernel/cpu/intel.c and then call tdx_prot_guest_has() from it. But since
we have no other use cases, we have called tdx_prot_*() directly here.

Boris, how do you want to proceed? Do you want me to implement intel_prot_guest_has()
or change comparison log to TDX specific?



Given amd_prot_guest_has(), my guess is Boris intended intel_prot_guest_has()...

--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer