qemu-e2k/target/arm
Peter Maydell f2b4a98930 target/arm: Allow access to SPSR_hyp from hyp mode
Architecturally, the AArch32 MSR/MRS to/from banked register
instructions are UNPREDICTABLE for attempts to access a banked
register that the guest could access in a more direct way (e.g.
using this insn to access r8_fiq when already in FIQ mode).  QEMU has
chosen to UNDEF on all of these.

However, for the case of accessing SPSR_hyp from hyp mode, it turns
out that real hardware permits this, with the same effect as if the
guest had directly written to SPSR. Further, there is some
guest code out there that assumes it can do this, because it
happens to work on hardware: an example Cortex-R52 startup code
fragment uses this, and it got copied into various other places,
including Zephyr. Zephyr was fixed to not use this:
 https://github.com/zephyrproject-rtos/zephyr/issues/47330
but other examples are still out there, like the selftest
binary for the MPS3-AN536.

For convenience of being able to run guest code, permit
this UNPREDICTABLE access instead of UNDEFing it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20240206132931.38376-5-peter.maydell@linaro.org
2024-02-15 14:32:38 +00:00
..
hvf target/arm: Move GTimer definitions to new 'gtimer.h' header 2024-01-26 11:30:49 +00:00
tcg target/arm: Allow access to SPSR_hyp from hyp mode 2024-02-15 14:32:38 +00:00
arch_dump.c target/arm: Move feature test functions to their own header 2023-10-27 11:44:32 +01:00
arm-powerctl.c target/arm: Expose arm_cpu_mp_affinity() in 'multiprocessing.h' header 2024-01-26 11:30:48 +00:00
arm-powerctl.h
arm-qmp-cmds.c target: Use generic cpu_model_from_type() 2024-01-05 16:20:14 +01:00
common-semi-target.h target/arm/common-semi-target.h: Remove unnecessary boot.h include 2023-10-19 14:32:13 +01:00
cortex-regs.c
cpregs.h target/arm/cpregs: Include missing 'kvm-consts.h' header 2024-01-26 11:30:48 +00:00
cpu64.c target/arm/kvm: Have kvm_arm_sve_get_vls take a ARMCPU argument 2023-12-19 17:57:45 +00:00
cpu-features.h target/arm: Fix incorrect aa64_tidcp1 feature check 2024-01-26 12:20:03 +00:00
cpu-param.h target/arm: Replace TARGET_PAGE_ENTRY_EXTRA 2023-10-03 08:01:02 -07:00
cpu-qom.h target/arm: Move ARM_CPU_IRQ/FIQ definitions to 'cpu-qom.h' header 2024-01-26 11:30:49 +00:00
cpu.c tests/tcg: Fix multiarch/gdbstub/prot-none.py 2024-02-03 13:31:45 +00:00
cpu.h include/exec: Implement cpu_mmu_index generically 2024-02-03 16:46:10 +10:00
debug_helper.c target/arm: Mark up VNCR offsets (offsets 0x100..0x160) 2024-01-09 14:44:45 +00:00
gdbstub64.c
gdbstub.c target/arm: Move feature test functions to their own header 2023-10-27 11:44:32 +01:00
gtimer.h target/arm: Move GTimer definitions to new 'gtimer.h' header 2024-01-26 11:30:49 +00:00
helper.c target/arm: Use new CBAR encoding for all v8 CPUs, not all aarch64 CPUs 2024-02-15 14:32:38 +00:00
helper.h target/arm: Implement FEAT_TIDCP1 2023-09-08 16:41:35 +01:00
hvf_arm.h
hyp_gdbstub.c
idau.h
internals.h target/arm: Adjust and validate mtedesc sizem1 2024-02-15 11:30:44 +00:00
Kconfig
kvm_arm.h target/arm/kvm: Have kvm_arm_pmu_set_irq take a ARMCPU argument 2023-12-19 17:57:46 +00:00
kvm-consts.h
kvm-stub.c
kvm.c target/arm: Move GTimer definitions to new 'gtimer.h' header 2024-01-26 11:30:49 +00:00
machine.c target/arm: Move GTimer definitions to new 'gtimer.h' header 2024-01-26 11:30:49 +00:00
meson.build meson: rename config_all 2023-12-31 09:11:28 +01:00
multiprocessing.h target/arm: Expose arm_cpu_mp_affinity() in 'multiprocessing.h' header 2024-01-26 11:30:48 +00:00
op_addsub.h
ptw.c target/arm: arm_pamax() no longer needs to do feature propagation 2024-01-15 17:12:22 +00:00
syndrome.h target/arm: fix exception syndrome for AArch32 bkpt insn 2024-02-02 13:51:57 +00:00
tcg-stubs.c
trace-events target/arm/helper: Implement CNTHCTL_EL2.CNT[VP]MASK 2023-08-22 17:31:13 +01:00
trace.h
vfp_helper.c target/arm: Move feature test functions to their own header 2023-10-27 11:44:32 +01:00