arm64: Enable 52-bit virtual addressing for 4k and 16k granule configs
authorArd Biesheuvel <ardb@kernel.org>
Wed, 14 Feb 2024 12:29:26 +0000 (13:29 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 16 Feb 2024 12:42:42 +0000 (12:42 +0000)
commit352b0395b5053fca01b9dc60294235511f5f3d65
tree8bc84409047b7d43d616100e3f3edeeae696cec0
parent95e059b5db6082e62632f40434059759c7c1f6ed
arm64: Enable 52-bit virtual addressing for 4k and 16k granule configs

Update Kconfig to permit 4k and 16k granule configurations to be built
with 52-bit virtual addressing, now that all the prerequisites are in
place.

While at it, update the feature description so it matches on the
appropriate feature bits depending on the page size. For simplicity,
let's just keep ARM64_HAS_VA52 as the feature name.

Note that LPA2 based 52-bit virtual addressing requires 52-bit physical
addressing support to be enabled as well, as programming TCR.TxSZ to
values below 16 is not allowed unless TCR.DS is set, which is what
activates the 52-bit physical addressing support.

While supporting the converse (52-bit physical addressing without 52-bit
virtual addressing) would be possible in principle, let's keep things
simple, by only allowing these features to be enabled at the same time.

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