Re: [PATCH 23/25] KVM: x86/mmu: Taking guest pa into consideration when calculate tdp level
From: Paolo Bonzini
Date: Tue Sep 10 2024 - 13:40:52 EST
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);
+