}
 
 void mlx5vf_cmd_set_migratable(struct mlx5vf_pci_core_device *mvdev,
-                              const struct vfio_migration_ops *mig_ops)
+                              const struct vfio_migration_ops *mig_ops,
+                              const struct vfio_log_ops *log_ops)
 {
        struct pci_dev *pdev = mvdev->core_device.pdev;
        int ret;
                VFIO_MIGRATION_P2P;
        mvdev->core_device.vdev.mig_ops = mig_ops;
        init_completion(&mvdev->tracker_comp);
+       if (MLX5_CAP_GEN(mvdev->mdev, adv_virtualization))
+               mvdev->core_device.vdev.log_ops = log_ops;
 
 end:
        mlx5_vf_put_core_dev(mvdev->mdev);
 
 int mlx5vf_cmd_query_vhca_migration_state(struct mlx5vf_pci_core_device *mvdev,
                                          size_t *state_size);
 void mlx5vf_cmd_set_migratable(struct mlx5vf_pci_core_device *mvdev,
-                              const struct vfio_migration_ops *mig_ops);
+                              const struct vfio_migration_ops *mig_ops,
+                              const struct vfio_log_ops *log_ops);
 void mlx5vf_cmd_remove_migratable(struct mlx5vf_pci_core_device *mvdev);
 void mlx5vf_cmd_close_migratable(struct mlx5vf_pci_core_device *mvdev);
 int mlx5vf_cmd_save_vhca_state(struct mlx5vf_pci_core_device *mvdev,
 
        .migration_get_state = mlx5vf_pci_get_device_state,
 };
 
+static const struct vfio_log_ops mlx5vf_pci_log_ops = {
+       .log_start = mlx5vf_start_page_tracker,
+       .log_stop = mlx5vf_stop_page_tracker,
+       .log_read_and_clear = mlx5vf_tracker_read_and_clear,
+};
+
 static const struct vfio_device_ops mlx5vf_pci_ops = {
        .name = "mlx5-vfio-pci",
        .open_device = mlx5vf_pci_open_device,
        if (!mvdev)
                return -ENOMEM;
        vfio_pci_core_init_device(&mvdev->core_device, pdev, &mlx5vf_pci_ops);
-       mlx5vf_cmd_set_migratable(mvdev, &mlx5vf_pci_mig_ops);
+       mlx5vf_cmd_set_migratable(mvdev, &mlx5vf_pci_mig_ops,
+                                 &mlx5vf_pci_log_ops);
        dev_set_drvdata(&pdev->dev, &mvdev->core_device);
        ret = vfio_pci_core_register_device(&mvdev->core_device);
        if (ret)