vdpa/mlx5: Initialize CVQ iotlb spinlock
authorEli Cohen <elic@nvidia.com>
Mon, 6 Feb 2023 12:20:16 +0000 (14:20 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 21 Feb 2023 00:27:00 +0000 (19:27 -0500)
Initialize itolb spinlock.

Fixes: 5262912ef3cf ("vdpa/mlx5: Add support for control VQ and MAC setting")
Signed-off-by: Eli Cohen <elic@nvidia.com>
Message-Id: <20230206122016.1149373-1-elic@nvidia.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vdpa/mlx5/core/resources.c

index 45ad412..d5a59c9 100644 (file)
@@ -233,6 +233,7 @@ static int init_ctrl_vq(struct mlx5_vdpa_dev *mvdev)
        if (!mvdev->cvq.iotlb)
                return -ENOMEM;
 
+       spin_lock_init(&mvdev->cvq.iommu_lock);
        vringh_set_iotlb(&mvdev->cvq.vring, mvdev->cvq.iotlb, &mvdev->cvq.iommu_lock);
 
        return 0;