qemu-e2k/migration
Avihai Horon 808642a2f6 vfio/migration: Reset bytes_transferred properly
Currently, VFIO bytes_transferred is not reset properly:
1. bytes_transferred is not reset after a VM snapshot (so a migration
   following a snapshot will report incorrect value).
2. bytes_transferred is a single counter for all VFIO devices, however
   upon migration failure it is reset multiple times, by each VFIO
   device.

Fix it by introducing a new function vfio_reset_bytes_transferred() and
calling it during migration and snapshot start.

Remove existing bytes_transferred reset in VFIO migration state
notifier, which is not needed anymore.

Fixes: 3710586caa ("qapi: Add VFIO devices migration stats in Migration stats")
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
2023-06-30 06:02:51 +02:00
..
block-dirty-bitmap.c migration: Move rate_limit_max and rate_limit_used to migration_stats 2023-05-18 18:40:51 +02:00
block.c migration: Move rate_limit_max and rate_limit_used to migration_stats 2023-05-18 18:40:51 +02:00
block.h
channel-block.c
channel-block.h
channel.c
channel.h
colo-failover.c
colo.c migration: process_incoming_migration_co(): move colo part to colo 2023-05-18 18:40:51 +02:00
dirtyrate.c migration: Add last stage indicator to global dirty log 2023-05-18 08:53:50 +02:00
dirtyrate.h
exec.c
exec.h
fd.c bulk: Remove pointless QOM casts 2023-06-05 20:48:34 +02:00
fd.h
global_state.c migration: never fail in global_state_store() 2023-06-02 01:03:19 +02:00
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
migration-hmp-cmds.c build: move COLO under CONFIG_REPLICATION 2023-05-10 18:48:11 +02:00
migration-stats.c migration: We don't need the field rate_limit_used anymore 2023-05-18 18:40:51 +02:00
migration-stats.h migration: We don't need the field rate_limit_used anymore 2023-05-18 18:40:51 +02:00
migration.c vfio/migration: Reset bytes_transferred properly 2023-06-30 06:02:51 +02:00
migration.h vfio/migration: Reset bytes_transferred properly 2023-06-30 06:02:51 +02:00
multifd-zlib.c
multifd-zstd.c
multifd.c bulk: Remove pointless QOM casts 2023-06-05 20:48:34 +02:00
multifd.h multifd: Add the ramblock to MultiFDRecvParams 2023-05-10 18:48:11 +02:00
options.c migration: Enable switchover ack capability 2023-06-30 06:02:51 +02:00
options.h migration: Add switchover ack capability 2023-06-30 06:02:51 +02:00
page_cache.c
page_cache.h
postcopy-ram.c migration: Drop unused parameter for migration_tls_client_create() 2023-05-03 11:24:20 +02:00
postcopy-ram.h
qemu-file.c migration: We don't need the field rate_limit_used anymore 2023-05-18 18:40:51 +02:00
qemu-file.h migration: Move rate_limit_max and rate_limit_used to migration_stats 2023-05-18 18:40:51 +02:00
ram-compress.c ram-compress.c: Make target independent 2023-05-08 15:25:26 +02:00
ram-compress.h ram.c: Move core decompression code into its own file 2023-05-08 15:25:26 +02:00
ram.c exec/memory: Introduce RAM_NAMED_FILE flag 2023-06-13 11:28:58 +02:00
ram.h ram: Add public helper to set colo bitmap 2023-05-10 18:48:11 +02:00
rdma.c aio: remove aio_disable_external() API 2023-05-30 17:37:26 +02:00
rdma.h
savevm.c vfio/migration: Reset bytes_transferred properly 2023-06-30 06:02:51 +02:00
savevm.h migration: Implement switchover ack logic 2023-06-30 06:02:51 +02:00
socket.c
socket.h
target.c vfio/migration: Reset bytes_transferred properly 2023-06-30 06:02:51 +02:00
threadinfo.c
threadinfo.h
tls.c migration: Drop unused parameter for migration_tls_client_create() 2023-05-03 11:24:20 +02:00
tls.h migration: Drop unused parameter for migration_tls_client_create() 2023-05-03 11:24:20 +02:00
trace-events migration: Implement switchover ack logic 2023-06-30 06:02:51 +02:00
trace.h
vmstate-types.c
vmstate.c qemu-file: Remove total from qemu_file_total_transferred_*() 2023-05-15 13:46:14 +02:00
xbzrle.c migration/xbzrle: Use i386 host/cpuinfo.h 2023-05-23 16:51:18 -07:00
xbzrle.h migration/xbzrle: Use i386 host/cpuinfo.h 2023-05-23 16:51:18 -07:00
yank_functions.c bulk: Remove pointless QOM casts 2023-06-05 20:48:34 +02:00
yank_functions.h