unicorn/qemu/target/arm
Peter Maydell 4abcf14b52
target/arm: Handle small regions in get_phys_addr_pmsav8()
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.

Backports commit 720424359917887c926a33d248131fbff84c9c28 from qemu
2018-07-03 00:55:37 -04:00
..
arm_ldst.h
arm-powerctl.c
arm-powerctl.h
cpu64.c target/arm: Enable ARM_FEATURE_V8_ATOMICS for user-only 2018-05-14 08:29:59 -04:00
cpu-qom.h target/arm: Add "-cpu max" support 2018-03-12 10:11:49 -04:00
cpu.c target/arm: Introduce ARM_FEATURE_M_MAIN 2018-06-29 14:14:18 -05:00
cpu.h target/arm: Introduce ARM_FEATURE_M_MAIN 2018-06-29 14:14:18 -05:00
crypto_helper.c target/arm/cpu and crypto_helper: Correct bad merge and adjust to qemu code style 2018-03-12 11:57:24 -04:00
helper-a64.c tcg: Fix helper function vs host abi for float16 2018-06-02 10:10:12 -04:00
helper-a64.h target/arm: Implement FCMP for fp16 2018-05-15 22:24:39 -04:00
helper-sve.h target/arm: Implement SVE Floating Point Arithmetic - Unpredicated Group 2018-06-15 14:10:16 -04:00
helper.c target/arm: Handle small regions in get_phys_addr_pmsav8() 2018-07-03 00:55:37 -04:00
helper.h target/arm: Implement SVE Floating Point Arithmetic - Unpredicated Group 2018-06-15 14:10:16 -04:00
internals.h target/arm: Add pre-EL change hooks 2018-04-26 09:21:54 -04:00
iwmmxt_helper.c
kvm-consts.h
Makefile.objs target/arm: Implement SVE predicate test 2018-05-20 01:16:16 -04:00
neon_helper.c
op_addsub.h
op_helper.c target/arm: Add pre-EL change hooks 2018-04-26 09:21:54 -04:00
psci.c
sve_helper.c target/arm: Implement SVE Integer Wide Immediate - Unpredicated Group 2018-06-15 14:05:11 -04:00
sve.decode target/arm: Implement SVE Floating Point Arithmetic - Unpredicated Group 2018-06-15 14:10:16 -04:00
translate-a64.c tcg: Pass tb and index to tcg_gen_exit_tb separately 2018-06-07 11:56:32 -04:00
translate-a64.h target/arm: Extend vec_reg_offset to larger sizes 2018-06-15 12:23:35 -04:00
translate-sve.c target/arm: Implement SVE Floating Point Arithmetic - Unpredicated Group 2018-06-15 14:10:16 -04:00
translate.c target/arm: Strict alignment for ARMv6-M and ARMv8-M Baseline 2018-06-29 14:15:33 -05:00
translate.h target/arm: convert conversion helpers to fpst/ahp_flag 2018-05-19 22:58:25 -04:00
unicorn_aarch64.c
unicorn_arm.c
unicorn.h
vec_helper.c target/arm: Implement SVE Floating Point Arithmetic - Unpredicated Group 2018-06-15 14:10:16 -04:00