Re: [PATCH v14 02/22] KVM: selftests: Update kvm_init_vm_address_properties() for TDX
From: Edgecombe, Rick P
Date: Thu Aug 13 2026 - 19:18:08 EST
On Wed, 2026-07-22 at 23:13 +0000, Lisa Wang wrote:
> From: Isaku Yamahata <isaku.yamahata@xxxxxxxxx>
>
> Initialize the TDX S-bit and the GPA tag mask in
> kvm_init_vm_address_properties() for TDX VMs, similar to how the C-bit
> is initialized for SEV VMs.
>
> The TDX S-bit is used to distinguish between shared and private guest
> physical addresses. Its position is determined by the guest physical
> address width, which is either 48 or 52 bits for current TDX
> implementations.
Since S-bit=1 means shared and C-bit=1 means private, we can't have a single
bit. I'd justify why a second field is needed. For "untagging" GPAs we could
have a single field, but there are other usages?
>
> Reviewed-by: Binbin Wu <binbin.wu@xxxxxxxxxxxxxxx>
> Co-developed-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> Signed-off-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> Signed-off-by: Isaku Yamahata <isaku.yamahata@xxxxxxxxx>
> Co-developed-by: Sagi Shahar <sagis@xxxxxxxxxx>
> Signed-off-by: Sagi Shahar <sagis@xxxxxxxxxx>
> Reviewed-by: Ira Weiny <ira.weiny@xxxxxxxxx>
> Signed-off-by: Lisa Wang <wyihan@xxxxxxxxxx>
> Reviewed-by: Xiaoyao Li <xiaoyao.li@xxxxxxxxx>
> ---
Nit: these are not ordered correctly. I think KVM prefers the order in:
Documentation/process/maintainer-tip.rst
But I think at least the RBs can be grouped together. Also... can't really point
fingers here, but that is a fair amount of of patch history.