vfio: remove VFIO_GROUP_NOTIFY_SET_KVM
authorMatthew Rosato <mjrosato@linux.ibm.com>
Thu, 19 May 2022 18:33:11 +0000 (14:33 -0400)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 24 May 2022 14:41:18 +0000 (08:41 -0600)
commit421cfe6596f6cb316991c02bf30a93bd81092853
tree6a1d4ca7b11c47454c66555336769104022cbfc8
parentc490513c818d1ec61aff1614f5d0e38de680665f
vfio: remove VFIO_GROUP_NOTIFY_SET_KVM

Rather than relying on a notifier for associating the KVM with
the group, let's assume that the association has already been
made prior to device_open.  The first time a device is opened
associate the group KVM with the device.

This fixes a user-triggerable oops in GVT.

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>
Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: Zhi Wang <zhi.a.wang@intel.com>
Link: https://lore.kernel.org/r/20220519183311.582380-2-mjrosato@linux.ibm.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/gpu/drm/i915/gvt/gtt.c
drivers/gpu/drm/i915/gvt/gvt.h
drivers/gpu/drm/i915/gvt/kvmgt.c
drivers/s390/crypto/vfio_ap_ops.c
drivers/s390/crypto/vfio_ap_private.h
drivers/vfio/vfio.c
include/linux/vfio.h