]> git.proxmox.com Git - mirror_qemu.git/commit
target/arm: Create helper_exception_swstep
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 10 Jun 2022 13:32:32 +0000 (14:32 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 10 Jun 2022 13:32:32 +0000 (14:32 +0100)
commitf0d7c2054aee5d17ed0a84a11cc8c89b38902d3c
tree7bacdd2bfd03508c1babbbfce7cb008d9a398a55
parent486d6c9699a5fc1f11c48dbe73b46e183020fa49
target/arm: Create helper_exception_swstep

Move the computation from gen_swstep_exception into a helper.

This fixes a bug when:
  - MDSCR_EL1.KDE == 1 to enable debug exceptions within EL_D itself
  - we singlestep an ERET from EL_D to some lower EL

Previously we were computing 'same el' based on the EL which
executed the ERET instruction, whereas it ought to be computed
based on the EL to which ERET returned.  This happens naturally
with the new helper, which runs after EL has been changed.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220609202901.1177572-14-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/debug_helper.c
target/arm/helper.h
target/arm/translate.h