On 8/13/24 00:48, Rick Edgecombe wrote:
+ int maxpa = 0; + + if (vcpu->kvm->arch.vm_type == KVM_X86_TDX_VM) + maxpa = cpuid_query_maxguestphyaddr(vcpu);
I think the "if" should be in cpuid_query_maxguestphyaddr(), or alternatively the test below should become an "else". The current combination is not the clearest.
Otherwise, Reviewed-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
+ if (!maxpa) + maxpa = cpuid_maxphyaddr(vcpu); +