Postcopy: Fix TP!=HP zero case
authorDr. David Alan Gilbert <dgilbert@redhat.com>
Wed, 11 Nov 2015 14:02:28 +0000 (14:02 +0000)
committerJuan Quintela <quintela@redhat.com>
Thu, 12 Nov 2015 16:52:29 +0000 (17:52 +0100)
Where the target page size is different from the host page
we special case it, but I messed up on the zero case check.

Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/ram.c

index d8d5a50bffa3fc8dec23415ccf45a9b409c730bb..7f32696d7988f59ef5131bf546b4e4ff0171cfab 100644 (file)
@@ -2274,6 +2274,7 @@ static int ram_load_postcopy(QEMUFile *f)
     /* Temporary page that is later 'placed' */
     void *postcopy_host_page = postcopy_get_tmp_page(mis);
     void *last_host = NULL;
+    bool all_zero = false;
 
     while (!ret && !(flags & RAM_SAVE_FLAG_EOS)) {
         ram_addr_t addr;
@@ -2281,7 +2282,6 @@ static int ram_load_postcopy(QEMUFile *f)
         void *page_buffer = NULL;
         void *place_source = NULL;
         uint8_t ch;
-        bool all_zero = false;
 
         addr = qemu_get_be64(f);
         flags = addr & ~TARGET_PAGE_MASK;