[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250224121421.GEZ7xinWhjstV_xPU_@fat_crate.local>
Date: Mon, 24 Feb 2025 13:14:21 +0100
From: Borislav Petkov <bp@...en8.de>
To: Rik van Riel <riel@...riel.com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org, peterz@...radead.org,
dave.hansen@...ux.intel.com, zhengqi.arch@...edance.com,
nadav.amit@...il.com, thomas.lendacky@....com, kernel-team@...a.com,
linux-mm@...ck.org, akpm@...ux-foundation.org, jackmanb@...gle.com,
jannh@...gle.com, mhklinux@...look.com, andrew.cooper3@...rix.com,
Manali.Shukla@....com, mingo@...nel.org,
Dave Hansen <dave.hansen@...el.com>
Subject: Re: [PATCH v13 03/14] x86/mm: add INVLPGB support code
On Sun, Feb 23, 2025 at 02:48:53PM -0500, Rik van Riel wrote:
> Add invlpgb.h with the helper functions and definitions needed to use
"invlpgb.h" is stale now.
> diff --git a/arch/x86/include/asm/disabled-features.h b/arch/x86/include/asm/disabled-features.h
> index c492bdc97b05..95997caf0935 100644
> --- a/arch/x86/include/asm/disabled-features.h
> +++ b/arch/x86/include/asm/disabled-features.h
> @@ -129,6 +129,13 @@
> #define DISABLE_SEV_SNP (1 << (X86_FEATURE_SEV_SNP & 31))
> #endif
>
> +#ifdef CONFIG_X86_BROADCAST_TLB_FLUSH
> +#define DISABLE_INVLPGB 0
> +#else
> +/* Keep 32 bit kernels smaller by compiling out the INVLPGB code. */
No need for that comment.
> +#define DISABLE_INVLPGB (1 << (X86_FEATURE_INVLPGB & 31))
> +#endif
> +
> /*
> * Make sure to add features to the correct mask
> */
...
> +/* Wait for INVLPGB originated by this CPU to complete. */
> +static inline void __tlbsync(void)
> +{
> + cant_migrate();
I could use a comment above that one...
> + /* TLBSYNC: supported in binutils >= 0.36. */
> + asm volatile(".byte 0x0f, 0x01, 0xff" ::: "memory");
> +}
> +
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists