]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/ppc: Disable goto_tb with architectural singlestep
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 28 Jul 2023 17:22:52 +0000 (10:22 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 31 Jul 2023 19:19:13 +0000 (12:19 -0700)
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 <clg@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/ppc/translate.c

index e6a070906697ec00605a975e0c02b362562f5c73..74796ec7ba439855517418f3019d0ab28bb51f9c 100644 (file)
@@ -4175,6 +4175,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);
 }