Skip to content

Commit 7f4b5cd

Browse files
jpoimboebonzini
authored andcommitted
kvm: Disable objtool frame pointer checking for vmenter.S
Frame pointers are completely broken by vmenter.S because it clobbers RBP: arch/x86/kvm/svm/vmenter.o: warning: objtool: __svm_vcpu_run()+0xe4: BP used as a scratch register That's unavoidable, so just skip checking that file when frame pointers are configured in. On the other hand, ORC can handle that code just fine, so leave objtool enabled in the !FRAME_POINTER case. Reported-by: Randy Dunlap <[email protected]> Signed-off-by: Josh Poimboeuf <[email protected]> Message-Id: <01fae42917bacad18be8d2cbc771353da6603473.1587398610.git.jpoimboe@redhat.com> Tested-by: Randy Dunlap <[email protected]> # build-tested Fixes: 199cd1d ("KVM: SVM: Split svm_vcpu_run inline assembly to separate file") Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 2ca1a06 commit 7f4b5cd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/x86/kvm/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
ccflags-y += -Iarch/x86/kvm
44
ccflags-$(CONFIG_KVM_WERROR) += -Werror
55

6+
ifeq ($(CONFIG_FRAME_POINTER),y)
7+
OBJECT_FILES_NON_STANDARD_vmenter.o := y
8+
endif
9+
610
KVM := ../../../virt/kvm
711

812
kvm-y += $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o \

0 commit comments

Comments
 (0)