public inbox for virtualization@lists.linux-foundation.org
 help / color / mirror / Atom feed
* [PATCH vhost v2 0/8] vdpa/mlx5: Add support for resumable vqs
@ 2023-12-05 10:46 Dragos Tatulea
  2023-12-05 10:46 ` [PATCH mlx5-vhost v2 1/8] vdpa/mlx5: Expose resumable vq capability Dragos Tatulea
                   ` (7 more replies)
  0 siblings, 8 replies; 31+ messages in thread
From: Dragos Tatulea @ 2023-12-05 10:46 UTC (permalink / raw)
  To: Michael S . Tsirkin, Jason Wang, Eugenio Perez Martin, Si-Wei Liu,
	Saeed Mahameed, Leon Romanovsky, virtualization, Gal Pressman
  Cc: Dragos Tatulea, kvm, linux-kernel, Parav Pandit, Xuan Zhuo

Add support for resumable vqs in the driver. This is a firmware feature
that can be used for the following benefits:
- Full device .suspend/.resume.
- .set_map doesn't need to destroy and create new vqs anymore just to
  update the map. When resumable vqs are supported it is enough to
  suspend the vqs, set the new maps, and then resume the vqs.

The first patch exposes the relevant bits in mlx5_ifc.h. That means it
needs to be applied to the mlx5-vhost tree [0] first. Once applied
there, the change has to be pulled from mlx5-vhost into the vhost tree
and only then the remaining patches can be applied. Same flow as the vq
descriptor mappings patchset [1].

To be able to use resumable vqs properly, support for selectively modifying
vq parameters was needed. This is what the second part of the series
consists of.

The middle part adds support for resumable vqs.

The last part of the series introduces reference counting for mrs which
is necessary to avoid freeing mkeys too early or leaking them.

* Changes in v2:
- Added mr refcounting patches.
- Deleted unnecessary patch: "vdpa/mlx5: Split function into locked and
  unlocked variants"
- Small print improvement in "Introduce per vq and device resume"
  patch.
- Patch 1/7 has been applied to mlx5-vhost branch.

[0] https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git/log/?h=mlx5-vhost
[1] https://lore.kernel.org/virtualization/20231018171456.1624030-2-dtatulea@nvidia.com/


Dragos Tatulea (8):
  vdpa/mlx5: Expose resumable vq capability
  vdpa/mlx5: Allow modifying multiple vq fields in one modify command
  vdpa/mlx5: Introduce per vq and device resume
  vdpa/mlx5: Mark vq addrs for modification in hw vq
  vdpa/mlx5: Mark vq state for modification in hw vq
  vdpa/mlx5: Use vq suspend/resume during .set_map
  vdpa/mlx5: Introduce reference counting to mrs
  vdpa/mlx5: Add mkey leak detection

 drivers/vdpa/mlx5/core/mlx5_vdpa.h |  10 +-
 drivers/vdpa/mlx5/core/mr.c        |  69 ++++++++--
 drivers/vdpa/mlx5/net/mlx5_vnet.c  | 209 ++++++++++++++++++++++++++---
 include/linux/mlx5/mlx5_ifc.h      |   3 +-
 include/linux/mlx5/mlx5_ifc_vdpa.h |   4 +
 5 files changed, 257 insertions(+), 38 deletions(-)

-- 
2.42.0


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2023-12-19 15:11 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-05 10:46 [PATCH vhost v2 0/8] vdpa/mlx5: Add support for resumable vqs Dragos Tatulea
2023-12-05 10:46 ` [PATCH mlx5-vhost v2 1/8] vdpa/mlx5: Expose resumable vq capability Dragos Tatulea
2023-12-05 10:46 ` [PATCH vhost v2 2/8] vdpa/mlx5: Allow modifying multiple vq fields in one modify command Dragos Tatulea
2023-12-05 10:46 ` [PATCH vhost v2 3/8] vdpa/mlx5: Introduce per vq and device resume Dragos Tatulea
2023-12-05 10:46 ` [PATCH vhost v2 4/8] vdpa/mlx5: Mark vq addrs for modification in hw vq Dragos Tatulea
2023-12-12 19:21   ` Eugenio Perez Martin
2023-12-12 19:44     ` Dragos Tatulea
2023-12-12 23:44     ` Si-Wei Liu
2023-12-14 13:39       ` Dragos Tatulea
2023-12-14 13:45         ` Michael S. Tsirkin
2023-12-14 15:51           ` Dragos Tatulea
2023-12-14 18:30             ` Eugenio Perez Martin
2023-12-15 12:35               ` Dragos Tatulea
2023-12-15 14:13                 ` Dragos Tatulea
2023-12-15 17:56                   ` Eugenio Perez Martin
2023-12-16 11:03                     ` Dragos Tatulea
2023-12-18 10:16                       ` Eugenio Perez Martin
2023-12-18 10:52                         ` Dragos Tatulea
2023-12-18 12:06                           ` Eugenio Perez Martin
2023-12-18 13:58                             ` Dragos Tatulea
2023-12-19  7:24                               ` Eugenio Perez Martin
2023-12-19 11:16                                 ` Dragos Tatulea
2023-12-19 14:02                                   ` Eugenio Perez Martin
2023-12-19 15:11                                     ` Dragos Tatulea
2023-12-05 10:46 ` [PATCH vhost v2 5/8] vdpa/mlx5: Mark vq state " Dragos Tatulea
2023-12-05 10:46 ` [PATCH vhost v2 6/8] vdpa/mlx5: Use vq suspend/resume during .set_map Dragos Tatulea
2023-12-12 19:22   ` Eugenio Perez Martin
2023-12-05 10:46 ` [PATCH vhost v2 7/8] vdpa/mlx5: Introduce reference counting to mrs Dragos Tatulea
2023-12-12 18:26   ` Eugenio Perez Martin
2023-12-05 10:46 ` [PATCH vhost v2 8/8] vdpa/mlx5: Add mkey leak detection Dragos Tatulea
2023-12-12 18:32   ` Eugenio Perez Martin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox