]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: selftests: Extend vmx_set_nested_state_test to cover SVM
authorYosry Ahmed <yosry.ahmed@linux.dev>
Fri, 21 Nov 2025 20:48:03 +0000 (20:48 +0000)
committerSean Christopherson <seanjc@google.com>
Thu, 8 Jan 2026 20:54:19 +0000 (12:54 -0800)
commitca2eccb953fd33ef38701e33e660b21f7e84aa14
tree84732d86681a423c63310540d61a5236a58d64ee
parentbda6ae6f29664b659671f872a2adda3c1c2f5dd6
KVM: selftests: Extend vmx_set_nested_state_test to cover SVM

Add test cases for the validation checks in svm_set_nested_state(), and
allow the test to run with SVM as well as VMX. The SVM test also makes
sure that KVM_SET_NESTED_STATE accepts GIF being set or cleared if
EFER.SVME is cleared, verifying a recently fixed bug where GIF was
incorrectly expected to always be set when EFER.SVME is cleared.

Signed-off-by: Yosry Ahmed <yosry.ahmed@linux.dev>
Link: https://patch.msgid.link/20251121204803.991707-5-yosry.ahmed@linux.dev
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/Makefile.kvm
tools/testing/selftests/kvm/x86/nested_set_state_test.c [moved from tools/testing/selftests/kvm/x86/vmx_set_nested_state_test.c with 71% similarity]