Skip to content

Commit 00856e1

Browse files
committed
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>
1 parent 0326cc6 commit 00856e1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tools/testing/selftests/kvm/include/x86_64/processor.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
extern bool host_cpu_is_intel;
2424
extern bool host_cpu_is_amd;
2525

26+
/* Forced emulation prefix, used to invoke the emulator unconditionally. */
27+
#define KVM_FEP "ud2; .byte 'k', 'v', 'm';"
28+
2629
#define NMI_VECTOR 0x02
2730

2831
#define X86_EFLAGS_FIXED (1u << 1)

tools/testing/selftests/kvm/x86_64/userspace_msr_exit_test.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
#include "kvm_util.h"
1313
#include "vmx.h"
1414

15-
/* Forced emulation prefix, used to invoke the emulator unconditionally. */
16-
#define KVM_FEP "ud2; .byte 'k', 'v', 'm';"
1715
static bool fep_available;
1816

1917
#define MSR_NON_EXISTENT 0x474f4f00

0 commit comments

Comments
 (0)