]> Git Repo - J-linux.git/commitdiff
context_tracking: Tag context_tracking_enabled_this_cpu() __always_inline
authorSean Christopherson <[email protected]>
Mon, 17 Jun 2024 15:51:14 +0000 (08:51 -0700)
committerNeeraj Upadhyay <[email protected]>
Thu, 15 Aug 2024 16:00:43 +0000 (21:30 +0530)
Force context_tracking_enabled_this_cpu() to be inlined so that invoking
it from guest_context_enter_irqoff(), which KVM uses in non-instrumentable
code, doesn't unexpectedly leave a noinstr section.

  vmlinux.o: warning: objtool: vmx_vcpu_enter_exit+0x1c7: call to
    context_tracking_enabled_this_cpu() leaves .noinstr.text section
  vmlinux.o: warning: objtool: svm_vcpu_enter_exit+0x83: call to
    context_tracking_enabled_this_cpu() leaves .noinstr.text section

Note, the CONFIG_CONTEXT_TRACKING_USER=n stub is already __always_inline.

Signed-off-by: Sean Christopherson <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
Signed-off-by: Neeraj Upadhyay <[email protected]>
include/linux/context_tracking_state.h

index 0dbda59c9f37234ba75ec14386f75ef3fb460174..7b8433d5a8efe5bc0d7ff84fb22ea5de9a34d464 100644 (file)
@@ -113,7 +113,7 @@ static __always_inline bool context_tracking_enabled_cpu(int cpu)
        return context_tracking_enabled() && per_cpu(context_tracking.active, cpu);
 }
 
-static inline bool context_tracking_enabled_this_cpu(void)
+static __always_inline bool context_tracking_enabled_this_cpu(void)
 {
        return context_tracking_enabled() && __this_cpu_read(context_tracking.active);
 }
This page took 0.059029 seconds and 4 git commands to generate.