Re: [PATCH v13 08/14] x86/mm: global ASID context switch & TLB flush handling

Rik van Riel
2025-02-24T01:26:26Z

On Mon, 2025-02-24 at 07:08 +0800, kernel test robot wrote:
>
> All errors (new ones prefixed by >>):
>
>    In file included from <command-line>:
>    arch/x86/include/asm/tlbflush.h: In function 'in_asid_transition':
> > > arch/x86/include/asm/tlbflush.h:253:43: error: 'mm_context_t' has
> > > no member named 'asid_transition'
>      253 |         return mm && READ_ONCE(mm-
> >context.asid_transition);
>          |                                           ^

Looks like this one needs to be moved under
the #ifdef, too.

Short-circuiting the build by hard-disabling
X86_FEATURE_INVLPGB, or even adding an explicit
if(!IS_ENABLED(CONFIG_X86_BROADCAST_TLB_FLUSH))
is not enough to get the compiler to short-circuit
the rest of the code in that function.

We might need an #ifdef inside destroy_context_free_global_asid
as well, no good way to move that one into a .h file without
making the global asid data structures in tlb.c visible to
the entire kernel instead of keeping them static in tlb.c

--
All Rights Reversed.