Skip to content
This repository has been archived by the owner on Dec 30, 2020. It is now read-only.

Commit

Permalink
x86/kvm: Replace vmx_vmenter()'s call to kvm_spurious_fault() with UD2
Browse files Browse the repository at this point in the history
Objtool reports the following:

  arch/x86/kvm/vmx/vmenter.o: warning: objtool: vmx_vmenter()+0x14: call without frame pointer save/setup

But frame pointers are necessarily broken anyway, because
__vmx_vcpu_run() clobbers RBP with the guest's value before calling
vmx_vmenter().  So calling without a frame pointer doesn't make things
any worse.

Make objtool happy by changing the call to a UD2.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://lkml.kernel.org/r/9fc2216c9dc972f95bb65ce2966a682c6bda1cb0.1563413318.git.jpoimboe@redhat.com
  • Loading branch information
jpoimboe authored and KAGA-KOKO committed Jul 18, 2019
1 parent d99a6ce commit 19f2d8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/x86/kvm/vmx/vmenter.S
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ ENTRY(vmx_vmenter)
ret

3: cmpb $0, kvm_rebooting
jne 4f
call kvm_spurious_fault
4: ret
je 4f
ret
4: ud2

.pushsection .fixup, "ax"
5: jmp 3b
Expand Down

0 comments on commit 19f2d8f

Please sign in to comment.