From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: Juan Quintela <quintela@redhat.com>,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
peterx@redhat.com
Subject: [Qemu-devel] [PATCH for-3.0 1/4] migration: update recv bitmap only on dest vm
Date: Mon, 23 Jul 2018 20:33:02 +0800 [thread overview]
Message-ID: <20180723123305.24792-2-peterx@redhat.com> (raw)
In-Reply-To: <20180723123305.24792-1-peterx@redhat.com>
We shouldn't update the received bitmap if we're the source VM. This
fixes a breakage when release-ram is enabled on postcopy.
Signed-off-by: Peter Xu <peterx@redhat.com>
---
migration/ram.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 52dd678092..be6dfef50a 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -2827,8 +2827,15 @@ int ram_discard_range(const char *rbname, uint64_t start, size_t length)
goto err;
}
- bitmap_clear(rb->receivedmap, start >> qemu_target_page_bits(),
- length >> qemu_target_page_bits());
+ /*
+ * On source VM, we don't need to update the received bitmap since
+ * we don't even have one.
+ */
+ if (rb->receivedmap) {
+ bitmap_clear(rb->receivedmap, start >> qemu_target_page_bits(),
+ length >> qemu_target_page_bits());
+ }
+
ret = ram_block_discard_range(rb, start, length);
err:
--
2.17.1
next prev parent reply other threads:[~2018-07-23 12:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-23 12:33 [Qemu-devel] [PATCH for-3.0 0/4] migration: some fixes for release-ram Peter Xu
2018-07-23 12:33 ` Peter Xu [this message]
2018-07-24 9:20 ` [Qemu-devel] [PATCH for-3.0 1/4] migration: update recv bitmap only on dest vm Juan Quintela
2018-07-23 12:33 ` [Qemu-devel] [PATCH for-3.0 2/4] migration: disallow recovery for release-ram Peter Xu
2018-07-24 9:21 ` Juan Quintela
2018-07-24 11:39 ` Peter Xu
2018-07-23 12:33 ` [Qemu-devel] [PATCH for-3.0 3/4] tests: only update last_byte when at the edge Peter Xu
2018-07-24 9:23 ` Juan Quintela
2018-07-23 12:33 ` [Qemu-devel] [PATCH for-3.0 4/4] tests: torture release-ram in postcopy test Peter Xu
2018-07-24 9:25 ` Juan Quintela
2018-07-24 11:36 ` Peter Xu
2018-07-24 11:42 ` Dr. David Alan Gilbert
2018-07-24 11:52 ` Peter Xu
2018-07-24 16:22 ` [Qemu-devel] [PATCH for-3.0 0/4] migration: some fixes for release-ram Dr. David Alan Gilbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180723123305.24792-2-peterx@redhat.com \
--to=peterx@redhat.com \
--cc=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).