As we may do more than one migration (cancellation, live backup), reset
bytes_transferred on stage 1.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
return found;
}
-static uint64_t bytes_transferred = 0;
+static uint64_t bytes_transferred;
static ram_addr_t ram_save_remaining(void)
{
}
if (stage == 1) {
+ bytes_transferred = 0;
+
/* Make sure all dirty bits are set */
for (addr = 0; addr < last_ram_offset; addr += TARGET_PAGE_SIZE) {
if (!cpu_physical_memory_get_dirty(addr, MIGRATION_DIRTY_FLAG))