Re: [PATCH 23/25] KVM: x86/mmu: Taking guest pa into consideration when calculate tdp level

Paolo Bonzini
2024-09-10T17:33:18Z

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@redhat.com>

> + if (!maxpa)
> + maxpa = cpuid_maxphyaddr(vcpu);
> +