]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: selftests: Re-enable hyperv_evmcs/hyperv_svm_test on bare metal
authorVitaly Kuznetsov <vkuznets@redhat.com>
Fri, 16 Aug 2024 13:01:39 +0000 (15:01 +0200)
committerSean Christopherson <seanjc@google.com>
Thu, 22 Aug 2024 19:14:42 +0000 (12:14 -0700)
commitd8414067cc17bd2070e6667763124754e2932251
tree3ba9611a62e3187e12d3ddb5afb5c32a621285eb
parent24a7e944966cc8a285e6581dcc98edebeee76c97
KVM: selftests: Re-enable hyperv_evmcs/hyperv_svm_test on bare metal

KVM_CAP_HYPERV_DIRECT_TLBFLUSH is only reported when KVM runs on top of
Hyper-V and hyperv_evmcs/hyperv_svm_test don't need that, these tests check
that the feature is properly emulated for Hyper-V on KVM guests. There's no
corresponding CAP for that, the feature is reported in
KVM_GET_SUPPORTED_HV_CPUID.

Hyper-V specific CPUIDs are not reported by KVM_GET_SUPPORTED_CPUID,
implement dedicated kvm_hv_cpu_has() helper to do the job.

Fixes: 6dac1195181c ("KVM: selftests: Make Hyper-V tests explicitly require KVM Hyper-V support")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Link: https://lore.kernel.org/r/20240816130139.286246-3-vkuznets@redhat.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/include/x86_64/hyperv.h
tools/testing/selftests/kvm/lib/x86_64/hyperv.c
tools/testing/selftests/kvm/x86_64/hyperv_evmcs.c
tools/testing/selftests/kvm/x86_64/hyperv_svm_test.c