OSDN Git Service

x86/kvm: Always inline to_svm()
authorPeter Zijlstra <peterz@infradead.org>
Thu, 24 Jun 2021 09:41:06 +0000 (11:41 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 15 Sep 2021 13:51:46 +0000 (15:51 +0200)
vmlinux.o: warning: objtool: svm_vcpu_enter_exit()+0x13: call to to_svm() leaves .noinstr.text section

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210624095148.066347165@infradead.org
arch/x86/kvm/svm/svm.h

index 408031a..38f12a6 100644 (file)
@@ -271,7 +271,7 @@ static inline bool vmcb_is_dirty(struct vmcb *vmcb, int bit)
         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);
 }