KVM: selftests: Query module param to detect FEP in MSR filtering test
authorSean Christopherson <seanjc@google.com>
Tue, 9 Jan 2024 23:02:44 +0000 (15:02 -0800)
committerSean Christopherson <seanjc@google.com>
Tue, 30 Jan 2024 23:29:42 +0000 (15:29 -0800)
commit0326cc6b02c8e099bb6631168791924be097e1d9
treec8b98f3eb10ca12e5546d1727ae97429d3d0e399
parent45e4755c39fc2df55f58ea893615a7d45a0fbcc8
KVM: selftests: Query module param to detect FEP in MSR filtering test

Add a helper to detect KVM support for forced emulation by querying the
module param, and use the helper to detect support for the MSR filtering
test instead of throwing a noodle/NOP at KVM to see if it sticks.

Cc: Aaron Lewis <aaronlewis@google.com>
Tested-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Link: https://lore.kernel.org/r/20240109230250.424295-25-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/include/x86_64/processor.h
tools/testing/selftests/kvm/x86_64/userspace_msr_exit_test.c