]> Git Repo - linux.git/commitdiff
KVM: SVM: Create a stack frame in __svm_sev_es_vcpu_run()
authorSean Christopherson <[email protected]>
Fri, 23 Feb 2024 20:42:32 +0000 (12:42 -0800)
committerSean Christopherson <[email protected]>
Tue, 9 Apr 2024 17:21:10 +0000 (10:21 -0700)
Now that KVM uses the host save area to context switch RBP, i.e.
preserves RBP for the entirety of __svm_sev_es_vcpu_run(), create a stack
frame using the standared FRAME_{BEGIN,END} macros.

Note, __svm_sev_es_vcpu_run() is subtly not a leaf function as it can call
into ibpb_feature() via UNTRAIN_RET_VM.

Reviewed-by: Tom Lendacky <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
arch/x86/kvm/svm/vmenter.S

index d1613395dd393565af20e893aa49e531a6e70899..a0c8eb37d3e1c62dc4390e6b61ccbbeff6845bff 100644 (file)
@@ -3,6 +3,7 @@
 #include <asm/asm.h>
 #include <asm/asm-offsets.h>
 #include <asm/bitsperlong.h>
+#include <asm/frame.h>
 #include <asm/kvm_vcpu_regs.h>
 #include <asm/nospec-branch.h>
 #include "kvm-asm-offsets.h"
@@ -312,6 +313,8 @@ SYM_FUNC_END(__svm_vcpu_run)
  * @spec_ctrl_intercepted: bool
  */
 SYM_FUNC_START(__svm_sev_es_vcpu_run)
+       FRAME_BEGIN
+
        /*
         * Save non-volatile (callee-saved) registers to the host save area.
         * Except for RAX and RSP, all GPRs are restored on #VMEXIT, but not
@@ -362,6 +365,7 @@ SYM_FUNC_START(__svm_sev_es_vcpu_run)
         */
        UNTRAIN_RET_VM
 
+       FRAME_END
        RET
 
        RESTORE_GUEST_SPEC_CTRL_BODY
This page took 0.059708 seconds and 4 git commands to generate.