search for: reslock

Displaying 11 results from an estimated 11 matches for "reslock".

Did you mean: reclock
2023 Feb 15
1
[PATCH v3] vdpa/mlx5: should not activate virtq object when suspended
...vqs = 0; ndev->mvdev.cvq.received_desc = 0; ndev->mvdev.cvq.completed_desc = 0; @@ -2815,6 +2816,8 @@ static int mlx5_vdpa_suspend(struct vdpa_device *vdev) struct mlx5_vdpa_virtqueue *mvq; int i; + mlx5_vdpa_info(mvdev, "suspending device\n"); + down_write(&ndev->reslock); ndev->nb_registered = false; mlx5_notifier_unregister(mvdev->mdev, &ndev->nb); @@ -2824,6 +2827,7 @@ static int mlx5_vdpa_suspend(struct vdpa_device *vdev) suspend_vq(ndev, mvq); } mlx5_vdpa_cvq_suspend(mvdev); + mvdev->suspended = true; up_write(&ndev->reslock...
2023 Feb 16
1
[PATCH v3] vdpa/mlx5: should not activate virtq object when suspended
...gt;mvdev.cvq.completed_desc = 0; > @@ -2815,6 +2816,8 @@ static int mlx5_vdpa_suspend(struct vdpa_device *vdev) > struct mlx5_vdpa_virtqueue *mvq; > int i; > > + mlx5_vdpa_info(mvdev, "suspending device\n"); > + > down_write(&ndev->reslock); > ndev->nb_registered = false; > mlx5_notifier_unregister(mvdev->mdev, &ndev->nb); > @@ -2824,6 +2827,7 @@ static int mlx5_vdpa_suspend(struct vdpa_device *vdev) > suspend_vq(ndev, mvq); > } > mlx5_vdpa_cvq_suspend(mvd...
2023 Feb 16
1
[PATCH v3] vdpa/mlx5: should not activate virtq object when suspended
...; >> @@ -2815,6 +2816,8 @@ static int mlx5_vdpa_suspend(struct vdpa_device *vdev) >> struct mlx5_vdpa_virtqueue *mvq; >> int i; >> >> + mlx5_vdpa_info(mvdev, "suspending device\n"); >> + >> down_write(&ndev->reslock); >> ndev->nb_registered = false; >> mlx5_notifier_unregister(mvdev->mdev, &ndev->nb); >> @@ -2824,6 +2827,7 @@ static int mlx5_vdpa_suspend(struct vdpa_device *vdev) >> suspend_vq(ndev, mvq); >> } >>...
2023 Sep 09
0
[PATCH RFC v2 2/4] vdpa/mlx5: implement .reset_map driver op
...@@ static int mlx5_vdpa_reset(struct vdpa_device *vdev) init_group_to_asid_map(mvdev); ++mvdev->generation; - if (MLX5_CAP_GEN(mvdev->mdev, umem_uid_0)) { - if (mlx5_vdpa_create_mr(mvdev, NULL, 0)) - mlx5_vdpa_warn(mvdev, "create MR failed\n"); - } up_write(&ndev->reslock); return 0; @@ -2903,6 +2898,18 @@ static int mlx5_vdpa_set_map(struct vdpa_device *vdev, unsigned int asid, return err; } +static int mlx5_vdpa_reset_map(struct vdpa_device *vdev, unsigned int asid) +{ + struct mlx5_vdpa_dev *mvdev = to_mvdev(vdev); + struct mlx5_vdpa_net *ndev = to_mlx5_...
2020 Jul 16
0
[PATCH vhost next 10/10] vdpa/mlx5: Add VDPA driver for supported mlx5 devices
...> + struct mlx5_vdpa_virtqueue vqs[MLX5_MAX_SUPPORTED_VQS]; > + > + /* Serialize vq resources creation and destruction. This is required > + * since memory map might change and we need to destroy and create > + * resources while driver in operational. > + */ > + struct mutex reslock; > + struct mlx5_flow_table *rxft; > + struct mlx5_fc *rx_counter; > + struct mlx5_flow_handle *rx_rule; > + bool setup; > +}; > + > +static void free_resources(struct mlx5_vdpa_net *ndev); > +static void init_mvqs(struct mlx5_vdpa_net *ndev); > +static int setup_driver(s...
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
2023 Apr 03
0
[Patch v3] vdpa/mlx5: Avoid losing link state updates
...ev->config.max_virtqueue_pairs); > >> else > >> @@ -2629,6 +2738,7 @@ static int mlx5_vdpa_reset(struct vdpa_device *vdev) > >> mlx5_vdpa_info(mvdev, "performing device reset\n"); > >> > >> down_write(&ndev->reslock); > >> + unregister_link_notifier(ndev); > >> teardown_driver(ndev); > >> clear_vqs_ready(ndev); > >> mlx5_vdpa_destroy_mr(&ndev->mvdev); > >> @@ -2883,9 +2993,7 @@ static int mlx5_vdpa_suspend(struct vdpa_device *...
2020 Aug 10
0
[PATCH] vdpa/mlx5: fix up endian-ness for mtu
...al_features = features & ndev->mvdev.mlx_features; + ndev->config.mtu = __cpu_to_virtio16(mlx5_vdpa_is_little_endian(mvdev), + ndev->mtu); return err; } @@ -1925,7 +1935,7 @@ void *mlx5_vdpa_add_dev(struct mlx5_core_dev *mdev) init_mvqs(ndev); mutex_init(&ndev->reslock); config = &ndev->config; - err = mlx5_query_nic_vport_mtu(mdev, &config->mtu); + err = mlx5_query_nic_vport_mtu(mdev, &ndev->mtu); if (err) goto err_mtu; -- MST
2023 Mar 27
0
[PATCH] vdpa/mlx5: Avoid losing link state updates
...ev->nb_registered && ndev->config_cb.callback) > ndev->config_cb.callback(ndev->config_cb.private); > > @@ -3172,6 +3196,7 @@ static int mlx5_vdpa_dev_add(struct vdpa_mgmt_dev *v_mdev, const char *name, > > init_mvqs(ndev); > init_rwsem(&ndev->reslock); > + spin_lock_init(&ndev->status_lock); > config = &ndev->config; > > if (add_config->mask & BIT_ULL(VDPA_ATTR_DEV_NET_CFG_MTU)) { > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.h b/drivers/vdpa/mlx5/net/mlx5_vnet.h > index c90a89e1de4d..3666bbaa8822 1...
2020 Nov 01
12
[PATCH mlx5-next v1 00/11] Convert mlx5 to use auxiliary bus
From: Leon Romanovsky <leonro at nvidia.com> Changelog: v1: * Renamed _mlx5_rescan_driver to be mlx5_rescan_driver_locked like in other parts of the mlx5 driver. * Renamed MLX5_INTERFACE_PROTOCOL_VDPA to tbe MLX5_INTERFACE_PROTOCOL_VNET as a preparation to coming series from Eli C. * Some small naming renames in mlx5_vdpa. * Refactored adev index code to make Parav's SF series