x86/espfix: Add support for 5-level paging
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Thu, 30 Mar 2017 08:07:31 +0000 (11:07 +0300)
committerIngo Molnar <mingo@kernel.org>
Tue, 4 Apr 2017 06:22:34 +0000 (08:22 +0200)
commit1d33b219563fb9f7384c8c609c767cb6bfd44b8e
treeed3ad0eabe9922aa9c99f81879874f0d4d8b8ca0
parent5480bb61cfba5de23df59793527c3a37c0d2e247
x86/espfix: Add support for 5-level paging

We don't need extra virtual address space for ESPFIX, so it stays within
one PUD page table for both 4- and 5-level paging.

Redefining ESPFIX_BASE_ADDR using P4D_SHIFT instead of PGDIR_SHIFT would
make it stay in the same place regarding of paging mode.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arch@vger.kernel.org
Cc: linux-mm@kvack.org
Link: http://lkml.kernel.org/r/20170330080731.65421-8-kirill.shutemov@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/pgtable_64_types.h
arch/x86/kernel/espfix_64.c