summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cpus.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/cpus.c b/cpus.c
index 4a10775..17b055f 100644
--- a/cpus.c
+++ b/cpus.c
@@ -875,6 +875,18 @@ void pause_all_vcpus(void)
penv = penv->next_cpu;
}
+ if (!qemu_thread_is_self(&io_thread)) {
+ cpu_stop_current();
+ if (!kvm_enabled()) {
+ while (penv) {
+ penv->stop = 0;
+ penv->stopped = 1;
+ penv = penv->next_cpu;
+ }
+ return;
+ }
+ }
+
while (!all_vcpus_paused()) {
qemu_cond_wait(&qemu_pause_cond, &qemu_global_mutex);
penv = first_cpu;
OpenPOWER on IntegriCloud