qemu-e2k/target/arm/tcg
Peter Maydell fbe5ac5671 target/arm: take HSTR traps of cp15 accesses to EL2, not EL1
The HSTR_EL2 register allows the hypervisor to trap AArch32 EL1 and
EL0 accesses to cp15 registers.  We incorrectly implemented this so
they trap to EL1 when we detect the need for a HSTR trap at code
generation time.  (The check in access_check_cp_reg() which we do at
runtime to catch traps from EL0 is correctly routing them to EL2.)

Use the correct target EL when generating the code to take the trap.

Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2226
Fixes: 049edada5e ("target/arm: Make HSTR_EL2 traps take priority over UNDEF-at-EL1")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20240325133116.2075362-1-peter.maydell@linaro.org
2024-04-02 09:54:41 +01:00
..
a32-uncond.decode
a32.decode
a64.decode
arm_ldst.h
cpu32.c target/arm: Move v7m-related code from cpu32.c into a separate file 2024-03-08 14:45:03 +00:00
cpu64.c target/arm: Enable FEAT_ECV for 'max' CPU 2024-03-07 12:19:04 +00:00
cpu-v7m.c target/arm: Move v7m-related code from cpu32.c into a separate file 2024-03-08 14:45:03 +00:00
crypto_helper.c
helper-a64.c target/arm: Split out arm_env_mmu_index 2024-02-03 08:52:25 +10:00
helper-a64.h
helper-mve.h
helper-sme.h
helper-sve.h
hflags.c target/arm: Do memory type alignment check when translation disabled 2024-03-05 13:22:56 +00:00
iwmmxt_helper.c
m_helper.c
m-nocp.decode
meson.build target/arm: Move v7m-related code from cpu32.c into a separate file 2024-03-08 14:45:03 +00:00
mte_helper.c target/arm: Split out arm_env_mmu_index 2024-02-03 08:52:25 +10:00
mve_helper.c
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
psci.c
sme_helper.c target/arm: Fix 32-bit SMOPA 2024-03-07 12:49:16 +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
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
translate-a64.c
translate-a64.h target/arm: Split out make_svemte_desc 2024-02-15 11:30:45 +00:00
translate-m-nocp.c
translate-mve.c
translate-neon.c
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
translate.c target/arm: take HSTR traps of cp15 accesses to EL2, not EL1 2024-04-02 09:54:41 +01:00
translate.h
vec_helper.c
vec_internal.h
vfp-uncond.decode
vfp.decode