commit 93ddfc5c264338ed8c8e7cb0940e2c9c70e5b64c
parent c12f2b990c7dd7cd6c36e50b0aa71bfad95b4188
Author: Louis Burda <quent.burda@gmail.com>
Date: Mon, 6 Feb 2023 16:07:14 -0600
Set interrupt flag after prime / clear before probe in vmenter
Diffstat:
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/arch/x86/kvm/svm/vmenter.S b/arch/x86/kvm/svm/vmenter.S
@@ -179,16 +179,14 @@ SYM_FUNC_START(__svm_vcpu_run)
/* "POP" @vmcb to RAX. */
pop %_ASM_AX
- /* Enter guest mode */
- sti
-
-1:
wrap_prime sev_vcpu_run
- vmrun %_ASM_AX
- wrap_probe sev_vcpu_run
+ sti
+1: vmrun %_ASM_AX
2: cli
+ wrap_probe sev_vcpu_run
+
#ifdef CONFIG_RETPOLINE
/* IMPORTANT: Stuff the RSB immediately after VM-Exit, before RET! */
FILL_RETURN_BUFFER %_ASM_AX, RSB_CLEAR_LOOPS, X86_FEATURE_RETPOLINE
@@ -285,17 +283,14 @@ SYM_FUNC_START(__svm_sev_es_vcpu_run)
/* Move @vmcb to RAX. */
mov %_ASM_ARG1, %_ASM_AX
- /* Enter guest mode */
- sti
-
-1:
-
wrap_prime sev_es_vcpu_run
- vmrun %_ASM_AX
- wrap_probe sev_es_vcpu_run
+ sti
+1: vmrun %_ASM_AX
2: cli
+ wrap_probe sev_es_vcpu_run
+
#ifdef CONFIG_RETPOLINE
/* IMPORTANT: Stuff the RSB immediately after VM-Exit, before RET! */
FILL_RETURN_BUFFER %_ASM_AX, RSB_CLEAR_LOOPS, X86_FEATURE_RETPOLINE