a65dabf71a
When a coprocessor instruction in an AArch32 guest traps to AArch32 Hyp mode, the syndrome register (HSR) includes Rt and Rt2 fields which are simply copies of the Rt and Rt2 fields from the trapped instruction. However, if the instruction is trapped from AArch32 to an AArch64 higher exception level, the Rt and Rt2 fields in the syndrome register (ESR_ELx) must be the AArch64 view of the register. This makes a difference if the AArch32 guest was in a mode other than User or System and it was using r13 or r14, or if it was in FIQ mode and using r8-r14. We don't know at translate time which AArch32 CPU mode we are in, so we leave the values we generate in our prototype syndrome register value at translate time as the raw Rt/Rt2 from the instruction, and instead correct them to the AArch64 view when we find we need to take an exception from AArch32 to AArch64 with one of these syndrome values. Fixes: https://bugs.launchpad.net/qemu/+bug/1879587 Reported-by: Julien Freche <julien@bedrocksystems.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 20200804193903.31240-1-peter.maydell@linaro.org |
||
---|---|---|
.. | ||
a32-uncond.decode | ||
a32.decode | ||
arch_dump.c | ||
arm_ldst.h | ||
arm-powerctl.c | ||
arm-powerctl.h | ||
arm-semi.c | ||
cpu64.c | ||
cpu_tcg.c | ||
cpu-param.h | ||
cpu-qom.h | ||
cpu.c | ||
cpu.h | ||
crypto_helper.c | ||
debug_helper.c | ||
gdbstub64.c | ||
gdbstub.c | ||
helper-a64.c | ||
helper-a64.h | ||
helper-sve.h | ||
helper.c | ||
helper.h | ||
idau.h | ||
internals.h | ||
iwmmxt_helper.c | ||
kvm32.c | ||
kvm64.c | ||
kvm_arm.h | ||
kvm-consts.h | ||
kvm-stub.c | ||
kvm.c | ||
m_helper.c | ||
machine.c | ||
Makefile.objs | ||
monitor.c | ||
mte_helper.c | ||
neon_helper.c | ||
neon-dp.decode | ||
neon-ls.decode | ||
neon-shared.decode | ||
op_addsub.h | ||
op_helper.c | ||
pauth_helper.c | ||
psci.c | ||
sve_helper.c | ||
sve.decode | ||
t16.decode | ||
t32.decode | ||
tlb_helper.c | ||
trace-events | ||
translate-a64.c | ||
translate-a64.h | ||
translate-neon.inc.c | ||
translate-sve.c | ||
translate-vfp.inc.c | ||
translate.c | ||
translate.h | ||
vec_helper.c | ||
vec_internal.h | ||
vfp_helper.c | ||
vfp-uncond.decode | ||
vfp.decode |