This can cause various segmentation faults or aborts in qemu-iotests
test 091.
Fixes: 5b82b703b69acc67b78b98a5efc897a3912719eb
Cc: Dave Gilbert <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
acct_clear();
}
+ /* For memory_global_dirty_log_start below. */
+ qemu_mutex_lock_iothread();
+
qemu_mutex_lock_ramlist();
rcu_read_lock();
bytes_transferred = 0;
memory_global_dirty_log_start();
migration_bitmap_sync();
qemu_mutex_unlock_ramlist();
+ qemu_mutex_unlock_iothread();
qemu_put_be64(f, ram_bytes_total() | RAM_SAVE_FLAG_MEM_SIZE);