Re: [RFC v2 27/32] x86/tdx: Exclude Shared bit from __PHYSICAL_MASK

From: Kuppuswamy, Sathyanarayanan
Date: Thu May 20 2021 - 15:42:16 EST




On 5/20/21 12:33 PM, Sean Christopherson wrote:
Initially we have used tdx_* prefix for the guest code. But when the code from
host side got merged together, we came across many name conflicts.
Whatever the conflicts are, they are by no means an unsolvable problem. I am
more than happy to end up with slightly verbose names in KVM if that's what it
takes to avoid "tdg".

So to avoid such issues in future, we were asked not to use the "tdx_" prefix
and our alternative choice was "tdg_".
Who asked you not to use tdx_? More specifically, did that feedback come from a
maintainer (or anyone on-list), or was it an Intel-internal decision?

It is the Intel internal feedback.


Also, IMO, "tdg" prefix is more meaningful for guest code (Trusted Domain Guest)
compared to "tdx" (Trusted Domain eXtensions). I know that it gets confusing
when grepping for TDX related changes. But since these functions are only used
inside arch/x86 it should not be too confusing.

Even if rename is requested, IMO, it is easier to do it in one patch over
making changes in all the patches. So if it is required, we can do it later
once these initial patches were merged.
Hell no, we are not merging known bad crud that requires useless churn to get
things right.

So what is your proposal? "tdx_guest_" / "tdx_host_" ?

If there is supposed be a rename, lets wait till we know about maintainers
feedback as well. If possible I would prefer not to go through another
rename.

--
Sathyanarayanan Kuppuswamy
Linux Kernel Developer