vfio/mlx5: Improve the target side flow to reduce downtime
authorYishai Hadas <yishaih@nvidia.com>
Tue, 24 Jan 2023 14:49:55 +0000 (16:49 +0200)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 30 Jan 2023 19:16:15 +0000 (12:16 -0700)
commitf4f0c25e5d726e353369258b5ce28a01bd71aa47
treed503f64863fd58face6ffaa9c2595bcfae466323
parentb04e2e86e919633825728007484508dbdc44c7bb
vfio/mlx5: Improve the target side flow to reduce downtime

Improve the target side flow to reduce downtime as of below.

- Support reading an optional record which includes the expected
  stop_copy size.
- Once the source sends this record data, which expects to be sent as
  part of the pre_copy flow, prepare the data buffers that may be large
  enough to hold the final stop_copy data.

The above reduces the migration downtime as the relevant stuff that is
needed to load the image data is prepared ahead as part of pre_copy.

Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Link: https://lore.kernel.org/r/20230124144955.139901-4-yishaih@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/pci/mlx5/cmd.h
drivers/vfio/pci/mlx5/main.c