Re: [PATCH v1 07/14] vfio: Add a device notifier interface

2021-03-22 Thread Christoph Hellwig
On Fri, Mar 19, 2021 at 04:25:40PM -0600, Alex Williamson wrote: > I've been trying to figure out how, but I think not. A user can have > multiple devices, each with entirely separate IOMMU contexts. For each > device, the user can create an mmap of memory to that device and add it > to every

Re: [PATCH v1 07/14] vfio: Add a device notifier interface

2021-03-19 Thread Alex Williamson
On Wed, 10 Mar 2021 07:56:39 + Christoph Hellwig wrote: > On Mon, Mar 08, 2021 at 02:48:30PM -0700, Alex Williamson wrote: > > Using a vfio device, a notifier block can be registered to receive > > select device events. Notifiers can only be registered for contained > > devices, ie. they

Re: [PATCH v1 07/14] vfio: Add a device notifier interface

2021-03-09 Thread Christoph Hellwig
On Mon, Mar 08, 2021 at 02:48:30PM -0700, Alex Williamson wrote: > Using a vfio device, a notifier block can be registered to receive > select device events. Notifiers can only be registered for contained > devices, ie. they are available through a user context. Registration > of a notifier

Re: [PATCH v1 07/14] vfio: Add a device notifier interface

2021-03-09 Thread Jason Gunthorpe
On Tue, Mar 09, 2021 at 08:45:13AM -0700, Alex Williamson wrote: > > I'm having trouble guessing why we need to refcount the group to add a > > notifier to the device's notifier chain? > > > > I suppose it actually has to do with the MMIO mapping? But I don't > > know what the relation is

Re: [PATCH v1 07/14] vfio: Add a device notifier interface

2021-03-09 Thread Alex Williamson
On Mon, 8 Mar 2021 20:46:27 -0400 Jason Gunthorpe wrote: > On Mon, Mar 08, 2021 at 02:48:30PM -0700, Alex Williamson wrote: > > Using a vfio device, a notifier block can be registered to receive > > select device events. Notifiers can only be registered for contained > > devices, ie. they are

Re: [PATCH v1 07/14] vfio: Add a device notifier interface

2021-03-08 Thread Jason Gunthorpe
On Mon, Mar 08, 2021 at 02:48:30PM -0700, Alex Williamson wrote: > Using a vfio device, a notifier block can be registered to receive > select device events. Notifiers can only be registered for contained > devices, ie. they are available through a user context. Registration > of a notifier

[PATCH v1 07/14] vfio: Add a device notifier interface

2021-03-08 Thread Alex Williamson
Using a vfio device, a notifier block can be registered to receive select device events. Notifiers can only be registered for contained devices, ie. they are available through a user context. Registration of a notifier increments the reference to that container context therefore notifiers must