unicorn/qemu/target-arm
Andrew Jones 92b1f22a45
target-arm: get_phys_addr_lpae: more xn control
This patch makes the following changes to the determination of
whether an address is executable, when translating addresses
using LPAE.

1. No longer assumes that PL0 can't execute when it can't read.
   It can in AArch64, a difference from AArch32.
2. Use va_size == 64 to determine we're in AArch64, rather than
   arm_feature(env, ARM_FEATURE_V8), which is insufficient.
3. Add additional XN determinants
   - NS && is_secure && (SCR & SCR_SIF)
   - WXN && (prot & PAGE_WRITE)
   - AArch64: (prot_PL0 & PAGE_WRITE)
   - AArch32: UWXN && (prot_PL0 & PAGE_WRITE)
   - XN determination should also work in secure mode (untested)
   - XN may even work in EL2 (currently impossible to test)
4. Cleans up the bloated PAGE_EXEC condition - by removing it.

The helper get_S1prot is introduced. It may even work in EL2,
when support for that comes, but, as the function name implies,
it only works for stage 1 translations.

Backports commit d8e052b387635639a6ba4a09a7874fd2f113b218 from qemu
2018-02-12 20:28:29 -05:00
..
arm_ldst.h import 2015-08-21 15:04:50 +08:00
cpu64.c target-arm: Add CPU property to disable AArch64 2018-02-12 13:56:44 -05:00
cpu-qom.h target-arm: Add ARMCPU secure property 2018-02-12 10:40:52 -05:00
cpu.c target-arm: Add CPU property to disable AArch64 2018-02-12 13:56:44 -05:00
cpu.h target-arm: Add 32/64-bit register sync 2018-02-12 14:57:20 -05:00
crypto_helper.c target-arm: crypto: fix BE host support 2018-02-12 10:40:52 -05:00
helper-a64.c target-arm: Store SPSR_EL1 state in banked_spsr[1] (SPSR_svc) 2018-02-12 16:36:44 -05:00
helper-a64.h import 2015-08-21 15:04:50 +08:00
helper.c target-arm: get_phys_addr_lpae: more xn control 2018-02-12 20:28:29 -05:00
helper.h rework code/block tracing 2016-01-22 19:07:50 -08:00
internals.h target-arm: Store SPSR_EL1 state in banked_spsr[1] (SPSR_svc) 2018-02-12 16:36:44 -05:00
iwmmxt_helper.c import 2015-08-21 15:04:50 +08:00
kvm-consts.h import 2015-08-21 15:04:50 +08:00
Makefile.objs delete sparc32_dma.h & arm-semi.c 2017-01-19 15:10:41 +08:00
neon_helper.c Arm support ported. (#736) 2017-01-23 23:30:57 +08:00
op_addsub.h import 2015-08-21 15:04:50 +08:00
op_helper.c target-arm: Add 32/64-bit register sync 2018-02-12 14:57:20 -05:00
psci.c import 2015-08-21 15:04:50 +08:00
translate-a64.c target-arm: A64: Avoid signed shifts in disas_ldst_pair() 2018-02-12 15:05:09 -05:00
translate.c target-arm: Avoid buffer overrun on UNPREDICTABLE ldrd/strd 2018-02-12 17:17:23 -05:00
translate.h target-arm: Define correct mmu_idx values and pass them in TB flags 2018-02-12 11:21:19 -05:00
unicorn_aarch64.c target-arm: make c13 cp regs banked (FCSEIDR, ...) 2018-02-12 10:40:51 -05:00
unicorn_arm.c fix conflicts 2017-03-30 12:23:24 +08:00
unicorn.h arm64eb: add support for ARM64 big endian. 2017-04-24 23:30:01 +08:00