Skip to content

Commit ccc2a52

Browse files
shayshyiawilliam
authored andcommitted
vfio/mlx5: Enable MIGRATION_PRE_COPY flag
Now that everything has been set up for MIGRATION_PRE_COPY, enable it. Signed-off-by: Shay Drory <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Signed-off-by: Yishai Hadas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alex Williamson <[email protected]>
1 parent d6e18a4 commit ccc2a52

File tree

1 file changed

+5
-0
lines changed
  • drivers/vfio/pci/mlx5

1 file changed

+5
-0
lines changed

drivers/vfio/pci/mlx5/cmd.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,11 @@ void mlx5vf_cmd_set_migratable(struct mlx5vf_pci_core_device *mvdev,
222222
if (MLX5_CAP_GEN(mvdev->mdev, adv_virtualization))
223223
mvdev->core_device.vdev.log_ops = log_ops;
224224

225+
if (MLX5_CAP_GEN_2(mvdev->mdev, migration_multi_load) &&
226+
MLX5_CAP_GEN_2(mvdev->mdev, migration_tracking_state))
227+
mvdev->core_device.vdev.migration_flags |=
228+
VFIO_MIGRATION_PRE_COPY;
229+
225230
end:
226231
mlx5_vf_put_core_dev(mvdev->mdev);
227232
}

0 commit comments

Comments
 (0)