]> git.proxmox.com Git - mirror_qemu.git/blobdiff - migration/migration.c
migration: discard non-dirty ram pages after the start of postcopy
[mirror_qemu.git] / migration / migration.c
index 68afc070167049c4eee27380416e9eaca287cd81..2a26a20aafdd1c9834629a7cad850449f42bdede 100644 (file)
@@ -1722,6 +1722,10 @@ static int postcopy_start(MigrationState *ms, bool *old_vm_running)
      */
     qemu_savevm_send_ping(ms->to_dst_file, 4);
 
+    if (migrate_release_ram()) {
+        ram_postcopy_migrated_memory_release(ms);
+    }
+
     ret = qemu_file_get_error(ms->to_dst_file);
     if (ret) {
         error_report("postcopy_start: Migration stream errored");