]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
migration/colo: Unwrap qemu_savevm_live_state()
authorPeter Xu <peterx@redhat.com>
Tue, 27 Jan 2026 18:52:35 +0000 (13:52 -0500)
committerFabiano Rosas <farosas@suse.de>
Tue, 17 Feb 2026 12:53:41 +0000 (09:53 -0300)
It's only used in COLO path and only contains two calls.  Unwrap the
function.  It paves way for further reduce special COLO paths on sync.

Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Peter Xu <peterx@redhat.com>
Tested-by: Lukas Straub <lukasstraub2@web.de>
Link: https://lore.kernel.org/qemu-devel/20260127185254.3954634-6-peterx@redhat.com
Signed-off-by: Fabiano Rosas <farosas@suse.de>
migration/colo.c
migration/savevm.c
migration/savevm.h

index db783f6fa77500386d923dd97e522883027e71d8..e05736ecf0fcf029d0397d64a1f8b8ee3f32b453 100644 (file)
@@ -471,7 +471,8 @@ static int colo_do_checkpoint_transaction(MigrationState *s,
      * TODO: We may need a timeout mechanism to prevent COLO process
      * to be blocked here.
      */
-    qemu_savevm_live_state(s->to_dst_file);
+    qemu_savevm_state_complete_precopy(s->to_dst_file, true);
+    qemu_put_byte(s->to_dst_file, QEMU_VM_EOF);
 
     qemu_fflush(fb);
 
index f1cd8c913df176ecb01f202d876cf386e1316d3f..529cf310e0746acccae85fc957f5120627b3fcd7 100644 (file)
@@ -1854,13 +1854,6 @@ cleanup:
     return ret;
 }
 
-void qemu_savevm_live_state(QEMUFile *f)
-{
-    /* save QEMU_VM_SECTION_END section */
-    qemu_savevm_state_complete_precopy(f, true);
-    qemu_put_byte(f, QEMU_VM_EOF);
-}
-
 /* Is a save state entry iterable (e.g. RAM)? */
 static bool qemu_savevm_se_iterable(SaveStateEntry *se)
 {
index 5d815af742df933ef2cf7e3926281ac6441a7b2f..528607f09eb8844eacb34ad0eba36111d359c614 100644 (file)
@@ -64,7 +64,6 @@ void qemu_savevm_send_postcopy_ram_discard(QEMUFile *f, const char *name,
                                            uint64_t *start_list,
                                            uint64_t *length_list);
 void qemu_savevm_send_colo_enable(QEMUFile *f);
-void qemu_savevm_live_state(QEMUFile *f);
 int qemu_save_device_state(QEMUFile *f);
 
 int qemu_loadvm_state(QEMUFile *f, Error **errp);