On Wed, Oct 10, 2018 at 11:04:14AM +0800, Feng Tang wrote: > commit 05ab1d8a4b36ee912b7087c6da127439ed0a903e upstream > > We met a kernel panic when enabling earlycon, which is due to the fixmap > address of earlycon is not statically setup. > > Currently the static fixmap setup in head_64.S only covers 2M virtual > address space, while it actually could be in 4M space with different > kernel configurations, e.g. when VSYSCALL emulation is disabled. > > So increase the static space to 4M for now by defining FIXMAP_PMD_NUM to 2, > and add a build time check to ensure that the fixmap is covered by the > initial static page tables. > > Fixes: 1ad83c858c7d ("x86_64,vsyscall: Make vsyscall emulation configurable") > Suggested-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx> > Signed-off-by: Feng Tang <feng.tang@xxxxxxxxx> > Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx> > Cc: <stable@xxxxxxxxxxxxxxx> # v4.9 > Cc: Juergen Gross <jgross@xxxxxxxx> > Cc: H Peter Anvin <hpa@xxxxxxxxxxxxxxx> > Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> > Cc: Michal Hocko <mhocko@xxxxxxxxxx> > Cc: Yinghai Lu <yinghai@xxxxxxxxxx> > Cc: Dave Hansen <dave.hansen@xxxxxxxxx> > Cc: Andi Kleen <ak@xxxxxxxxxxxxxxx> > Cc: Andy Lutomirsky <luto@xxxxxxxxxx> > --- > arch/x86/include/asm/fixmap.h | 10 ++++++++++ > arch/x86/include/asm/pgtable_64.h | 3 ++- > arch/x86/kernel/head_64.S | 16 ++++++++++++---- > arch/x86/mm/pgtable.c | 9 +++++++++ > arch/x86/xen/mmu.c | 8 ++++++-- > 5 files changed, 39 insertions(+), 7 deletions(-) > Now applied, thanks. greg k-h