Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vfio: remove dead notifier code

group->notifier is dead code. VFIO initializes it and checks it for
emptiness on teardown, but nobody ever registers on it or triggers it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Anthony Krowiak <akrowiak@linux.ibm.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20260407175934.1602711-1-pbonzini@redhat.com
Signed-off-by: Alex Williamson <alex@shazbot.org>

authored by

Paolo Bonzini and committed by
Alex Williamson
3c443ec7 7487d8db

+8 -17
+8 -12
Documentation/arch/s390/vfio-ap.rst
··· 431 431 * callback interfaces 432 432 433 433 open_device: 434 - The vfio_ap driver uses this callback to register a 435 - VFIO_GROUP_NOTIFY_SET_KVM notifier callback function for the matrix mdev 436 - devices. The open_device callback is invoked by userspace to connect the 437 - VFIO iommu group for the matrix mdev device to the MDEV bus. Access to the 438 - KVM structure used to configure the KVM guest is provided via this callback. 439 - The KVM structure, is used to configure the guest's access to the AP matrix 440 - defined via the vfio_ap mediated device's sysfs attribute files. 434 + the open_device callback is invoked by userspace to connect the 435 + VFIO iommu group for the matrix mdev device to the MDEV bus. The 436 + callback retrieves the KVM structure used to configure the KVM guest 437 + and configures the guest's access to the AP matrix defined via the 438 + vfio_ap mediated device's sysfs attribute files. 441 439 442 440 close_device: 443 - unregisters the VFIO_GROUP_NOTIFY_SET_KVM notifier callback function for the 444 - matrix mdev device and deconfigures the guest's AP matrix. 441 + this callback deconfigures the guest's AP matrix. 445 442 446 443 ioctl: 447 444 this callback handles the VFIO_DEVICE_GET_INFO and VFIO_DEVICE_RESET ioctls ··· 446 449 447 450 Configure the guest's AP resources 448 451 ---------------------------------- 449 - Configuring the AP resources for a KVM guest will be performed when the 450 - VFIO_GROUP_NOTIFY_SET_KVM notifier callback is invoked. The notifier 451 - function is called when userspace connects to KVM. The guest's AP resources are 452 + Configuring the AP resources for a KVM guest will be performed at the 453 + time of ``open_device`` and ``close_device``. The guest's AP resources are 452 454 configured via its APCB by: 453 455 454 456 * Setting the bits in the APM corresponding to the APIDs assigned to the
-3
drivers/vfio/group.c
··· 461 461 * Device FDs hold a group file reference, therefore the group release 462 462 * is only called when there are no open devices. 463 463 */ 464 - WARN_ON(group->notifier.head); 465 464 if (group->container) 466 465 vfio_group_detach_container(group); 467 466 if (group->iommufd) { ··· 545 546 /* put in vfio_group_release() */ 546 547 iommu_group_ref_get(iommu_group); 547 548 group->type = type; 548 - BLOCKING_INIT_NOTIFIER_HEAD(&group->notifier); 549 549 550 550 return group; 551 551 } ··· 723 725 * properly hold the group reference. 724 726 */ 725 727 WARN_ON(!list_empty(&group->device_list)); 726 - WARN_ON(group->notifier.head); 727 728 728 729 /* 729 730 * Revoke all users of group->iommu_group. At this point we know there
-1
drivers/vfio/vfio.h
··· 90 90 struct mutex group_lock; 91 91 struct kvm *kvm; 92 92 struct file *opened_file; 93 - struct blocking_notifier_head notifier; 94 93 struct iommufd_ctx *iommufd; 95 94 spinlock_t kvm_ref_lock; 96 95 unsigned int cdev_device_open_cnt;
-1
drivers/vfio/vfio_iommu_type1.c
··· 36 36 #include <linux/uaccess.h> 37 37 #include <linux/vfio.h> 38 38 #include <linux/workqueue.h> 39 - #include <linux/notifier.h> 40 39 #include <linux/mm_inline.h> 41 40 #include <linux/overflow.h> 42 41 #include "vfio.h"