diff options
author | Sean Christopherson <seanjc@google.com> | 2024-02-23 12:42:26 -0800 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2024-04-09 10:20:28 -0700 |
commit | 19597a71a0c8603f8c8599686ac9b0ff4b846716 (patch) | |
tree | 19770e08cf87ce7ef1a8a0accbc7361a5f8a0411 /arch/x86 | |
parent | 4710e4fc3e2afa6c092db2c65eef365b0836d6db (diff) | |
download | linux-stable-19597a71a0c8603f8c8599686ac9b0ff4b846716.tar.gz linux-stable-19597a71a0c8603f8c8599686ac9b0ff4b846716.tar.bz2 linux-stable-19597a71a0c8603f8c8599686ac9b0ff4b846716.zip |
KVM: SVM: Create a stack frame in __svm_vcpu_run() for unwinding
Unconditionally create a stack frame in __svm_vcpu_run() to play nice with
unwinding via frame pointers, at least until the point where RBP is loaded
with the guest's value. Don't bother conditioning the code on
CONFIG_FRAME_POINTER=y, as RBP needs to be saved and restored anyways (due
to it being clobbered with the guest's value); omitting the "MOV RSP, RBP"
is not worth the extra #ifdef.
Creating a stack frame will allow removing the OBJECT_FILES_NON_STANDARD
tag from vmenter.S once __svm_sev_es_vcpu_run() is fixed to not stomp all
over RBP for no reason.
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://lore.kernel.org/r/20240223204233.3337324-2-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/svm/vmenter.S | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm/vmenter.S b/arch/x86/kvm/svm/vmenter.S index 187018c424bf..82637abf0b7e 100644 --- a/arch/x86/kvm/svm/vmenter.S +++ b/arch/x86/kvm/svm/vmenter.S @@ -99,6 +99,7 @@ */ SYM_FUNC_START(__svm_vcpu_run) push %_ASM_BP + mov %_ASM_SP, %_ASM_BP #ifdef CONFIG_X86_64 push %r15 push %r14 |