OSDN Git Service

target/arm: Honor TCR_ELx.{I}PS
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 1 Mar 2022 21:59:47 +0000 (11:59 -1000)
committerPeter Maydell <peter.maydell@linaro.org>
Wed, 2 Mar 2022 19:27:36 +0000 (19:27 +0000)
commitf4ecc01537684a4125c35433f3097295d0a1f839
treeef4829b288da0e4c5332e58e34b95f4adcb4b33a
parentd06449f2eb555896057ee047b3009a3616d52028
target/arm: Honor TCR_ELx.{I}PS

This field controls the output (intermediate) physical address size
of the translation process.  V8 requires to raise an AddressSize
fault if the page tables are programmed incorrectly, such that any
intermediate descriptor address, or the final translated address,
is out of range.

Add a PS field to ARMVAParameters, and properly compute outputsize
in get_phys_addr_lpae.  Test the descaddr as extracted from TTBR
and from page table entries.

Restrict descaddrmask so that we won't raise the fault for v7.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220301215958.157011-8-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/helper.c
target/arm/internals.h