qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v4 03/10] Process pending work while waiting for ini


From: Jan Kiszka
Subject: [Qemu-devel] [PATCH v4 03/10] Process pending work while waiting for initial kick-off in TCG mode
Date: Fri, 17 Feb 2012 18:31:15 +0100

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 <address@hidden>
Signed-off-by: Jan Kiszka <address@hidden>
---
 cpus.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/cpus.c b/cpus.c
index 4e65894..4a10775 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) {
-- 
1.7.3.4




reply via email to

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