From: Wei Yang Date: Wed, 5 Jun 2019 01:08:28 +0000 (+0800) Subject: migration/ram.c: reset complete_round when we gets a queued page X-Git-Tag: v4.1.0-rc1~7^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=422314e751ba071ca92152a544c0656882e5acde;p=thirdparty%2Fqemu.git migration/ram.c: reset complete_round when we gets a queued page 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 Reviewed-by: Juan Quintela Message-Id: <20190605010828.6969-1-richardw.yang@linux.intel.com> Signed-off-by: Juan Quintela --- diff --git a/migration/ram.c b/migration/ram.c index 96c84f770a3..89eec7ee9dc 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -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;