From: Jan Kiszka <jan.kiszka@web.de>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] kvm: Mark full address range dirty on live migration start
Date: Fri, 22 May 2009 23:51:45 +0200 [thread overview]
Message-ID: <4A171E71.1000701@web.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]
As Avi correctly noted, last_ram_offset does not mark the last physical
RAM address the guest may see (due to non-continuous memory regions).
Ensure that we catch them all by marking the full possible address range
dirty.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
targphys.h | 2 ++
vl.c | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/targphys.h b/targphys.h
index 81a9c37..99ab23c 100644
--- a/targphys.h
+++ b/targphys.h
@@ -12,9 +12,11 @@
#if TARGET_PHYS_ADDR_BITS == 32
typedef uint32_t target_phys_addr_t;
+#define TARGET_PHYS_ADDR_MAX UINT32_MAX
#define TARGET_FMT_plx "%08x"
#elif TARGET_PHYS_ADDR_BITS == 64
typedef uint64_t target_phys_addr_t;
+#define TARGET_PHYS_ADDR_MAX UINT64_MAX
#define TARGET_FMT_plx "%016" PRIx64
#endif
#endif
diff --git a/vl.c b/vl.c
index 2c1f0e0..090c83d 100644
--- a/vl.c
+++ b/vl.c
@@ -3232,7 +3232,7 @@ static int ram_save_live(QEMUFile *f, int stage, void *opaque)
{
ram_addr_t addr;
- if (cpu_physical_sync_dirty_bitmap(0, last_ram_offset) != 0) {
+ if (cpu_physical_sync_dirty_bitmap(0, TARGET_PHYS_ADDR_MAX) != 0) {
qemu_file_set_error(f);
return 0;
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
next reply other threads:[~2009-05-22 21:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-22 21:51 Jan Kiszka [this message]
2009-05-23 13:47 ` [Qemu-devel] [PATCH] kvm: Mark full address range dirty on live migration start Glauber Costa
2009-05-23 13:47 ` Jan Kiszka
2009-05-24 18:23 ` Paul Brook
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=4A171E71.1000701@web.de \
--to=jan.kiszka@web.de \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.