All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Fully lock the container members of struct vfio_group
@ 2022-05-06  0:25 Jason Gunthorpe
  2022-05-06  0:25 ` [PATCH 1/6] vfio: Add missing locking for struct vfio_group::kvm Jason Gunthorpe
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Jason Gunthorpe @ 2022-05-06  0:25 UTC (permalink / raw)
  To: Alex Williamson, Cornelia Huck, kvm
  Cc: Xiao Guangrong, Jike Song, Kirti Wankhede, Nicolin Chen, Paolo Bonzini

The atomic based scheme for tracking the group->container and group->kvm
has two race conditions, simplify it by adding a rwsem to protect those
values and related and remove the atomics.

It is based on top of all the series thus far:
 - rc3
 - vfio_mdev_no_group
 - vfio_kvm_no_group
 - vfio_get_from_dev
 - iommu series

To make all this work removing alot of the container_users cases was
necessary, which was accomplished in prior series.

This is on github: https://github.com/jgunthorpe/linux/commits/vfio_group_locking

(which also has all 82 patches listed above)

This has been rebased far too many times, I've checked this version and so
has Nicolin, but it could use a careful 3rd look.

Jason Gunthorpe (6):
  vfio: Add missing locking for struct vfio_group::kvm
  vfio: Change struct vfio_group::opened from an atomic to bool
  vfio: Split up vfio_group_get_device_fd()
  vfio: Fully lock struct vfio_group::container
  vfio: Simplify the life cycle of the group FD
  vfio: Change struct vfio_group::container_users to a non-atomic int

 drivers/vfio/vfio.c | 273 +++++++++++++++++++++++++++-----------------
 1 file changed, 166 insertions(+), 107 deletions(-)


base-commit: e50abb9a762947bd0b9ffc73b7e28e5523f6eab8
-- 
2.36.0


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

end of thread, other threads:[~2022-05-13 13:50 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-06  0:25 [PATCH 0/6] Fully lock the container members of struct vfio_group Jason Gunthorpe
2022-05-06  0:25 ` [PATCH 1/6] vfio: Add missing locking for struct vfio_group::kvm Jason Gunthorpe
2022-05-13  9:08   ` Tian, Kevin
2022-05-13 13:16     ` Jason Gunthorpe
2022-05-06  0:25 ` [PATCH 2/6] vfio: Change struct vfio_group::opened from an atomic to bool Jason Gunthorpe
2022-05-13  9:10   ` Tian, Kevin
2022-05-06  0:25 ` [PATCH 3/6] vfio: Split up vfio_group_get_device_fd() Jason Gunthorpe
2022-05-10 19:59   ` Alex Williamson
2022-05-10 23:48     ` Jason Gunthorpe
2022-05-13  9:40   ` Tian, Kevin
2022-05-06  0:25 ` [PATCH 4/6] vfio: Fully lock struct vfio_group::container Jason Gunthorpe
2022-05-13  9:53   ` Tian, Kevin
2022-05-13 13:29     ` Jason Gunthorpe
2022-05-06  0:25 ` [PATCH 5/6] vfio: Simplify the life cycle of the group FD Jason Gunthorpe
2022-05-10 19:59   ` Alex Williamson
2022-05-12 23:35     ` Jason Gunthorpe
2022-05-13  9:57   ` Tian, Kevin
2022-05-06  0:25 ` [PATCH 6/6] vfio: Change struct vfio_group::container_users to a non-atomic int Jason Gunthorpe
2022-05-13 10:01   ` Tian, Kevin

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.