Re: [PATCH v2 1/1] x86/tdx: Add __tdcall() and __tdvmcall() helper functions

From: Kuppuswamy, Sathyanarayanan
Date: Fri Apr 23 2021 - 14:18:31 EST




On 4/23/21 8:15 AM, Sean Christopherson wrote:
Has Intel "officially" switched to "tdg" as the acronym for TDX guest? As much
as I dislike having to juggle "TDX host" vs "TDX guest" concepts, tdx_ vs tdg_
isn't any better IMO.

When we merged both host and guest kernel into the same code base, we hit some
name conflicts (due to using tdx_ prefix in both host/guest code). So in order to
avoid such issues in future we decided to go with tdg/tdh combination. we thought
its good enough for kernel function/variable names.

The latter looks an awful lot like a typo, grepping for
"tdx" to find relevant code will get fail (sometimes), and confusion seems
inevitable as keeping "TDX" out of guest code/comments/documentation will be
nigh impossible.

tdg/tdh combination is only used within kernel code. But in sections which are
visible to users (kernel config and command line option), we still use
tdx_guest/tdx_host combination.



If we do decide to go with "tdg" for the guest stuff, then_all_ of the guest
stuff, file names included, should use tdg. Maybe X86_FEATURE_TDX_GUEST could
be left as a breadcrumb for translating TDX->TDG.

--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer