mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
vfio: Make vfio_(un)register_notifier accept a vfio_device
All callers have a struct vfio_device trivially available, pass it in directly and avoid calling the expensive vfio_group_get_from_dev(). Acked-by: Eric Farman <farman@linux.ibm.com> Reviewed-by: Jason J. Herne <jjherne@linux.ibm.com> Reviewed-by: Tony Krowiak <akrowiak@linux.ibm.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/1-v4-8045e76bf00b+13d-vfio_mdev_no_group_jgg@nvidia.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
committed by
Alex Williamson
parent
a77109ffca
commit
09ea48efff
@@ -178,11 +178,11 @@ enum vfio_notify_type {
|
||||
/* events for VFIO_GROUP_NOTIFY */
|
||||
#define VFIO_GROUP_NOTIFY_SET_KVM BIT(0)
|
||||
|
||||
extern int vfio_register_notifier(struct device *dev,
|
||||
extern int vfio_register_notifier(struct vfio_device *device,
|
||||
enum vfio_notify_type type,
|
||||
unsigned long *required_events,
|
||||
struct notifier_block *nb);
|
||||
extern int vfio_unregister_notifier(struct device *dev,
|
||||
extern int vfio_unregister_notifier(struct vfio_device *device,
|
||||
enum vfio_notify_type type,
|
||||
struct notifier_block *nb);
|
||||
|
||||
|
Reference in New Issue
Block a user