From: Richard Henderson Date: Fri, 28 Jul 2023 17:22:52 +0000 (-0700) Subject: target/ppc: Disable goto_tb with architectural singlestep X-Git-Tag: v7.2.5~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d53d3f07dc488961bb9cb074504efdf890603c96;p=thirdparty%2Fqemu.git target/ppc: Disable goto_tb with architectural singlestep The change to use translator_use_goto_tb went too far, as the CF_SINGLE_STEP flag managed by the translator only handles gdb single stepping and not the architectural single stepping modeled in DisasContext.singlestep_enabled. Fixes: 6e9cc373ec5 ("target/ppc: Use translator_use_goto_tb") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1795 Reviewed-by: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson (cherry picked from commit 2e718e665706d5fcc3e3501bda26f277f055ed85) Signed-off-by: Michael Tokarev --- diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 1de7eca9c47..90f749a7282 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -4327,6 +4327,9 @@ static void pmu_count_insns(DisasContext *ctx) static inline bool use_goto_tb(DisasContext *ctx, target_ulong dest) { + if (unlikely(ctx->singlestep_enabled)) { + return false; + } return translator_use_goto_tb(&ctx->base, dest); }