Re: [PATCH 1/3] x86/boot: Add bit fields into xloadflags for 5-level kernel checking

2018-09-03 Thread Baoquan He
On 09/03/18 at 09:13pm, H. Peter Anvin wrote: > 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 > > i

Re: [PATCH 1/3] x86/boot: Add bit fields into xloadflags for 5-level kernel checking

2018-09-03 Thread H. Peter Anvin
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

Re: [PATCH 1/3] x86/boot: Add bit fields into xloadflags for 5-level kernel checking

2018-09-03 Thread Baoquan He
Hi hpa, Thanks for looking into this. On 09/03/18 at 07:41pm, H. Peter Anvin wrote: > I don't understand why there is any reason not to always enter the target > kernel in 4-level mode. There certainly is no point whatsoever in having two > xloadflags: the only thing that could possibly matter