Skip to content

Commit

Permalink
KVM: VMX: Create a stack frame in vCPU-run
Browse files Browse the repository at this point in the history
...in preparation for moving to a proper assembly sub-routnine.
vCPU-run isn't a leaf function since it calls vmx_update_host_rsp()
and vmx_vmenter().  And since we need to save/restore RBP anyways,
unconditionally creating the frame costs a single MOV, i.e. don't
bother keying off CONFIG_FRAME_POINTER or using FRAME_BEGIN, etc...

Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Sean Christopherson authored and Paolo Bonzini committed Feb 20, 2019
1 parent c14f9dd commit 63c73aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kvm/vmx/vmx.c
Original file line number Diff line number Diff line change
@@ -6407,8 +6407,8 @@ static void __vmx_vcpu_run(struct kvm_vcpu *vcpu, struct vcpu_vmx *vmx)
write_cr2(vcpu->arch.cr2);

asm(
/* Store host registers */
"push %%" _ASM_BP " \n\t"
"mov %%" _ASM_SP ", %%" _ASM_BP " \n\t"

/*
* Save @regs, _ASM_ARG2 may be modified by vmx_update_host_rsp() and

0 comments on commit 63c73aa

Please sign in to comment.