aboutsummaryrefslogtreecommitdiff
path: root/arch_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch_init.c')
-rw-r--r--arch_init.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch_init.c b/arch_init.c
index 0471cd5a6b..e47e1399bb 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -1196,15 +1196,14 @@ static void mig_sleep_cpu(void *opq)
much time in the VM. The migration thread will try to catchup.
Workload will experience a performance drop.
*/
-static void mig_throttle_cpu_down(CPUState *cpu, void *data)
-{
- async_run_on_cpu(cpu, mig_sleep_cpu, NULL);
-}
-
static void mig_throttle_guest_down(void)
{
+ CPUState *cpu;
+
qemu_mutex_lock_iothread();
- qemu_for_each_cpu(mig_throttle_cpu_down, NULL);
+ CPU_FOREACH(cpu) {
+ async_run_on_cpu(cpu, mig_sleep_cpu, NULL);
+ }
qemu_mutex_unlock_iothread();
}