qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: Bernhard Beschow <shentey@gmail.com>,
	Nicholas Piggin <npiggin@gmail.com>,
	bharata.rao@gmail.com, benh@kernel.crashing.org,
	Chinmay Rath <rathc@linux.ibm.com>,
	qemu-ppc@nongnu.org
Subject: Re: [PATCH 2/3] target/ppc: Have gen_pause() actually pause vCPUs
Date: Wed, 24 Sep 2025 10:58:56 -0700	[thread overview]
Message-ID: <74eb2a5f-b0e2-4fe4-9831-8d4229647695@linaro.org> (raw)
In-Reply-To: <20250924173028.53658-3-philmd@linaro.org>

On 9/24/25 10:30, Philippe Mathieu-Daudé wrote:
> gen_pause() sets CPUState::halted = 0, effectively unhalting
> (a.k.a. "running") the cpu. Correct by setting the '1' value
> to really halt the cpu.
> 
> Fixes: b68e60e6f0d ("ppc: Get out of emulation on SMT "OR" ops")
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/ppc/translate.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/ppc/translate.c b/target/ppc/translate.c
> index 27f90c3cc56..a1a97e0fd2e 100644
> --- a/target/ppc/translate.c
> +++ b/target/ppc/translate.c
> @@ -1985,7 +1985,7 @@ static inline void gen_op_arith_subf(DisasContext *ctx, TCGv ret, TCGv arg1,
>   #if defined(TARGET_PPC64) && !defined(CONFIG_USER_ONLY)
>   static void gen_pause(DisasContext *ctx)
>   {
> -    TCGv_i32 t0 = tcg_constant_i32(0);
> +    TCGv_i32 t0 = tcg_constant_i32(1);
>       tcg_gen_st_i32(t0, tcg_env,
>                      -offsetof(PowerPCCPU, env) + offsetof(CPUState, halted));
>   

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~


  reply	other threads:[~2025-09-24 18:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-24 17:30 [PATCH 0/3] target/ppc: Have gen_pause() actually pause vCPUs Philippe Mathieu-Daudé
2025-09-24 17:30 ` [PATCH 1/3] hw/ppc: Do not open-code cpu_resume() in spin_kick() Philippe Mathieu-Daudé
2025-09-24 17:58   ` Richard Henderson
2025-09-24 17:30 ` [PATCH 2/3] target/ppc: Have gen_pause() actually pause vCPUs Philippe Mathieu-Daudé
2025-09-24 17:58   ` Richard Henderson [this message]
2025-09-29  4:28   ` Benjamin Herrenschmidt
2025-09-29  7:51     ` Philippe Mathieu-Daudé
2025-09-29 22:59       ` Benjamin Herrenschmidt
2025-09-30  3:00         ` Philippe Mathieu-Daudé
2025-09-24 17:30 ` [PATCH 3/3] target/ppc: Re-use gen_pause() in gen_wait() Philippe Mathieu-Daudé
2025-09-24 18:05   ` Richard Henderson
2025-10-07  8:21 ` [PATCH 0/3] target/ppc: Have gen_pause() actually pause vCPUs Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=74eb2a5f-b0e2-4fe4-9831-8d4229647695@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=benh@kernel.crashing.org \
    --cc=bharata.rao@gmail.com \
    --cc=npiggin@gmail.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rathc@linux.ibm.com \
    --cc=shentey@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).