mirror of https://gitee.com/openkylin/qemu.git
7204243599
Allow ARMv8M to handle small MPU and SAU region sizes, by making get_phys_add_pmsav8() set the page size to the 1 if the MPU or SAU region covers less than a TARGET_PAGE_SIZE. We choose to use a size of 1 because it makes no difference to the core code, and avoids having to track both the base and limit for SAU and MPU and then convert into an artificially restricted "page size" that the core code will then ignore. Since the core TCG code can'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.) We also retain an existing bug, where we ignored the possibility that the SAU region might not cover the entire page, in the case of executable regions. This is necessary because some currently-working guest code images rely on being able to execute from addresses which are covered by a page-sized MPU region but a smaller SAU region. We can remove this workaround if we ever support execution from small regions. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20180620130619.11362-4-peter.maydell@linaro.org |
||
---|---|---|
.. | ||
Makefile.objs | ||
arch_dump.c | ||
arm-powerctl.c | ||
arm-powerctl.h | ||
arm-semi.c | ||
arm_ldst.h | ||
cpu-qom.h | ||
cpu.c | ||
cpu.h | ||
cpu64.c | ||
crypto_helper.c | ||
gdbstub.c | ||
gdbstub64.c | ||
helper-a64.c | ||
helper-a64.h | ||
helper-sve.h | ||
helper.c | ||
helper.h | ||
idau.h | ||
internals.h | ||
iwmmxt_helper.c | ||
kvm-consts.h | ||
kvm-stub.c | ||
kvm.c | ||
kvm32.c | ||
kvm64.c | ||
kvm_arm.h | ||
machine.c | ||
monitor.c | ||
neon_helper.c | ||
op_addsub.h | ||
op_helper.c | ||
psci.c | ||
sve.decode | ||
sve_helper.c | ||
trace-events | ||
translate-a64.c | ||
translate-a64.h | ||
translate-sve.c | ||
translate.c | ||
translate.h | ||
vec_helper.c |