search for: mkey_mtx

Displaying 10 results from an estimated 10 matches for "mkey_mtx".

2023 Sep 09
0
[PATCH RFC v2 2/4] vdpa/mlx5: implement .reset_map driver op
...*mvdev) { struct mlx5_vdpa_mr *mr = &mvdev->mr; - if (mvdev->group2asid[MLX5_VDPA_DATAVQ_GROUP] != asid) - return; - if (!mr->initialized) return; @@ -521,8 +515,10 @@ void mlx5_vdpa_destroy_mr_asid(struct mlx5_vdpa_dev *mvdev, unsigned int asid) mutex_lock(&mr->mkey_mtx); - _mlx5_vdpa_destroy_dvq_mr(mvdev, asid); - _mlx5_vdpa_destroy_cvq_mr(mvdev, asid); + if (mvdev->group2asid[MLX5_VDPA_DATAVQ_GROUP] == asid) + _mlx5_vdpa_destroy_dvq_mr(mvdev); + if (mvdev->group2asid[MLX5_VDPA_CVQ_GROUP] == asid) + _mlx5_vdpa_destroy_cvq_mr(mvdev); mutex_unlock(&am...
2020 Sep 28
0
[PATCH V1 vhost-next] vdpa/mlx5: Make vdpa core driver a distinct module
...core/mr.c b/drivers/vdpa/mlx5/core/mr.c > index ef1c550f8266..c093eab6c714 100644 > --- a/drivers/vdpa/mlx5/core/mr.c > +++ b/drivers/vdpa/mlx5/core/mr.c > @@ -434,6 +434,7 @@ int mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb) > mutex_unlock(&mr->mkey_mtx); > return err; > } > +EXPORT_SYMBOL(mlx5_vdpa_create_mr); > > void mlx5_vdpa_destroy_mr(struct mlx5_vdpa_dev *mvdev) > { > @@ -456,6 +457,7 @@ void mlx5_vdpa_destroy_mr(struct mlx5_vdpa_dev *mvdev) > out: > mutex_unlock(&mr->mkey_mtx); > } > +EXPO...
2020 Sep 29
0
[PATCH V1 vhost-next] vdpa/mlx5: Make vdpa core driver a distinct module
...> index ef1c550f8266..c093eab6c714 100644 > > > --- a/drivers/vdpa/mlx5/core/mr.c > > > +++ b/drivers/vdpa/mlx5/core/mr.c > > > @@ -434,6 +434,7 @@ int mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb) > > > mutex_unlock(&mr->mkey_mtx); > > > return err; > > > } > > > +EXPORT_SYMBOL(mlx5_vdpa_create_mr); > > > > > > void mlx5_vdpa_destroy_mr(struct mlx5_vdpa_dev *mvdev) > > > { > > > @@ -456,6 +457,7 @@ void mlx5_vdpa_destroy_mr(struct mlx5_vdpa_dev *mvdev) &g...
2020 Jul 16
0
[PATCH vhost next 09/10] vdpa/mlx5: Add shared memory registration code
...^~~~~~~~~~~~~~~~~~~~ vim +/mlx5_vdpa_create_mr +414 drivers/vdpa/mlx5/core/mr.c 413 > 414 int mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb) 415 { 416 struct mlx5_vdpa_mr *mr = &mvdev->mr; 417 int err; 418 419 mutex_lock(&mr->mkey_mtx); 420 err = _mlx5_vdpa_create_mr(mvdev, iotlb); 421 mutex_unlock(&mr->mkey_mtx); 422 return err; 423 } 424 > 425 void mlx5_vdpa_destroy_mr(struct mlx5_vdpa_dev *mvdev) 426 { 427 struct mlx5_vdpa_mr *mr = &mvdev->mr; 428 struct mlx5_vdpa_direct_mr *dmr...
2020 Sep 29
0
[PATCH V1 vhost-next] vdpa/mlx5: Make vdpa core driver a distinct module
...0644 > > > > > --- a/drivers/vdpa/mlx5/core/mr.c > > > > > +++ b/drivers/vdpa/mlx5/core/mr.c > > > > > @@ -434,6 +434,7 @@ int mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb) > > > > > mutex_unlock(&mr->mkey_mtx); > > > > > return err; > > > > > } > > > > > +EXPORT_SYMBOL(mlx5_vdpa_create_mr); > > > > > > > > > > void mlx5_vdpa_destroy_mr(struct mlx5_vdpa_dev *mvdev) > > > > > { > > > > > @@ -456...
2020 Sep 29
0
[PATCH V1 vhost-next] vdpa/mlx5: Make vdpa core driver a distinct module
...--- a/drivers/vdpa/mlx5/core/mr.c > > > > > > > +++ b/drivers/vdpa/mlx5/core/mr.c > > > > > > > @@ -434,6 +434,7 @@ int mlx5_vdpa_create_mr(struct mlx5_vdpa_dev *mvdev, struct vhost_iotlb *iotlb) > > > > > > > mutex_unlock(&mr->mkey_mtx); > > > > > > > return err; > > > > > > > } > > > > > > > +EXPORT_SYMBOL(mlx5_vdpa_create_mr); > > > > > > > > > > > > > > void mlx5_vdpa_destroy_mr(struct mlx5_vdpa_dev *mvdev) > >...
2023 Aug 02
3
[PATCH 0/2] vdpa/mlx5: Fixes for ASID handling
This patch series is based on Eugenio's fix for handling CVQs in a different ASID [0]. The first patch is the actual fix. The next 2 patches are fixing a possible issue that I found while implementing patch 1. The patches are ordered like this for clarity. [0] https://lore.kernel.org/lkml/20230112142218.725622-1-eperezma at redhat.com/ Dragos Tatulea (1): vdpa/mlx5: Fix
2023 Aug 02
3
[PATCH 0/2] vdpa/mlx5: Fixes for ASID handling
This patch series is based on Eugenio's fix for handling CVQs in a different ASID [0]. The first patch is the actual fix. The next 2 patches are fixing a possible issue that I found while implementing patch 1. The patches are ordered like this for clarity. [0] https://lore.kernel.org/lkml/20230112142218.725622-1-eperezma at redhat.com/ Dragos Tatulea (1): vdpa/mlx5: Fix
2023 Sep 09
4
[PATCH RFC v2 0/4] vdpa: decouple reset of iotlb mapping from device reset
In order to reduce needlessly high setup and teardown cost of iotlb mapping during live migration, it's crucial to decouple the vhost-vdpa iotlb abstraction from the virtio device life cycle, i.e. iotlb mappings should be left intact across virtio device reset [1]. For it to work, the on-chip IOMMU parent device should implement a separate .reset_map() operation callback to restore 1:1 DMA
2023 Sep 09
4
[PATCH RFC v3 0/4] vdpa: decouple reset of iotlb mapping from device reset
In order to reduce needlessly high setup and teardown cost of iotlb mapping during live migration, it's crucial to decouple the vhost-vdpa iotlb abstraction from the virtio device life cycle, i.e. iotlb mappings should be left intact across virtio device reset [1]. For it to work, the on-chip IOMMU parent device should implement a separate .reset_map() operation callback to restore 1:1 DMA