diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2020-06-10 15:58:47 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-06-11 12:35:18 -0400 |
commit | 7e464770a434f7e29bad4b2da7894d32775d6d6f (patch) | |
tree | 601c65e118aef068b13025529824edf901e749ff /tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c | |
parent | KVM: selftests: do not substitute SVM/VMX check with KVM_CAP_NESTED_STATE check (diff) | |
download | wireguard-linux-7e464770a434f7e29bad4b2da7894d32775d6d6f.tar.xz wireguard-linux-7e464770a434f7e29bad4b2da7894d32775d6d6f.zip |
KVM: selftests: Don't probe KVM_CAP_HYPERV_ENLIGHTENED_VMCS when nested VMX is unsupported
KVM_CAP_HYPERV_ENLIGHTENED_VMCS will be reported as supported even when
nested VMX is not, fix evmcs_test/hyperv_cpuid tests to check for both.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20200610135847.754289-3-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c')
-rw-r--r-- | tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c b/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c index 4a7967cca281..745b708c2d3b 100644 --- a/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c +++ b/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c @@ -170,7 +170,8 @@ int main(int argc, char *argv[]) case 1: break; case 2: - if (!kvm_check_cap(KVM_CAP_HYPERV_ENLIGHTENED_VMCS)) { + if (!nested_vmx_supported() || + !kvm_check_cap(KVM_CAP_HYPERV_ENLIGHTENED_VMCS)) { print_skip("Enlightened VMCS is unsupported"); continue; } |