KVM: selftests: Add global snapshot of kvm_is_forced_emulation_enabled()
authorSean Christopherson <seanjc@google.com>
Thu, 14 Mar 2024 18:54:56 +0000 (11:54 -0700)
committerSean Christopherson <seanjc@google.com>
Mon, 29 Apr 2024 19:50:43 +0000 (12:50 -0700)
commite1ff11525d3c52159a8f262c209e5b9a9ef84918
tree657db1214c9993c2c39026340030fb82551f7714
parent73369acd9fbdf6cbf3029cace886abcc626f46ad
KVM: selftests: Add global snapshot of kvm_is_forced_emulation_enabled()

Add a global snapshot of kvm_is_forced_emulation_enabled() and sync it to
all VMs by default so that core library code can force emulation, e.g. to
allow for easier testing of the intersections between emulation and other
features in KVM.

Link: https://lore.kernel.org/r/20240314185459.2439072-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/include/x86_64/kvm_util_arch.h
tools/testing/selftests/kvm/lib/x86_64/processor.c
tools/testing/selftests/kvm/x86_64/pmu_counters_test.c
tools/testing/selftests/kvm/x86_64/userspace_msr_exit_test.c