target/arm: Implement FEAT_LPA2
commitef56c2425e5f3e5f14ac080b5f037e5c36a0abdc
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 1 Mar 2022 21:59:56 +0000 (1 11:59 -1000)
committerPeter Maydell <peter.maydell@linaro.org>
Wed, 2 Mar 2022 19:27:37 +0000 (2 19:27 +0000)
treebe4229d6e5256d3be6309d2ebb145b6c7b9852aa
parentc20281b2a5048a220e09e98e002e6d3119f8c00b
target/arm: Implement FEAT_LPA2

This feature widens physical addresses (and intermediate physical
addresses for 2-stage translation) from 48 to 52 bits, when using
4k or 16k pages.

This introduces the DS bit to TCR_ELx, which is RES0 unless the
page size is enabled and supports LPA2, resulting in the effective
value of DS for a given table walk.  The DS bit changes the format
of the page table descriptor slightly, moving the PS field out to
TCR so that all pages have the same sharability and repurposing
those bits of the page table descriptor for the highest bits of
the output address.

Do not yet enable FEAT_LPA2; we need extra plumbing to avoid
tickling an old kernel bug.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220301215958.157011-17-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
docs/system/arm/emulation.rst
target/arm/cpu.h
target/arm/helper.c
target/arm/internals.h