]> Git Repo - linux.git/commitdiff
kvm: Disable objtool frame pointer checking for vmenter.S
authorJosh Poimboeuf <[email protected]>
Mon, 20 Apr 2020 16:17:37 +0000 (11:17 -0500)
committerPaolo Bonzini <[email protected]>
Mon, 20 Apr 2020 21:11:19 +0000 (17:11 -0400)
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[email protected]>
Tested-by: Randy Dunlap <[email protected]> # build-tested
Fixes: 199cd1d7b534 ("KVM: SVM: Split svm_vcpu_run inline assembly to separate file")
Signed-off-by: Paolo Bonzini <[email protected]>
arch/x86/kvm/Makefile

index a789759b7261339312e9074320ff5c72dcd02820..4a3081e9f4b5de97c4b90c1858284731088778ce 100644 (file)
@@ -3,6 +3,10 @@
 ccflags-y += -Iarch/x86/kvm
 ccflags-$(CONFIG_KVM_WERROR) += -Werror
 
+ifeq ($(CONFIG_FRAME_POINTER),y)
+OBJECT_FILES_NON_STANDARD_vmenter.o := y
+endif
+
 KVM := ../../../virt/kvm
 
 kvm-y                  += $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o \
This page took 0.052235 seconds and 4 git commands to generate.