]> git.karo-electronics.de Git - karo-tx-linux.git/commit
vfio: vfio_register_notifier: classify iommu notifier
authorJike Song <jike.song@intel.com>
Thu, 1 Dec 2016 05:20:05 +0000 (13:20 +0800)
committerAlex Williamson <alex.williamson@redhat.com>
Thu, 1 Dec 2016 16:38:47 +0000 (09:38 -0700)
commit22195cbd3451a75abaf30651a61cf85c89061327
tree9178b97be1c3800c8832adabde709868e452a130
parentd256459fae4dba66d50850f2d948306503818913
vfio: vfio_register_notifier: classify iommu notifier

Currently vfio_register_notifier assumes that there is only one
notifier chain, which is in vfio_iommu. However, the user might
also be interested in events other than vfio_iommu, for example,
vfio_group. Refactor vfio_{un}register_notifier implementation
to make it feasible.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com>
Signed-off-by: Jike Song <jike.song@intel.com>
[aw: merge with commit 816ca69ea9c7 ("vfio: Fix handling of error returned by 'vfio_group_get_from_dev()'"), remove typedef]
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/vfio.c
drivers/vfio/vfio_iommu_type1.c
include/linux/vfio.h