KVM: selftests: Assert in prepare_eptp() that nEPT is supported
authorDavid Matlack <dmatlack@google.com>
Wed, 16 Nov 2022 20:46:31 +0000 (12:46 -0800)
committerSean Christopherson <seanjc@google.com>
Thu, 17 Nov 2022 00:59:07 +0000 (16:59 -0800)
commit5c107f7085f45e071bbcf13006fffccd8e5de0e1
tree3f48203a822b60f2ee20f3b2744f3635d9f94b00
parentecb89a51724b3cd89c13ba7364e82f9879b68dcf
KVM: selftests: Assert in prepare_eptp() that nEPT is supported

Now that a VM isn't needed to check for nEPT support, assert that KVM
supports nEPT in prepare_eptp() instead of skipping the test, and push
the TEST_REQUIRE() check out to individual tests.  The require+assert are
somewhat redundant and will incur some amount of ongoing maintenance
burden, but placing the "require" logic in the test makes it easier to
find/understand a test's requirements and in this case, provides a very
strong hint that the test cares about nEPT.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: David Matlack <dmatlack@google.com>
Link: https://lore.kernel.org/r/20220927165209.930904-1-dmatlack@google.com
[sean: rebase on merged code, write changelog]
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/lib/x86_64/memstress.c
tools/testing/selftests/kvm/lib/x86_64/vmx.c
tools/testing/selftests/kvm/x86_64/vmx_dirty_log_test.c