Re: [PATCH] x86/boot/compressed/64: Do not corrupt EDX on EFER.LME=1 setting
From: Borislav Petkov
Date: Wed Feb 06 2019 - 10:21:55 EST
On Wed, Feb 06, 2019 at 02:52:53PM +0300, Kirill A. Shutemov wrote:
> RDMSR in the trampoline code overrides EDX, but we use the register to
> indicate if 5-level paging has to enabled. It leads to failure to boot
> on a 5-level paging machine.
>
> Preserve EDX on the stack while we are dealing with EFER.
Comment says:
* Non zero RDX on return means we need to enable 5-level paging.
Is that per-chance refering to struct paging_config which
paging_prepare() returns and on that return rdx contains
paging_config.l5_required which is 1 when 5 level is to be enabled?
If so, is that written somewhere explicitly? Because it is not
immediately clear at least to me why that RDX is live...
Thx.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.