From: "Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
To: Mark Cave-Ayland <mark.caveayland@nutanix.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>,
Peter Maydell <peter.maydell@linaro.org>,
Richard Henderson <richard.henderson@linaro.org>,
Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Subject: Re: [PATCH 00/11] accel/tcg: Make halt-to-exec transition explicit and remove cpu_exec_halt
Date: Mon, 24 Aug 2026 23:31:56 +0200 [thread overview]
Message-ID: <86112e29-c60b-43be-98a7-db2030640323@oss.qualcomm.com> (raw)
In-Reply-To: <bbd002b8-c4b3-40aa-b25a-87a101293dc2@oss.qualcomm.com>
Hey Mark,
On 20/8/26 11:56, Philippe Mathieu-Daudé wrote:
> Hi Mark,
>
> On 2026-08-20 11:26, Mark Cave-Ayland wrote:
>> On 19/08/2026 15:56, Philippe Mathieu-Daudé wrote:
>>
>> Hi Phil,
>>
>> No objections to the idea of the patch, however I do have a couple of
>> questions:
>>
>>> This series was inspired by a previous thread on the list [*].
>>>
>>> Refactor the CPU halt-to-execution transition logic in TCG as
>>> something more explicit and composable.
>>>
>>> Core problem: TCGCPUOps::cpu_exec_halt callback mixed concerns,
>>> it checked for work, processed async events, and handled state
>>> transitions all in one place.
>>>
>>> Solution: introduces two dedicated callbacks:
>>>
>>> * process_async_events(): Process target-specific async events
>>> before checking for work. Called early in cpu_exec().
>>
>> Can you explain exactly what you mean by async events here in the
>> context of TCG? Looking at the thread indicated below suggests this is
>> terminology borrowed from KVM with which I am less familiar.
>
> "asynchronous interrupts/events that arrive (from timers, other threads)
> while a vCPU is halted"?
>
>>
>>> * transition_halt_to_exec(): Perform target-specific state updates
>>> when transitioning from halt to execution.
>>
>> That's quite a name :) Would something like cpu_exec_resume() be more
>> descriptive here (as well as keeping the cpu_exec_ prefix used by
>> other callbacks)?
>
> Naming is hard, I rather something self-explaining when reading the
> code; we transition the state but do not resume yet. Anyway what about
> .resume_halted/resume_from_halt/resume_from_sleep/resume_execution
> instead of .transition_halt_to_exec?
WDYT?
>
>>
>>> This separation allows the generic cpu_exec() code to orchestrate
>>> the flow cleanly (process events, check for work, transition state).
>
prev parent reply other threads:[~2026-08-24 21:32 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-19 14:56 [PATCH 00/11] accel/tcg: Make halt-to-exec transition explicit and remove cpu_exec_halt Philippe Mathieu-Daudé
2026-08-19 14:56 ` [PATCH 01/11] accel/tcg: Rename for exception codes named @ret as @excp Philippe Mathieu-Daudé
2026-08-19 19:55 ` Richard Henderson
2026-08-19 14:56 ` [PATCH 02/11] accel/tcg: Restrict EXCP_HALTED handling to system emulation Philippe Mathieu-Daudé
2026-08-19 20:01 ` Richard Henderson
2026-08-19 14:56 ` [PATCH 03/11] accel/tcg: Check %halted field in cpu_handle_halt() caller Philippe Mathieu-Daudé
2026-08-19 20:02 ` Richard Henderson
2026-08-19 14:56 ` [PATCH 04/11] accel/tcg: Refactor halt-to-execution flow in cpu_exec() Philippe Mathieu-Daudé
2026-08-19 20:03 ` Richard Henderson
2026-08-19 14:56 ` [PATCH 05/11] accel/tcg: Introduce .process_async_events and .transition_halt_to_exec Philippe Mathieu-Daudé
2026-08-19 20:06 ` Richard Henderson
2026-08-19 14:56 ` [PATCH 06/11] target/arm: Extract halt-to-exec transition out of arm_cpu_exec_halt() Philippe Mathieu-Daudé
2026-08-19 20:13 ` Richard Henderson
2026-08-19 21:40 ` Peter Maydell
2026-08-20 7:29 ` Philippe Mathieu-Daudé
2026-08-19 14:56 ` [PATCH 07/11] target/arm: Convert cpu_exec_halt() to transition_halt_to_exec() Philippe Mathieu-Daudé
2026-08-19 20:15 ` Richard Henderson
2026-08-19 14:56 ` [PATCH 08/11] target/i386: Extract async event processing out of x86_cpu_exec_halt() Philippe Mathieu-Daudé
2026-08-19 20:16 ` Richard Henderson
2026-08-19 14:56 ` [PATCH 09/11] target/i386: Extract halt-to-exec transition " Philippe Mathieu-Daudé
2026-08-19 20:17 ` Richard Henderson
2026-08-19 14:56 ` [PATCH 10/11] target/i386: Convert cpu_exec_halt() to transition_halt_to_exec() Philippe Mathieu-Daudé
2026-08-19 20:18 ` Richard Henderson
2026-08-19 20:19 ` Richard Henderson
2026-08-19 14:56 ` [PATCH 11/11] accel/tcg: Remove the now redundant cpu_exec_halt() hook Philippe Mathieu-Daudé
2026-08-19 15:05 ` Philippe Mathieu-Daudé
2026-08-19 20:20 ` Richard Henderson
2026-08-20 9:26 ` [PATCH 00/11] accel/tcg: Make halt-to-exec transition explicit and remove cpu_exec_halt Mark Cave-Ayland
2026-08-20 9:56 ` Philippe Mathieu-Daudé
2026-08-24 21:31 ` Philippe Mathieu-Daudé [this message]
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=86112e29-c60b-43be-98a7-db2030640323@oss.qualcomm.com \
--to=philmd@oss.qualcomm.com \
--cc=daniel.barboza@oss.qualcomm.com \
--cc=mark.caveayland@nutanix.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.