qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] kvm: Mark full address range dirty on live migratio


From: Jan Kiszka
Subject: [Qemu-devel] [PATCH] kvm: Mark full address range dirty on live migration start
Date: Fri, 22 May 2009 23:51:45 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

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 <address@hidden>
---

 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: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]