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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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);
+






[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux