On Wed, 2026-07-22 at 23:13 +0000, Lisa Wang wrote: > From: Isaku Yamahata <[email protected]> > > 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 <[email protected]> > Co-developed-by: Adrian Hunter <[email protected]> > Signed-off-by: Adrian Hunter <[email protected]> > Signed-off-by: Isaku Yamahata <[email protected]> > Co-developed-by: Sagi Shahar <[email protected]> > Signed-off-by: Sagi Shahar <[email protected]> > Reviewed-by: Ira Weiny <[email protected]> > Signed-off-by: Lisa Wang <[email protected]> > Reviewed-by: Xiaoyao Li <[email protected]> > --- 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.

