[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4546fc39-4982-4c91-c812-0df1e9bc9e20@zytor.com>
Date: Mon, 3 Sep 2018 21:13:54 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Baoquan He <bhe@...hat.com>
Cc: tglx@...utronix.de, mingo@...nel.org,
kirill.shutemov@...ux.intel.com, x86@...nel.org,
linux-kernel@...r.kernel.org, kexec@...ts.infradead.org
Subject: Re: [PATCH 1/3] x86/boot: Add bit fields into xloadflags for 5-level
kernel checking
On 09/03/18 20:44, Baoquan He wrote:
>
> 1) in arch/x86/kernel/relocate_kernel_64.S, we set X86_CR4_LA57 into cr4
> if the 1st kernel is in 5-level mode. Then in
> arch/x86/boot/compressed/head_64.S, paging_prepare() is called to decide
> if 5-level mode will be enabled, and prepare the trampoline. If
> kexec/kdump kernel is expected to be in 4-level, e.g with 'nolv5'
> specified, it still can handle well. But for the old kernel w/o these
> 5-level codes, it will ignore the fact that X86_CR4_LA57 has been set
> in CR4 and proceed anyway, then #GP is triggered. That's why XLF_5LEVEL
> is used to mark.
>
That's what I'm saying, don't do that. Always jump into the second kernel in
4-level mode, i.e. X86_CR4_LA57 unset. That's the only sane thing.
-hpa
Powered by blists - more mailing lists