Skip to contentSkip to conversation

vdpa/mlx5: Initialize CVQ iotlb spinlock

PATCH In review Eli Cohen 2 participants 4 messages Feb 6, 2023 – Feb 13, 2023

Subsystems (2)
lore
Share & tools
lore

Eli Cohen

author
#0 lore raw

PATCH 2/2 vdpa/mlx5: Initialize CVQ iotlb spinlock

Initialize itolb spinlock.

Fixes 5262912ef3cf ("vdpa/mlx5: Add support for control VQ and MAC setting")
---
 drivers/vdpa/mlx5/core/resources.c | 1 +
 1 file changed, 1 insertion(+)
drivers/vdpa/mlx5/core/resources.c +1 -0
index 45ad41287a31..d5a59c9035fb 100644
@@ -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;
Signature · 1 line
2.38.1
#1 lore raw
Quoted 4 lines · Eli Cohen

Initialize itolb spinlock.

Fixes 5262912ef3cf ("vdpa/mlx5: Add support for control VQ and MAC setting")

threading was broken here but whatevs.

Quoted 18 lines
---
 drivers/vdpa/mlx5/core/resources.c | 1 +
 1 file changed, 1 insertion(+)
drivers/vdpa/mlx5/core/resources.c +1 -0
index 45ad41287a31..d5a59c9035fb 100644
@@ -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;
Signature · 1 line
2.38.1

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

author
#2 lore raw
Quoted 6 lines · Michael S. Tsirkin
Quoted 4 lines · Eli Cohen

Initialize itolb spinlock.

Fixes 5262912ef3cf ("vdpa/mlx5: Add support for control VQ and MAC setting")

threading was broken here but whatevs.

What exactly do you mean by "threading was broken". Is it because I sent two unrelated fixes together appearing as patch 1/2 and 2/2?

Quoted 19 lines
Quoted 19 lines
---
  drivers/vdpa/mlx5/core/resources.c | 1 +
  1 file changed, 1 insertion(+)
drivers/vdpa/mlx5/core/resources.c +1 -0
index 45ad41287a31..d5a59c9035fb 100644
@@ -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;
Signature · 1 line
2.38.1
#3 lore raw
Quoted 10 lines · Eli Cohen
Quoted 6 lines · Michael S. Tsirkin
Quoted 4 lines · Eli Cohen

Initialize itolb spinlock.

Fixes 5262912ef3cf ("vdpa/mlx5: Add support for control VQ and MAC setting")

threading was broken here but whatevs.

What exactly do you mean by "threading was broken". Is it because I sent two unrelated fixes together appearing as patch 1/2 and 2/2?

exactly. if I see 2/2 I expect a thread so I can find 1/2 and preferably a cover letter explaining what unifies all these patches.
If they are unrelated no need to number them.

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
---
  drivers/vdpa/mlx5/core/resources.c | 1 +
  1 file changed, 1 insertion(+)
Quoted 12 lines
Quoted 4 lines
Quoted 4 lines
drivers/vdpa/mlx5/core/resources.c +0 -0
index 45ad41287a31..d5a59c9035fb 100644
Quoted 8 lines
Quoted 8 lines
drivers/vdpa/mlx5/core/resources.c +1 -0
@@ -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;
Signature · 1 line
2.38.1

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization