]> git.ipfire.org Git - thirdparty/qemu.git/commit
migration: Fix possible infinite loop of ram save process
authorPeter Xu <peterx@redhat.com>
Tue, 4 Oct 2022 18:24:26 +0000 (14:24 -0400)
committerJuan Quintela <quintela@redhat.com>
Mon, 21 Nov 2022 10:58:10 +0000 (11:58 +0100)
commit4934a5dd7c68f5ab15f17498db4fc20ed6db9578
tree6c7a43e0acaf1706ae878c1caecf2ca0d5f4940f
parent4cc47b439594327b213f9b6a67803f1a503c2cb7
migration: Fix possible infinite loop of ram save process

When starting ram saving procedure (especially at the completion phase),
always set last_seen_block to non-NULL to make sure we can always correctly
detect the case where "we've migrated all the dirty pages".

Then we'll guarantee both last_seen_block and pss.block will be valid
always before the loop starts.

See the comment in the code for some details.

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/ram.c