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
178/* events for VFIO_GROUP_NOTIFY */178/* events for VFIO_GROUP_NOTIFY */
179#define VFIO_GROUP_NOTIFY_SET_KVM BIT(0)179#define VFIO_GROUP_NOTIFY_SET_KVM BIT(0)
180 180
181extern int vfio_register_notifier(struct device *dev,181extern int vfio_register_notifier(struct vfio_device *device,
182 enum vfio_notify_type type,182 enum vfio_notify_type type,
183 unsigned long *required_events,183 unsigned long *required_events,
184 struct notifier_block *nb);184 struct notifier_block *nb);
185extern int vfio_unregister_notifier(struct device *dev,185extern int vfio_unregister_notifier(struct vfio_device *device,
186 enum vfio_notify_type type,186 enum vfio_notify_type type,
187 struct notifier_block *nb);187 struct notifier_block *nb);
188 188