Re: [PATCH] kvm: add proper frame pointer logic for vmx

From: Paolo Bonzini
Date: Tue Jan 15 2019 - 02:14:51 EST


On 15/01/19 08:04, Qian Cai wrote:
>
>
> On 1/15/19 1:44 AM, Qian Cai wrote:
>> compilation warning since v5.0-rc1,
>>
>> arch/x86/kvm/vmx/vmx.o: warning: objtool: vmx_vcpu_run.part.17()+0x3171:
>> call without frame pointer save/setup
>>
>> Fixes: 453eafbe65f (KVM: VMX: Move VM-Enter + VM-Exit handling to
>> non-inline sub-routines)
>
> Oops, wrong fix. Back to square one.
>

Hmm, maybe like this:

diff --git a/arch/x86/kvm/vmx/vmenter.S b/arch/x86/kvm/vmx/vmenter.S
index bcef2c7e9bc4..33122fa9d4bd 100644
--- a/arch/x86/kvm/vmx/vmenter.S
+++ b/arch/x86/kvm/vmx/vmenter.S
@@ -26,19 +26,17 @@ ENTRY(vmx_vmenter)
ret

2: vmlaunch
+3:
ret

-3: cmpb $0, kvm_rebooting
- jne 4f
- call kvm_spurious_fault
-4: ret
-
.pushsection .fixup, "ax"
-5: jmp 3b
+4: cmpb $0, kvm_rebooting
+ jne 3b
+ jmp kvm_spurious_fault
.popsection

- _ASM_EXTABLE(1b, 5b)
- _ASM_EXTABLE(2b, 5b)
+ _ASM_EXTABLE(1b, 4b)
+ _ASM_EXTABLE(2b, 4b)

ENDPROC(vmx_vmenter)


Paolo