qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.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, Chinmay Rath <rathc@linux.ibm.com>,
	qemu-ppc@nongnu.org
Subject: Re: [PATCH 2/3] target/ppc: Have gen_pause() actually pause vCPUs
Date: Tue, 30 Sep 2025 08:59:12 +1000	[thread overview]
Message-ID: <5923fc8c7ac36d8bcae7a416cfd072c18c8698ec.camel@kernel.crashing.org> (raw)
In-Reply-To: <8099d09f-029d-4562-b035-7b832ac27ccc@linaro.org>

On Mon, 2025-09-29 at 09:51 +0200, Philippe Mathieu-Daudé wrote:
> > What will resume it though ? The smt_low() case isn't meant to
> > *halt*
> > the CPUs permanently. smt_*() levels are about SMT thread
> > priorities.
> > Using a "pause" that just gets out of TCG (and back in), is a way
> > to
> > "yield" to another thread, thus enabling more forward progress when
> > a
> 
> What you describe can be achieved with a helper doing:
> 
>    cs->exception_index = EXCP_YIELD;
>    cpu_loop_exit(cs);
> 
> Is that what you wanted?

I suppose so... this was many years ago and I don't have much context
anymore, so I don't know why I didn't do it that way back then.

Cheers,
Ben.


  reply	other threads:[~2025-09-29 23: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
2025-09-29  4:28   ` Benjamin Herrenschmidt
2025-09-29  7:51     ` Philippe Mathieu-Daudé
2025-09-29 22:59       ` Benjamin Herrenschmidt [this message]
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=5923fc8c7ac36d8bcae7a416cfd072c18c8698ec.camel@kernel.crashing.org \
    --to=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).