From 93ddfc5c264338ed8c8e7cb0940e2c9c70e5b64c Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Mon, 6 Feb 2023 16:07:14 -0600 Subject: Set interrupt flag after prime / clear before probe in vmenter --- arch/x86/kvm/svm/vmenter.S | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/arch/x86/kvm/svm/vmenter.S b/arch/x86/kvm/svm/vmenter.S index 38c22fc9cab4..1a3e83e5a277 100644 --- 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 -- cgit v1.2.3-71-gd317