[PATCH v3 01/22] x86/paravirt: Mark native pv_ops helpers notrace

Song Liu song at kernel.org
Tue Dec 1 13:45:54 PST 2026


On Tue, Dec 1, 2026 at 12:46 AM Peter Zijlstra <peterz at infradead.org> wrote:
>
> On Mon, Nov 30, 2026 at 08:21:40PM -0800, Song Liu wrote:
> > The native implementations of several pv_ops are static inline functions
> > in headers. pv_ops stores their address, so with CONFIG_PARAVIRT_XXL the
> > compiler emits an out-of-line copy of each one, and pv_ops calls go to
> > that copy. Today these copies are not traced only because the inline
> > macro implies notrace.
> >
> > Some callers of these helpers must not be traced:
> > restore_processor_state() is notrace and runs during resume,
> > __switch_to() is __notrace_funcgraph, and arch/x86/kernel/cpu/common.c
> > and arch/x86/kernel/tsc.c, which call several of them, are built
> > without -pg.
> >
> > Mark these helpers notrace explicitly, like native_write_msr() and
> > native_write_msr_safe() already are, so they stay untraced if inline no
> > longer implies notrace. No functional change.
>
> I must say.. I hate this with a passion. This is unmaintainable garbage.

For these header files, shall we just s/inline/__always_inline/g?

Thanks,
Song



More information about the linux-arm-kernel mailing list