[Intel-gfx] [PATCH 1/9] vfio: Make vfio_(un)register_notifier accept a vfio_device

Christoph Hellwig hch at lst.de
Wed Apr 13 05:55:24 UTC 2022


On Tue, Apr 12, 2022 at 12:53:28PM -0300, Jason Gunthorpe wrote:
> All callers have a struct vfio_device trivially available, pass it in
> directly and avoid calling the expensive vfio_group_get_from_dev().

Instead of bothering the drivers with the notifiers at all, the two
notifier_blocks should move into struct vfio_device, and the
vfio_ops should just grow two new dma_unmap and set_kvm methods.

This will isolate the drives from the whole notifiers mess and it's
boilerplate code.


More information about the Intel-gfx mailing list