Re: [PATCH v3 3/5] arch/x86/mm: Refactor cond_ibpb() to support other use cases

From: Thomas Gleixner
Date: Fri Apr 17 2020 - 09:07:42 EST


Balbir Singh <sblbir@xxxxxxxxxx> writes:
>
> /*
> - * Use bit 0 to mangle the TIF_SPEC_IB state into the mm pointer which is
> - * stored in cpu_tlb_state.last_user_mm_ibpb.
> + * Bits to mangle the TIF_SPEC_IB state into the mm pointer which is
> + * stored in cpu_tlb_state.last_user_mm_spec.
> */
> #define LAST_USER_MM_IBPB 0x1UL
> +#define LAST_USER_MM_SPEC_MASK (LAST_USER_MM_IBPB)
>
> /* Reinitialize tlbstate. */
> - this_cpu_write(cpu_tlbstate.last_user_mm_ibpb, LAST_USER_MM_IBPB);
> + this_cpu_write(cpu_tlbstate.last_user_mm_spec, LAST_USER_MM_IBPB);

Shouldn't that be LAST_USER_MM_MASK?

Thanks,

tglx