]> git.proxmox.com Git - mirror_qemu.git/commitdiff
migration/ram.c: reset complete_round when we gets a queued page
authorWei Yang <richardw.yang@linux.intel.com>
Wed, 5 Jun 2019 01:08:28 +0000 (09:08 +0800)
committerJuan Quintela <quintela@redhat.com>
Mon, 15 Jul 2019 13:39:02 +0000 (15:39 +0200)
In case we gets a queued page, the order of block is interrupted. We may
not rely on the complete_round flag to say we have already searched the
whole blocks on the list.

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20190605010828.6969-1-richardw.yang@linux.intel.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/ram.c

index 96c84f770a338aa37078e40bb01ae1dea84cdbba..89eec7ee9dc33260c4949232209170a831de4cfb 100644 (file)
@@ -2286,6 +2286,12 @@ static bool get_queued_page(RAMState *rs, PageSearchStatus *pss)
          */
         pss->block = block;
         pss->page = offset >> TARGET_PAGE_BITS;
+
+        /*
+         * This unqueued page would break the "one round" check, even is
+         * really rare.
+         */
+        pss->complete_round = false;
     }
 
     return !!block;