summary refs log tree commit diff stats
path: root/accel/tcg/user-exec.c
diff options
context:
space:
mode:
authorAvihai Horon <avihaih@nvidia.com>2024-10-20 16:01:06 +0300
committerCédric Le Goater <clg@redhat.com>2024-10-23 14:46:24 +0200
commit3b5948f808e3b99aedfa0aff45cffbe8b7ec07ed (patch)
tree798f58796dc96fc62f9a5713641b6fdada41b3d3 /accel/tcg/user-exec.c
parent6f625ce2f21d6a1243065d236298277c56f972d5 (diff)
downloadfocaccia-qemu-3b5948f808e3b99aedfa0aff45cffbe8b7ec07ed.tar.gz
focaccia-qemu-3b5948f808e3b99aedfa0aff45cffbe8b7ec07ed.zip
vfio/migration: Report only stop-copy size in vfio_state_pending_exact()
vfio_state_pending_exact() is used to update migration core how much
device data is left for the device migration. Currently, the sum of
pre-copy and stop-copy sizes of the VFIO device are reported.

The pre-copy size is obtained via the VFIO_MIG_GET_PRECOPY_INFO ioctl,
which returns the amount of device data available to be transferred
while the device is in the PRE_COPY states.

The stop-copy size is obtained via the VFIO_DEVICE_FEATURE_MIG_DATA_SIZE
ioctl, which returns the total amount of device data left to be
transferred in order to complete the device migration.

According to the above, current implementation is wrong -- it reports
extra overlapping data because pre-copy size is already contained in
stop-copy size. Fix it by reporting only stop-copy size.

Fixes: eda7362af959 ("vfio/migration: Add VFIO migration pre-copy support")
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'accel/tcg/user-exec.c')
0 files changed, 0 insertions, 0 deletions