qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] target/ppc: Disable goto_tb with architectural singlestep
@ 2023-07-28 17:35 Richard Henderson
  2023-07-28 20:48 ` Richard Henderson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Richard Henderson @ 2023-07-28 17:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-ppc, npiggin, groug, david, clg

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
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/ppc/translate.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index e6a0709066..74796ec7ba 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -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);
 }
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] target/ppc: Disable goto_tb with architectural singlestep
  2023-07-28 17:35 [PATCH] target/ppc: Disable goto_tb with architectural singlestep Richard Henderson
@ 2023-07-28 20:48 ` Richard Henderson
  2023-07-29  4:48 ` Cédric Le Goater
  2023-07-31 13:57 ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2023-07-28 20:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-stable

Cc qemu-stable.

On 7/28/23 10:35, Richard Henderson wrote:
> 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
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/ppc/translate.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/target/ppc/translate.c b/target/ppc/translate.c
> index e6a0709066..74796ec7ba 100644
> --- a/target/ppc/translate.c
> +++ b/target/ppc/translate.c
> @@ -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);
>   }
>   




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] target/ppc: Disable goto_tb with architectural singlestep
  2023-07-28 17:35 [PATCH] target/ppc: Disable goto_tb with architectural singlestep Richard Henderson
  2023-07-28 20:48 ` Richard Henderson
@ 2023-07-29  4:48 ` Cédric Le Goater
  2023-07-31 13:57 ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 4+ messages in thread
From: Cédric Le Goater @ 2023-07-29  4:48 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-ppc, npiggin, groug, david

On 7/28/23 19:35, Richard Henderson wrote:
> 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
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Reviewed-by: Cédric Le Goater <clg@kaod.org>

Thanks,

C.


> ---
>   target/ppc/translate.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/target/ppc/translate.c b/target/ppc/translate.c
> index e6a0709066..74796ec7ba 100644
> --- a/target/ppc/translate.c
> +++ b/target/ppc/translate.c
> @@ -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);
>   }
>   



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] target/ppc: Disable goto_tb with architectural singlestep
  2023-07-28 17:35 [PATCH] target/ppc: Disable goto_tb with architectural singlestep Richard Henderson
  2023-07-28 20:48 ` Richard Henderson
  2023-07-29  4:48 ` Cédric Le Goater
@ 2023-07-31 13:57 ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-07-31 13:57 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: qemu-ppc, npiggin, groug, david, clg

On 28/7/23 19:35, Richard Henderson wrote:
> 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
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/ppc/translate.c | 3 +++
>   1 file changed, 3 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-31 13:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-28 17:35 [PATCH] target/ppc: Disable goto_tb with architectural singlestep Richard Henderson
2023-07-28 20:48 ` Richard Henderson
2023-07-29  4:48 ` Cédric Le Goater
2023-07-31 13:57 ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).