KVM: selftests: Trust that MAXPHYADDR > memslot0 in vmx_apic_access_test
authorSean Christopherson <seanjc@google.com>
Tue, 3 May 2022 21:48:59 +0000 (14:48 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 11 Jun 2022 15:47:26 +0000 (11:47 -0400)
commit38081d28835c84e73ff414f23663d57946cc2234
treeb55a3683ab6f0b615782fbca0f156c6cadec7013
parent6e1d13bf3815d6058620dd72135be292d9f44bc9
KVM: selftests: Trust that MAXPHYADDR > memslot0 in vmx_apic_access_test

Use vm->max_gfn to compute the highest gpa in vmx_apic_access_test, and
blindly trust that the highest gfn/gpa will be well above the memory
carved out for memslot0.  The existing check is beyond paranoid; KVM
doesn't support CPUs with host.MAXPHYADDR < 32, and the selftests are all
kinds of hosed if memslot0 overlaps the local xAPIC, which resides above
"lower" (below 4gb) DRAM.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/x86_64/vmx_apic_access_test.c