qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 01/30] accel/tcg: Restrict cpu_handle_halt() to sysemu


From: Richard Henderson
Subject: Re: [PATCH v4 01/30] accel/tcg: Restrict cpu_handle_halt() to sysemu
Date: Sun, 12 Sep 2021 11:34:18 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 9/12/21 10:27 AM, Philippe Mathieu-Daudé wrote:
Commit 372579427a5 ("tcg: enable thread-per-vCPU") added the following
comment describing EXCP_HALTED in qemu_tcg_cpu_thread_fn():

     case EXCP_HALTED:
          /* during start-up the vCPU is reset and the thread is
           * kicked several times. If we don't ensure we go back
           * to sleep in the halted state we won't cleanly
           * start-up when the vCPU is enabled.
           *
           * cpu->halted should ensure we sleep in wait_io_event
           */
          g_assert(cpu->halted);
          break;

qemu_wait_io_event() is sysemu-specific, so we can restrict the
cpu_handle_halt() call in cpu_exec() to system emulation.

Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
---
v4: Reduce ifdef'ry to cpu_handle_halt (rth)
---
  accel/tcg/cpu-exec.c | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)

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

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]