KVM: selftests: Ignore KVM 5-level paging support for VM_MODE_PXXV48_4K
authorSean Christopherson <sean.j.christopherson@intel.com>
Thu, 28 May 2020 02:15:30 +0000 (19:15 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 9 Jun 2020 09:54:50 +0000 (05:54 -0400)
commit2067028512b60c78961c3e075bb72cc44310355c
treeb02e7b90320bd56e549ff39edac139fc226913e8
parente649b3f0188f8fd34dd0dde8d43fd3312b902fb2
KVM: selftests: Ignore KVM 5-level paging support for VM_MODE_PXXV48_4K

Explicitly set the VA width to 48 bits for the x86_64-only PXXV48_4K VM
mode instead of asserting the guest VA width is 48 bits.  The fact that
KVM supports 5-level paging is irrelevant unless the selftests opt-in to
5-level paging by setting CR4.LA57 for the guest.  The overzealous
assert prevents running the selftests on a kernel with 5-level paging
enabled.

Incorporate LA57 into the assert instead of removing the assert entirely
as a sanity check of KVM's CPUID output.

Fixes: 567a9f1e9deb ("KVM: selftests: Introduce VM_MODE_PXXV48_4K")
Reported-by: Sergio Perez Gonzalez <sergio.perez.gonzalez@intel.com>
Cc: Adriana Cervantes Jimenez <adriana.cervantes.jimenez@intel.com>
Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200528021530.28091-1-sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/lib/kvm_util.c