Skip to contentSkip to conversation

KVM: SVM: Do not setup frame pointer in __svm_vcpu_run

PATCH Applied Uros Bizjak 2 participants 2 messages Apr 9, 2020 – Apr 15, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: SVM: Do not setup frame pointer in __svm_vcpu_run

__svm_vcpu_run is a leaf function and does not need a frame pointer. %rbp is also destroyed a few instructions later when guest registers are loaded.

---
 arch/x86/kvm/svm/vmenter.S | 1 -
 1 file changed, 1 deletion(-)
arch/x86/kvm/svm/vmenter.S +0 -1
index fa1af90067e9..c87119a7a0c9 100644
@@ -35,7 +35,6 @@
  */
 SYM_FUNC_START(__svm_vcpu_run)
 	push %_ASM_BP
-	mov  %_ASM_SP, %_ASM_BP
 #ifdef CONFIG_X86_64
 	push %r15
 	push %r14
Signature · 1 line
2.25.2
maintainer Applied
#1 lore raw
Quoted 16 lines · Uros Bizjak

__svm_vcpu_run is a leaf function and does not need a frame pointer. %rbp is also destroyed a few instructions later when guest registers are loaded.

---
 arch/x86/kvm/svm/vmenter.S | 1 -
 1 file changed, 1 deletion(-)
arch/x86/kvm/svm/vmenter.S +0 -0
index fa1af90067e9..c87119a7a0c9 100644

arch/x86/kvm/svm/vmenter.S line 40

Quoted 7 lines
arch/x86/kvm/svm/vmenter.S +0 -1
@@ -35,7 +35,6 @@
  */
 SYM_FUNC_START(__svm_vcpu_run)
 	push %_ASM_BP
-	mov  %_ASM_SP, %_ASM_BP
 #ifdef CONFIG_X86_64
 	push %r15
 	push %r14

Queued, thanks.

Paolo