@@ -246,7 +246,7 @@ int ram_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque)
int ram_load(QEMUFile *f, void *opaque, int version_id)
{
ram_addr_t addr;
- int flags;
+ int flags, bytes_sent;
if (version_id != 3) {
return -EINVAL;
@@ -274,12 +274,16 @@ int ram_load(QEMUFile *f, void *opaque, int version_id)
MADV_DONTNEED);
}
#endif
+ bytes_sent = 1;
} else if (flags & RAM_SAVE_FLAG_PAGE) {
qemu_get_buffer(f, qemu_get_ram_ptr(addr), TARGET_PAGE_SIZE);
+ bytes_sent = TARGET_PAGE_SIZE;
}
if (qemu_file_has_error(f)) {
return -EIO;
}
+
+ bytes_transferred += bytes_sent;
} while (!(flags & RAM_SAVE_FLAG_EOS));
return 0;
Currently incoming side of migration doesn't know how many bytes are transferred. To print "info migrate" on incoming side, we need to calculate transferred bytes at ram_load(). Signed-off-by: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp> --- arch_init.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)