All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Update vfio_group to use the modern cdev lifecycle
@ 2021-10-01 23:22 Jason Gunthorpe
  2021-10-01 23:22 ` [PATCH 1/5] vfio: Delete vfio_get/put_group from vfio_iommu_group_notifier() Jason Gunthorpe
                   ` (4 more replies)
  0 siblings, 5 replies; 29+ messages in thread
From: Jason Gunthorpe @ 2021-10-01 23:22 UTC (permalink / raw)
  To: Alex Williamson, Cornelia Huck, kvm
  Cc: Christoph Hellwig, Tian, Kevin, Liu Yi L

These days drivers with state should use cdev_device_add() and
cdev_device_del() to manage the cdev and sysfs lifetime. This simple
pattern ties all the state (vfio, dev, and cdev) together in one memory
structure and uses container_of() to navigate between the layers.

This is a followup to the discussion here:

https://lore.kernel.org/kvm/20210921155705.GN327412@nvidia.com/

This builds on Christoph's work to revise how the vfio_group works and is
against the latest VFIO tree.

Jason Gunthorpe (5):
  vfio: Delete vfio_get/put_group from vfio_iommu_group_notifier()
  vfio: Do not open code the group list search in vfio_create_group()
  vfio: Don't leak a group reference if the group already exists
  vfio: Use a refcount_t instead of a kref in the vfio_group
  vfio: Use cdev_device_add() instead of device_create()

 drivers/vfio/vfio.c | 363 +++++++++++++++++---------------------------
 1 file changed, 140 insertions(+), 223 deletions(-)


base-commit: d9a0cd510c3383b61db6f70a84e0c3487f836a63
-- 
2.33.0


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

end of thread, other threads:[~2021-10-13 14:16 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-01 23:22 [PATCH 0/5] Update vfio_group to use the modern cdev lifecycle Jason Gunthorpe
2021-10-01 23:22 ` [PATCH 1/5] vfio: Delete vfio_get/put_group from vfio_iommu_group_notifier() Jason Gunthorpe
2021-10-04 22:25   ` Alex Williamson
2021-10-04 22:34     ` Jason Gunthorpe
2021-10-05  4:01       ` Alex Williamson
2021-10-05 16:17         ` Jason Gunthorpe
2021-10-12  6:32   ` Tian, Kevin
2021-10-12  8:51   ` Liu, Yi L
2021-10-01 23:22 ` [PATCH 2/5] vfio: Do not open code the group list search in vfio_create_group() Jason Gunthorpe
2021-10-02  3:19   ` kernel test robot
2021-10-12  6:37   ` Tian, Kevin
2021-10-12  8:52   ` Liu, Yi L
2021-10-01 23:22 ` [PATCH 3/5] vfio: Don't leak a group reference if the group already exists Jason Gunthorpe
2021-10-04 22:25   ` Alex Williamson
2021-10-04 22:36     ` Jason Gunthorpe
2021-10-05  4:01       ` Alex Williamson
2021-10-05 14:45         ` Jason Gunthorpe
2021-10-01 23:22 ` [PATCH 4/5] vfio: Use a refcount_t instead of a kref in the vfio_group Jason Gunthorpe
2021-10-04 22:25   ` Alex Williamson
2021-10-04 22:39     ` Jason Gunthorpe
2021-10-12  7:08   ` Tian, Kevin
2021-10-12  9:04   ` Liu, Yi L
2021-10-01 23:22 ` [PATCH 5/5] vfio: Use cdev_device_add() instead of device_create() Jason Gunthorpe
2021-10-12  8:33   ` Tian, Kevin
2021-10-12 12:05     ` Jason Gunthorpe
2021-10-13  1:07       ` Tian, Kevin
2021-10-12  8:57   ` Liu, Yi L
2021-10-13 12:49     ` Jason Gunthorpe
2021-10-13 14:15       ` Liu, Yi L

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.