KVM: selftests: Update x86's KVM PV test to match KVM's disabling exits behavior
authorSean Christopherson <seanjc@google.com>
Thu, 28 Nov 2024 01:33:44 +0000 (17:33 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 18 Dec 2024 22:19:39 +0000 (14:19 -0800)
commit59cb3acdb316130c7247a3d3a20d7d6e75e2896a
tree945db241cc1a388227d3a6ec7eeebc641383107f
parent7b2658cb33c744ca41358ada2421a86774914764
KVM: selftests: Update x86's KVM PV test to match KVM's disabling exits behavior

Rework x86's KVM PV features test to align with KVM's new, fixed behavior
of not allowing userspace to disable HLT-exiting after vCPUs have been
created.  Rework the core testcase to disable HLT-exiting before creating
a vCPU, and opportunistically modify keep the paired VM+vCPU creation to
verify that KVM rejects KVM_CAP_X86_DISABLE_EXITS as expected.

Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20241128013424.4096668-18-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/x86/kvm_pv_test.c