diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2022-12-12 14:27:08 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2023-01-05 11:51:09 +0000 |
commit | 9e65f4e6da56e1c21af9f877e29d9db3a243b7f9 (patch) | |
tree | 2b80214c0b135d6feb1e8096a383c60954aabd3a /hw/misc | |
parent | cb9c6a8e5ad6a1f0ce164d352e3102df46986e22 (diff) | |
download | qemu-9e65f4e6da56e1c21af9f877e29d9db3a243b7f9.zip qemu-9e65f4e6da56e1c21af9f877e29d9db3a243b7f9.tar.gz qemu-9e65f4e6da56e1c21af9f877e29d9db3a243b7f9.tar.bz2 |
target/arm:Set lg_page_size to 0 if either S1 or S2 asks for it
In get_phys_addr_twostage() we set the lg_page_size of the result to
the maximum of the stage 1 and stage 2 page sizes. This works for
the case where we do want to create a TLB entry, because we know the
common TLB code only creates entries of the TARGET_PAGE_SIZE and
asking for a size larger than that only means that invalidations
invalidate the whole larger area. However, if lg_page_size is
smaller than TARGET_PAGE_SIZE this effectively means "don't create a
TLB entry"; in this case if either S1 or S2 said "this covers less
than a page and can't go in a TLB" then the final result also should
be marked that way. Set the resulting page size to 0 if either
stage asked for a less-than-a-page entry, and expand the comment
to explain what's going on.
This has no effect for VMSA because currently the VMSA lookup always
returns results that cover at least TARGET_PAGE_SIZE; however when we
add v8R support it will reuse this code path, and for v8R the S1 and
S2 results can be smaller than TARGET_PAGE_SIZE.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20221212142708.610090-1-peter.maydell@linaro.org
Diffstat (limited to 'hw/misc')
0 files changed, 0 insertions, 0 deletions