summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2023-02-06 16:07:14 -0600
committerLouis Burda <quent.burda@gmail.com>2023-02-06 16:07:14 -0600
commit93ddfc5c264338ed8c8e7cb0940e2c9c70e5b64c (patch)
tree23d2f2d692ef2b93a8e1f5b70bc652dd8b78b6a9
parentc12f2b990c7dd7cd6c36e50b0aa71bfad95b4188 (diff)
downloadcachepc-linux-93ddfc5c264338ed8c8e7cb0940e2c9c70e5b64c.tar.gz
cachepc-linux-93ddfc5c264338ed8c8e7cb0940e2c9c70e5b64c.zip
Set interrupt flag after prime / clear before probe in vmenter
-rw-r--r--arch/x86/kvm/svm/vmenter.S21
1 files 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