[PATCH v4 27/30] x86/tlb: Make __flush_tlb_local() noinstr-compliant
Sean Christopherson
seanjc at google.com
Tue Jan 14 13:24:21 PST 2025
On Tue, Jan 14, 2025, Valentin Schneider wrote:
> Later patches will require issuing a __flush_tlb_all() from noinstr code.
> This requires making both __flush_tlb_local() and __flush_tlb_global()
> noinstr-compliant.
>
> For __flush_tlb_local(), xen_flush_tlb() has already been made noinstr, so
> it's just native_flush_tlb_global(), and simply __always_inline'ing
> invalidate_user_asid() gets us there
>
> Signed-off-by: Valentin Schneider <vschneid at redhat.com>
> ---
...
> @@ -1206,7 +1206,7 @@ STATIC_NOPV noinstr void native_flush_tlb_global(void)
> /*
> * Flush the entire current user mapping
> */
> -STATIC_NOPV void native_flush_tlb_local(void)
> +STATIC_NOPV noinstr void native_flush_tlb_local(void)
native_write_cr3() and __native_read_cr3() need to be __always_inline.
vmlinux.o: warning: objtool: native_flush_tlb_local+0x8: call to __native_read_cr3() leaves .noinstr.text section
More information about the linux-riscv
mailing list