]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit5d86c1ccbd348876a6ec75714effd4e3da12d663
treeb55a3683ab6f0b615782fbca0f156c6cadec7013
parent07a082630784b948c486e9a95a8a62dff567a774
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