diff options
author | 2023-09-11 12:38:56 +0300 | |
---|---|---|
committer | 2023-09-28 13:07:29 -0600 | |
commit | fcb2f2ed4a80cfe383d87da75caba958516507e9 (patch) | |
tree | 5e7206e54f6caf2bd6f2195680ea4b3340497c91 /drivers/vfio/pci | |
parent | vfio/mlx5: Add support for READING in chunk mode (diff) | |
download | linux-fcb2f2ed4a80cfe383d87da75caba958516507e9.tar.gz linux-fcb2f2ed4a80cfe383d87da75caba958516507e9.tar.bz2 linux-fcb2f2ed4a80cfe383d87da75caba958516507e9.zip |
vfio/mlx5: Activate the chunk mode functionality
Now that all pieces are in place, activate the chunk mode functionality
based on device capabilities.
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20230911093856.81910-10-yishaih@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/pci')
-rw-r--r-- | drivers/vfio/pci/mlx5/cmd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/vfio/pci/mlx5/cmd.c b/drivers/vfio/pci/mlx5/cmd.c index e68bf9ba5300..efd1d252cdc9 100644 --- a/drivers/vfio/pci/mlx5/cmd.c +++ b/drivers/vfio/pci/mlx5/cmd.c @@ -261,6 +261,9 @@ void mlx5vf_cmd_set_migratable(struct mlx5vf_pci_core_device *mvdev, mvdev->core_device.vdev.migration_flags |= VFIO_MIGRATION_PRE_COPY; + if (MLX5_CAP_GEN_2(mvdev->mdev, migration_in_chunks)) + mvdev->chunk_mode = 1; + end: mlx5_vf_put_core_dev(mvdev->mdev); } |