KVM: selftests: Check that PV_UNHALT is cleared when HLT exiting is disabled
authorVitaly Kuznetsov <vkuznets@redhat.com>
Wed, 28 Feb 2024 10:18:37 +0000 (11:18 +0100)
committerSean Christopherson <seanjc@google.com>
Wed, 6 Mar 2024 17:59:20 +0000 (09:59 -0800)
commitc2585047c8e185b070ad5c7bd887ef59cee3941f
treee51636a923adc8efb93a2e1496c4307fe8d9f8e6
parent4736d85f0d18ad0469439a0ebc7ccb0cd94bd754
KVM: selftests: Check that PV_UNHALT is cleared when HLT exiting is disabled

KVM_FEATURE_PV_UNHALT is expected to get cleared from KVM PV feature CPUID
data when KVM_X86_DISABLE_EXITS_HLT is enabled. Add the corresponding test
to kvm_pv_test.

Note, the newly added code doesn't actually test KVM_FEATURE_PV_UNHALT and
KVM_X86_DISABLE_EXITS_HLT features.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Link: https://lore.kernel.org/r/20240228101837.93642-4-vkuznets@redhat.com
[sean: add and use vcpu_cpuid_has()]
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/include/x86_64/processor.h
tools/testing/selftests/kvm/x86_64/kvm_pv_test.c