KVM: selftests: Skip tests that require EPT when it is not available
authorDavid Matlack <dmatlack@google.com>
Mon, 26 Sep 2022 17:14:57 +0000 (10:14 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 27 Sep 2022 11:58:03 +0000 (07:58 -0400)
commit0f816e024f2fb5a52ebd42daf07233a5b45c25dd
tree2855a2546f5ecc71fe277421daa9b5bf2693c928
parent69604fe76e58c9d195e48b41d019b07fc27ce9d7
KVM: selftests: Skip tests that require EPT when it is not available

Skip selftests that require EPT support in the VM when it is not
available. For example, if running on a machine where kvm_intel.ept=N
since KVM does not offer EPT support to guests if EPT is not supported
on the host.

This commit causes vmx_dirty_log_test to be skipped instead of failing
on hosts where kvm_intel.ept=N.

Signed-off-by: David Matlack <dmatlack@google.com>
Message-Id: <20220926171457.532542-1-dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/include/x86_64/vmx.h
tools/testing/selftests/kvm/lib/x86_64/vmx.c