Re: [PATCH 2/2] vfio: Replace the iommu notifier with a device list

2022-06-07 Thread Jason Gunthorpe
On Tue, Jun 07, 2022 at 07:44:37AM +0200, Christoph Hellwig wrote: > On Mon, Jun 06, 2022 at 09:34:36PM -0300, Jason Gunthorpe wrote: > > + if (!list_empty(>device_list)) { > > + mutex_lock(>device_list_lock); > > +

[PATCH 2/2] vfio: Replace the iommu notifier with a device list

2022-06-06 Thread Jason Gunthorpe
Instead of bouncing the function call to the driver op through a blocking notifier just have the iommu layer call it directly. Register each device that is being attached to the iommu with the lower driver which then threads them on a linked list and calls the appropriate driver op at the right