[PATCH v2 07/24] x86/kvm: Always inline to_svm()

From: Peter Zijlstra
Date: Thu Jun 24 2021 - 05:55:55 EST


vmlinux.o: warning: objtool: svm_vcpu_enter_exit()+0x13: call to to_svm() leaves .noinstr.text section

Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
---
arch/x86/kvm/svm/svm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kvm/svm/svm.h
+++ b/arch/x86/kvm/svm/svm.h
@@ -252,7 +252,7 @@ static inline bool vmcb_is_dirty(struct
return !test_bit(bit, (unsigned long *)&vmcb->control.clean);
}

-static inline struct vcpu_svm *to_svm(struct kvm_vcpu *vcpu)
+static __always_inline struct vcpu_svm *to_svm(struct kvm_vcpu *vcpu)
{
return container_of(vcpu, struct vcpu_svm, vcpu);
}