summary refs log tree commit diff stats
path: root/include/hw/misc/virt_ctrl.h
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2021-09-12 19:27:02 +0200
committerRichard Henderson <richard.henderson@linaro.org>2021-09-21 19:36:44 -0700
commit0596fa11f16c81d5237da64e59e8583a971dfe1c (patch)
treeeecf329bcd90a550a50a899fb1516b2a307ca095 /include/hw/misc/virt_ctrl.h
parent8b1d5b3c3507d062d7611a64a81989e8903605ed (diff)
downloadfocaccia-qemu-0596fa11f16c81d5237da64e59e8583a971dfe1c.tar.gz
focaccia-qemu-0596fa11f16c81d5237da64e59e8583a971dfe1c.zip
accel/tcg: Restrict cpu_handle_halt() to sysemu
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>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210912172731.789788-2-f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/hw/misc/virt_ctrl.h')
0 files changed, 0 insertions, 0 deletions