Skip to contentSkip to conversation

KVM: selftests: Actually emit forced emulation prefix for kvm_asm_safe_fep()

PATCH In review Sean Christopherson 1 participant 2 messages Jan 30, 2025 – Feb 15, 2025

Subsystems (3)
lore
Share & tools
lore

Sean Christopherson

author maintainer
#0 lore raw

PATCH 1/1 KVM: selftests: Actually emit forced emulation prefix for kvm_asm_safe_fep()

Use KVM_ASM_SAFE_FEP, not simply KVM_ASM_SAFE, for kvm_asm_safe_fep(), as the non-FEP version doesn't force emulation (stating the obvious). Note, there are currently no users of kvm_asm_safe_fep().

Fixes ab3b6a7de8df ("KVM: selftests: Add a forced emulation variation of KVM_ASM_SAFE()")
---
 tools/testing/selftests/kvm/include/x86/processor.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/kvm/include/x86/processor.h +1 -1
index e28c3e462fa7..61578f038aff 100644
@@ -1251,7 +1251,7 @@ void vm_install_exception_handler(struct kvm_vm *vm, int vector,
 	uint64_t ign_error_code;					\
 	uint8_t vector;							\
 									\
-	asm volatile(KVM_ASM_SAFE(insn)					\
+	asm volatile(KVM_ASM_SAFE_FEP(insn)				\
 		     : KVM_ASM_SAFE_OUTPUTS(vector, ign_error_code)	\
 		     : inputs						\
 		     : KVM_ASM_SAFE_CLOBBERS);				\

base-commit: eb723766b1030a23c38adf2348b7c3d1409d11f0

Signature · 1 line
2.48.1.262.g85cc9f2d1e-goog
author maintainer
#1 lore raw
Quoted 3 lines · Sean Christopherson

Use KVM_ASM_SAFE_FEP, not simply KVM_ASM_SAFE, for kvm_asm_safe_fep(), as the non-FEP version doesn't force emulation (stating the obvious). Note, there are currently no users of kvm_asm_safe_fep().

Applied to kvm-x86 selftests, thanks!

[1/1] KVM: selftests: Actually emit forced emulation prefix for kvm_asm_safe_fep()

      https://github.com/kvm-x86/linux/commit/89ea56a4043a

--
https://github.com/kvm-x86/linux/tree/next