]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
x86/mm: Expand static page table for fixmap space
authorFeng Tang <feng.tang@intel.com>
Thu, 20 Sep 2018 02:58:28 +0000 (10:58 +0800)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:51:11 +0000 (19:51 -0600)
commit568823f94792a4bcf1aacc8b34043acad5384873
treed141db2a2a7d809843eca0120fbf162be8c66c4b
parentc396f867a770f084ec838b67c12bec0ed265b2e4
x86/mm: Expand static page table for fixmap space

BugLink: https://bugs.launchpad.net/bugs/1836287
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@linutronix.de>
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: kernel test robot <rong.a.chen@intel.com>
Reviewed-by: Juergen Gross <jgross@suse.com> (Xen parts)
Cc: H Peter Anvin <hpa@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Andy Lutomirsky <luto@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20180920025828.23699-1-feng.tang@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/x86/include/asm/fixmap.h
arch/x86/include/asm/pgtable_64.h
arch/x86/kernel/head64.c
arch/x86/kernel/head_64.S
arch/x86/mm/pgtable.c
arch/x86/xen/mmu_pv.c