diff options
author | Sean Christopherson <seanjc@google.com> | 2024-01-10 00:02:45 +0100 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2024-01-31 00:29:43 +0100 |
commit | 00856e17da730299205270234cda30628ae53b92 (patch) | |
tree | df232f48211279e016e51bceeb4b1e8d78e37da7 /tools/testing/selftests/kvm/include | |
parent | KVM: selftests: Query module param to detect FEP in MSR filtering test (diff) | |
download | linux-00856e17da730299205270234cda30628ae53b92.tar.xz linux-00856e17da730299205270234cda30628ae53b92.zip |
KVM: selftests: Move KVM_FEP macro into common library header
Move the KVM_FEP definition, a.k.a. the KVM force emulation prefix, into
processor.h so that it can be used for other tests besides the MSR filter
test.
Tested-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Link: https://lore.kernel.org/r/20240109230250.424295-26-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/testing/selftests/kvm/include')
-rw-r--r-- | tools/testing/selftests/kvm/include/x86_64/processor.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/include/x86_64/processor.h b/tools/testing/selftests/kvm/include/x86_64/processor.h index d211cea188be..6be365ac2a85 100644 --- a/tools/testing/selftests/kvm/include/x86_64/processor.h +++ b/tools/testing/selftests/kvm/include/x86_64/processor.h @@ -23,6 +23,9 @@ extern bool host_cpu_is_intel; extern bool host_cpu_is_amd; +/* Forced emulation prefix, used to invoke the emulator unconditionally. */ +#define KVM_FEP "ud2; .byte 'k', 'v', 'm';" + #define NMI_VECTOR 0x02 #define X86_EFLAGS_FIXED (1u << 1) |