aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2012-02-17 18:31:15 +0100
committerAvi Kivity <avi@redhat.com>2012-02-18 12:15:53 +0200
commit8e564b4ebf472095b7ca5692302c8a3883d99d91 (patch)
tree9938a8b258d32c1fdec5653d2ca4e6a1c2a8b5b1
parent5207a5e0c33ce836341ff760e64ea4880bf1bc29 (diff)
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 <pbonzini@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--cpus.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cpus.c b/cpus.c
index 4e6589457e..4a10775cb6 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) {