Re: [PATCH v3 1/7] x86/cpu: Use a new feature flag for 5 level paging
From: David Laight
Date: Sat May 17 2025 - 12:59:53 EST
On Thu, 15 May 2025 14:33:50 +0100
Ard Biesheuvel <ardb@xxxxxxxxxx> wrote:
> On Thu, 15 May 2025 at 14:11, Borislav Petkov <bp@xxxxxxxxx> wrote:
> >
> > On Wed, May 14, 2025 at 12:42:44PM +0200, Ard Biesheuvel wrote:
> > > From: Ard Biesheuvel <ardb@xxxxxxxxxx>
> > >
> > > Currently, the LA57 CPU feature flag is taken to mean two different
> > > things at once:
> > > - whether the CPU implements the LA57 extension, and is therefore
> > > capable of supporting 5 level paging;
> > > - whether 5 level paging is currently in use.
> >
> > Btw, that gunk:
> >
> > We had started simplifying the whole 5-level crap:
> >
> > https://lore.kernel.org/all/20240621164406.256314-1-kirill.shutemov@xxxxxxxxxxxxxxx/
> >
> > Shivank, I hear the performance issues got resolved in the meantime?
> >
>
> It would be interesting to know whether CONFIG_X86_5LEVEL=n deviates
> from CONFIG_X86_5LEVEL=y with 'no5lvl' on the command line. If passing
> 'no5lvl' makes up for the performance hit, then I don't think the
> performance issues should stop us from removing this Kconfig symbol.
You might then want a Kconfig option to invert the default for the
command line option (and an inverted command line option).
David