summaryrefslogtreecommitdiff
path: root/drivers/vdpa
diff options
context:
space:
mode:
authorEli Cohen <elic@nvidia.com>2023-02-06 15:20:16 +0300
committerMichael S. Tsirkin <mst@redhat.com>2023-02-21 03:27:00 +0300
commitc04e2145b8c9e1429ad2134291a830d2ba39657a (patch)
tree075031f4e38eabf0b344ba29ecaa1751c8be1e46 /drivers/vdpa
parentaef24311bd2d8a6d39a80c34f278b0fd1692aed3 (diff)
downloadlinux-c04e2145b8c9e1429ad2134291a830d2ba39657a.tar.xz
vdpa/mlx5: Initialize CVQ iotlb spinlock
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>
Diffstat (limited to 'drivers/vdpa')
-rw-r--r--drivers/vdpa/mlx5/core/resources.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/vdpa/mlx5/core/resources.c b/drivers/vdpa/mlx5/core/resources.c
index 45ad41287a31..d5a59c9035fb 100644
--- a/drivers/vdpa/mlx5/core/resources.c
+++ b/drivers/vdpa/mlx5/core/resources.c
@@ -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;