aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2024-02-06 13:29:22 +0000
committerPeter Maydell <peter.maydell@linaro.org>2024-02-15 14:32:38 +0000
commitf2b4a98930c122648e9dc494e49cea5dffbcc2be (patch)
treed9efa553d1f508012bc17b4ee64254cb7e72990a /scripts/qapi
parent282a48eca4c84c3f146165aab3a64e82b4b60670 (diff)
downloadqemu-f2b4a98930c122648e9dc494e49cea5dffbcc2be.zip
qemu-f2b4a98930c122648e9dc494e49cea5dffbcc2be.tar.gz
qemu-f2b4a98930c122648e9dc494e49cea5dffbcc2be.tar.bz2
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
Diffstat (limited to 'scripts/qapi')
0 files changed, 0 insertions, 0 deletions