]> git.proxmox.com Git - mirror_qemu.git/commit
target/arm: Set page (region) size in get_phys_addr_pmsav7()
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 26 Jun 2018 16:50:41 +0000 (17:50 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 26 Jun 2018 16:50:41 +0000 (17:50 +0100)
commite5e40999b5e03567ef654546e3d448431643f8f3
tree6a21df55ce3a5ee1f2cbf78e60c2f3840f21e2c7
parent55df6fcf5476b44bc1b95554e686ab3e91d725c5
target/arm: Set page (region) size in get_phys_addr_pmsav7()

We want to handle small MPU region sizes for ARMv7M. To do this,
make get_phys_addr_pmsav7() set the page size to the region
size if it is less that TARGET_PAGE_SIZE, rather than working
only in TARGET_PAGE_SIZE chunks.

Since the core TCG code con't handle execution from small
MPU regions, we strip the exec permission from them so that
any execution attempts will cause an MPU exception, rather
than allowing it to end up with a cpu_abort() in
get_page_addr_code().

(The previous code's intention was to make any small page be
treated as having no permissions, but unfortunately errors
in the implementation meant that it didn't behave that way.
It's possible that some binaries using small regions were
accidentally working with our old behaviour and won't now.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20180620130619.11362-3-peter.maydell@linaro.org
target/arm/helper.c