Skip to content

Commit cd1be30

Browse files
ea1davisbonzini
authored andcommitted
KVM: VMX: use __always_inline for is_td_vcpu and is_td
is_td() and is_td_vcpu() are used in no-instrumentation sections; use __always_inline instead of inline. vmlinux.o: error: objtool: vmx_handle_nmi+0x47: call to is_td_vcpu.isra.0() leaves .noinstr.text section Fixes: 7172c75 ("KVM: VMX: Move common fields of struct vcpu_{vmx,tdx} to a struct") Signed-off-by: Edward Adam Davis <[email protected]> Message-ID: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent e9f1703 commit cd1be30

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/kvm/vmx/common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ static __always_inline bool is_td_vcpu(struct kvm_vcpu *vcpu)
7171

7272
#else
7373

74-
static inline bool is_td(struct kvm *kvm) { return false; }
75-
static inline bool is_td_vcpu(struct kvm_vcpu *vcpu) { return false; }
74+
static __always_inline bool is_td(struct kvm *kvm) { return false; }
75+
static __always_inline bool is_td_vcpu(struct kvm_vcpu *vcpu) { return false; }
7676

7777
#endif
7878

0 commit comments

Comments
 (0)