]> git.ipfire.org Git - thirdparty/linux.git/commit
arm64: mm: add LPA2 and 5 level paging support to G-to-nG conversion
authorArd Biesheuvel <ardb@kernel.org>
Wed, 14 Feb 2024 12:29:18 +0000 (13:29 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 16 Feb 2024 12:42:39 +0000 (12:42 +0000)
commit2b6c8f96cc47eb1b41f7ebf28dfc2459c39f7fa9
tree2fa1b9722c08b73378422a64df19f3e0e244c388
parenta6bbf5d4d9d13509fd068de664238c16934962c6
arm64: mm: add LPA2 and 5 level paging support to G-to-nG conversion

Add support for 5 level paging in the G-to-nG routine that creates its
own temporary page tables to traverse the swapper page tables. Also add
support for running the 5 level configuration with the top level folded
at runtime, to support CPUs that do not implement the LPA2 extension.

While at it, wire up the level skipping logic so it will also trigger on
4 level configurations with LPA2 enabled at build time but not active at
runtime, as we'll fall back to 3 level paging in that case.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20240214122845.2033971-77-ardb+git@google.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/cpufeature.c
arch/arm64/mm/proc.S