History

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().

Jason Gunthorpe committed 4 years ago

Commit 09ea48e1 parent a77109f5 files · +33 −44Browse files

Showing the changes to include (1 of 5 files). Show all

Unified · Split

include/linux/vfio.h+2−2
@@ -178,11 +178,11 @@ enum vfio_notify_type { · 177 unmodified lines
178178 /* events for VFIO_GROUP_NOTIFY */
179179 #define VFIO_GROUP_NOTIFY_SET_KVM BIT(0)
180180
181−extern int vfio_register_notifier(struct device *dev,
181+extern int vfio_register_notifier(struct vfio_device *device,
182182 enum vfio_notify_type type,
183183 unsigned long *required_events,
184184 struct notifier_block *nb);
185−extern int vfio_unregister_notifier(struct device *dev,
185+extern int vfio_unregister_notifier(struct vfio_device *device,
186186 enum vfio_notify_type type,
187187 struct notifier_block *nb);
188188