From: Jan Kiszka Date: Fri, 17 Feb 2012 17:31:15 +0000 (+0100) Subject: Process pending work while waiting for initial kick-off in TCG mode X-Git-Tag: v1.1-rc0~289^2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8e564b4ebf472095b7ca5692302c8a3883d99d91;p=thirdparty%2Fqemu.git Process pending work while waiting for initial kick-off in TCG mode When the TCG thread is started but not yet the machine, we wait in qemu_tcg_cpu_thread_fn on tcg_halt_cond. To allow run_on_cpu already at this time, we need to process pending request in that loop. CC: Paolo Bonzini Signed-off-by: Jan Kiszka Signed-off-by: Avi Kivity --- diff --git a/cpus.c b/cpus.c index 4e6589457e6..4a10775cb61 100644 --- a/cpus.c +++ b/cpus.c @@ -761,6 +761,11 @@ static void *qemu_tcg_cpu_thread_fn(void *arg) /* wait for initial kick-off after machine start */ while (first_cpu->stopped) { qemu_cond_wait(tcg_halt_cond, &qemu_global_mutex); + + /* process any pending work */ + for (env = first_cpu; env != NULL; env = env->next_cpu) { + qemu_wait_io_event_common(env); + } } while (1) {