On 8/19/26 07:56, Philippe Mathieu-Daudé wrote:
Decompose the halt-to-execution transition into distinct steps:

  - process_async_events() called first to handle
    target-specific asynchronous events,

  - transition_halt_to_exec() called after a halted
    CPU has detected pending work and is about to
    resume execution.

Either callback is optional; targets that don't implement them
fall back to the existing cpu_exec_halt() callback for backward
compatibility.

cpu_has_work_after_processing_async_events() orchestrates these
callbacks: process async events, check for work, transition from
halt, and clear the halted flag.

Inspired-by: Paolo Bonzini<[email protected]>
Signed-off-by: Philippe Mathieu-Daudé<[email protected]>
---
  include/accel/tcg/cpu-ops.h | 17 ++++++++++++++++-
  accel/tcg/cpu-exec.c        | 21 +++++++++++++++++----
  2 files changed, 33 insertions(+), 5 deletions(-)

Reviewed-by: Richard Henderson <[email protected]>

r~

Reply via email to