Hi Richard, On 12/9/21 00:11, Richard Henderson wrote: > 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. >
I'd split this patch as: > Add an outputsize field to ARMVAParameters, ^ 1 > and fill it in during > aa64_va_parameters. ^2 > Pass the value to check_s2_mmu_setup to use > instead of the raw PAMax value. ^1 > Test the descaddr as extracted > from TTBR and from page table entries. ^2 > Restrict descaddrmask so that we won't raise the fault for v7. ^ could be in 1 (simpler) or 2 if you think it makes sense. This way #1 is a preliminary refactor/cleanup, and #2 is only the ps field and V8 addition. > Signed-off-by: Richard Henderson <richard.hender...@linaro.org> > --- > target/arm/internals.h | 1 + > target/arm/helper.c | 92 +++++++++++++++++++++++++++++------------- > 2 files changed, 65 insertions(+), 28 deletions(-)