Re: [PATCH v2 08/14] vfio/pci: Move to the device set infrastructure

2021-07-23 Thread Jason Gunthorpe
On Fri, Jul 23, 2021 at 09:47:49AM +0200, Christoph Hellwig wrote: > > @@ -2020,12 +2004,17 @@ static int vfio_pci_probe(struct pci_dev *pdev, > > const struct pci_device_id *id) > > INIT_LIST_HEAD(>vma_list); > > init_rwsem(>memory_lock); > > > > - ret = vfio_pci_reflck_attach(vdev);

[PATCH v2 08/14] vfio/pci: Move to the device set infrastructure

2021-07-20 Thread Jason Gunthorpe
From: Yishai Hadas PCI wants to have the usual open/close_device() logic with the slight twist that the open/close_device() must be done under a singelton lock shared by all of the vfio_devices that are in the PCI "reset group". The reset group, and thus the device set, is determined by what