x86/boot/compressed/64: Detect and handle 5-level paging at boot-time
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Mon, 4 Dec 2017 12:40:55 +0000 (15:40 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 7 Dec 2017 09:34:39 +0000 (10:34 +0100)
commit08529078d8d9adf689bf39cc38d53979a0869970
treedab963190b103c51410818ccc5396d8157189fef
parent947134d9b00f342415af7eddd42a5fce7262a1b9
x86/boot/compressed/64: Detect and handle 5-level paging at boot-time

Prerequisite for fixing the current problem of instantaneous reboots when a
5-level paging kernel is booted on 4-level paging hardware.

At the same time this change prepares the decompression code to boot-time
switching between 4- and 5-level paging.

[ tglx: Folded the GCC < 5 fix. ]

Fixes: 77ef56e4f0fb ("x86: Enable 5-level paging support via CONFIG_X86_5LEVEL=y")
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: stable@vger.kernel.org
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: linux-mm@kvack.org
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lkml.kernel.org/r/20171204124059.63515-2-kirill.shutemov@linux.intel.com
arch/x86/boot/compressed/Makefile
arch/x86/boot/compressed/head_64.S
arch/x86/boot/compressed/pgtable_64.c [new file with mode: 0644]