migration: Unwrap qemu_savevm_state_complete_precopy() in postcopy
authorPeter Xu <peterx@redhat.com>
Tue, 14 Jan 2025 23:07:42 +0000 (18:07 -0500)
committerFabiano Rosas <farosas@suse.de>
Wed, 29 Jan 2025 14:56:41 +0000 (11:56 -0300)
commit15c2ffa0b739fb40e448892ff0d0d49f99263530
tree11a377eb3448a5ea66b51d50b042ad354cdb2c2c
parent46b0155ecf3e65ba1497a9eb35e7352c36ed6f31
migration: Unwrap qemu_savevm_state_complete_precopy() in postcopy

Postcopy invokes qemu_savevm_state_complete_precopy() twice for a long
time, and that caused way too much confusions.  Let's clean this up and
make postcopy easier to read.

It's actually fairly straightforward: postcopy starts with saving
non-postcopiable iterables, then later it saves again with non-iterable
only.  Move these two calls out makes everything much easier to follow.
Otherwise it's very unclear what qemu_savevm_state_complete_precopy() did
in either of the calls.

No functional change intended.

Signed-off-by: Peter Xu <peterx@redhat.com>
Tested-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Juraj Marcin <jmarcin@redhat.com>
Link: https://lore.kernel.org/r/20250114230746.3268797-13-peterx@redhat.com
Signed-off-by: Fabiano Rosas <farosas@suse.de>
migration/migration.c
migration/savevm.c
migration/savevm.h