Re: [PATCH v7 6/9] x86/boot: Move mem_encrypt= parsing to the decompressor

From: Ard Biesheuvel
Date: Fri Mar 01 2024 - 18:46:28 EST


On Fri, 1 Mar 2024 at 20:17, Borislav Petkov <bp@xxxxxxxxx> wrote:
>
> On Tue, Feb 27, 2024 at 04:19:14PM +0100, Ard Biesheuvel wrote:
> > diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h
> > index 01d19fc22346..eeea058cf602 100644
> > --- a/arch/x86/include/uapi/asm/bootparam.h
> > +++ b/arch/x86/include/uapi/asm/bootparam.h
> > @@ -38,6 +38,7 @@
> > #define XLF_EFI_KEXEC (1<<4)
> > #define XLF_5LEVEL (1<<5)
> > #define XLF_5LEVEL_ENABLED (1<<6)
> > +#define XLF_MEM_ENCRYPTION (1<<7)
>
> Needs documenting in Documentation/arch/x86/boot.rst.
>

Ack.

> And yes, those 5LEVEL things are not documented either but I'm even
> questioning the justification for their existence. We'll see...
>

Yeah that seems unnecessary to me. They are only used by kexec, and
only for cases where you want to kexec a [much] older kernel that
cannot deal with 5-level paging at all. AFAICT 5-level support was
added in v4.13.

So I think we might be able to drop these entirely, no?