]> git.proxmox.com Git - qemu.git/commitdiff
stop dirty tracking just at the end of migration (Glauber Costa)
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 5 Apr 2009 19:33:41 +0000 (19:33 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 5 Apr 2009 19:33:41 +0000 (19:33 +0000)
If there is still work to do, it is not safe to assume we
can end the dirty tracking. Specifically, kvm can update the dirty
tracking log inside ram_save_block(), leaving pages still out of sync
if we go with the current code.

Based on a patch by Yaniv Kamay

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/branches/stable_0_10@7002 c046a42c-6fe2-441c-8c8c-71466251a162

vl.c

diff --git a/vl.c b/vl.c
index a83186d1646f4cf81f8f02ea15e6fd81de6917d2..54ae45bf941008023898d93ebd4fc56730e6ce8e 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -3220,10 +3220,10 @@ static int ram_save_live(QEMUFile *f, int stage, void *opaque)
     /* try transferring iterative blocks of memory */
 
     if (stage == 3) {
-        cpu_physical_memory_set_dirty_tracking(0);
 
         /* flush all remaining blocks regardless of rate limiting */
         while (ram_save_block(f) != 0);
+        cpu_physical_memory_set_dirty_tracking(0);
     }
 
     qemu_put_be64(f, RAM_SAVE_FLAG_EOS);