[PATCH] KVM: VMX: Avoid noinstr warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



vmlinux.o: warning: objtool: vmx_vcpu_enter_exit+0x2d8:
call to vmread_error_trampoline() leaves .noinstr.text section

Signed-off-by: Su Hui <suhui@xxxxxxxxxxxx>
---
 arch/x86/kvm/vmx/vmx_ops.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kvm/vmx/vmx_ops.h b/arch/x86/kvm/vmx/vmx_ops.h
index ce47dc265f89..54f86ce2ad60 100644
--- a/arch/x86/kvm/vmx/vmx_ops.h
+++ b/arch/x86/kvm/vmx/vmx_ops.h
@@ -112,6 +112,7 @@ static __always_inline unsigned long __vmcs_readl(unsigned long field)
 
 #else /* !CONFIG_CC_HAS_ASM_GOTO_OUTPUT */
 
+	instrumentation_begin();
 	asm volatile("1: vmread %2, %1\n\t"
 		     ".byte 0x3e\n\t" /* branch taken hint */
 		     "ja 3f\n\t"
@@ -139,6 +140,7 @@ static __always_inline unsigned long __vmcs_readl(unsigned long field)
 		     _ASM_EXTABLE_TYPE_REG(1b, 2b, EX_TYPE_ONE_REG, %1)
 
 		     : ASM_CALL_CONSTRAINT, "=&r"(value) : "r"(field) : "cc");
+	instrumentation_end();
 	return value;
 
 #endif /* CONFIG_CC_HAS_ASM_GOTO_OUTPUT */
-- 
2.30.2




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux