vfio/mlx5: Fix the report of dirty_bytes upon pre-copy
authorYishai Hadas <yishaih@nvidia.com>
Wed, 8 Mar 2023 15:57:23 +0000 (17:57 +0200)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 13 Mar 2023 18:50:59 +0000 (12:50 -0600)
commit4928f67bc911e46a43004251a4d7eb2259ba6077
tree6d9a4ccf25af6df8a0e58a7d540b8384d7158586
parenteeac8ede17557680855031c6f305ece2378af326
vfio/mlx5: Fix the report of dirty_bytes upon pre-copy

Fix the report of dirty_bytes upon pre-copy to include both the existing
data on the migration file and the device extra bytes.

This gives a better close estimation to what can be passed any more as
part of pre-copy.

Fixes: 0dce165b1adf ("vfio/mlx5: Introduce vfio precopy ioctl implementation")
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://lore.kernel.org/r/20230308155723.108218-1-yishaih@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/mlx5/main.c