qemu-e2k/target/arm/tcg
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
..
a32-uncond.decode
a32.decode
a64.decode target/arm: Fix A64 LDRA immediate decode 2023-11-06 15:00:29 +00:00
arm_ldst.h
cpu32.c target/arm: Add Cortex-R52 IMPDEF sysregs 2024-02-15 14:32:38 +00:00
cpu64.c target/arm: Add FEAT_NV2 to max, neoverse-n2, neoverse-v1 CPUs 2024-01-09 14:44:45 +00:00
crypto_helper.c crypto: Create sm4_subword 2023-09-11 11:45:55 +10:00
helper-a64.c target/arm: Split out arm_env_mmu_index 2024-02-03 08:52:25 +10:00
helper-a64.h target/arm: Implement the CPY* instructions 2023-09-21 16:07:14 +01:00
helper-mve.h
helper-sme.h
helper-sve.h
hflags.c target/arm: Implement FEAT_NV2 redirection of sysregs to RAM 2024-01-09 14:43:53 +00:00
iwmmxt_helper.c
m_helper.c system/cpus: rename qemu_mutex_lock_iothread() to bql_lock() 2024-01-08 10:45:43 -05:00
m-nocp.decode
meson.build target/arm/tcg: Don't build AArch64 decodetree files for qemu-system-arm 2023-07-31 11:41:21 +01:00
mte_helper.c target/arm: Split out arm_env_mmu_index 2024-02-03 08:52:25 +10:00
mve_helper.c target/arm/tcg: Clean up local variable shadowing 2023-09-29 10:07:14 +02:00
mve.decode
neon_helper.c
neon-dp.decode
neon-ls.decode
neon-shared.decode
op_helper.c target/arm: Allow access to SPSR_hyp from hyp mode 2024-02-15 14:32:38 +00:00
pauth_helper.c target/arm: Move feature test functions to their own header 2023-10-27 11:44:32 +01:00
psci.c target/arm: Expose arm_cpu_mp_affinity() in 'multiprocessing.h' header 2024-01-26 11:30:48 +00:00
sme_helper.c target/arm: Fix SVE/SME gross MTE suppression checks 2024-02-15 11:30:45 +00:00
sme-fa64.decode
sme.decode
sve_helper.c target/arm: Fix SVE/SME gross MTE suppression checks 2024-02-15 11:30:45 +00:00
sve_ldst_internal.h
sve.decode target/arm: Demultiplex AESE and AESMC 2023-07-08 07:30:18 +01:00
t16.decode
t32.decode
tlb_helper.c target/arm: Split out arm_env_mmu_index 2024-02-03 08:52:25 +10:00
translate-a32.h tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
translate-a64.c target/arm: Fix A64 scalar SQSHRN and SQRSHRN 2024-01-26 12:19:11 +00:00
translate-a64.h target/arm: Split out make_svemte_desc 2024-02-15 11:30:45 +00:00
translate-m-nocp.c tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
translate-mve.c tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
translate-neon.c tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
translate-sme.c target/arm: Split out make_svemte_desc 2024-02-15 11:30:45 +00:00
translate-sve.c target/arm: Handle mte in do_ldrq, do_ldro 2024-02-15 11:30:45 +00:00
translate-vfp.c tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
translate.c target/arm: Allow access to SPSR_hyp from hyp mode 2024-02-15 14:32:38 +00:00
translate.h target/arm: Implement FEAT_NV2 redirection of sysregs to RAM 2024-01-09 14:43:53 +00:00
vec_helper.c target/arm: Use clmul_64 2023-09-15 13:57:00 +00:00
vec_internal.h target/arm: Use clmul_16* routines 2023-09-15 13:57:00 +00:00
vfp-uncond.decode
vfp.decode