summary refs log tree commit diff stats
path: root/cpu-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpu-common.c')
-rw-r--r--cpu-common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpu-common.c b/cpu-common.c
index ef5757d23b..152661df8e 100644
--- a/cpu-common.c
+++ b/cpu-common.c
@@ -137,7 +137,8 @@ static void queue_work_on_cpu(CPUState *cpu, struct qemu_work_item *wi)
     wi->done = false;
     qemu_mutex_unlock(&cpu->work_mutex);
 
-    qemu_cpu_kick(cpu);
+    /* exit the inner loop and reach qemu_wait_io_event_common().  */
+    cpu_exit(cpu);
 }
 
 void do_run_on_cpu(CPUState *cpu, run_on_cpu_func func, run_on_cpu_data data,