public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6.0] drm/i915/gvt: Add missing vfio_unregister_group_dev() call
@ 2022-11-09 23:31 Alex Williamson
  2022-11-11  8:57 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Williamson @ 2022-11-09 23:31 UTC (permalink / raw)
  To: stable; +Cc: gregkh, alex.williamson, jgg, kevin.tian, hch, sashal

From: Jason Gunthorpe <jgg@nvidia.com>

[ Upstream commit  f423fa1bc9fe1978e6b9f54927411b62cb43eb04 ]

When converting to directly create the vfio_device the mdev driver has to
put a vfio_register_emulated_iommu_dev() in the probe() and a pairing
vfio_unregister_group_dev() in the remove.

This was missed for gvt, add it.

Cc: stable@vger.kernel.org
Fixes: 978cf586ac35 ("drm/i915/gvt: convert to use vfio_register_emulated_iommu_dev")
Reported-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/0-v1-013609965fe8+9d-vfio_gvt_unregister_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>

Reviewed-by: Kevin Tian <kevin.tian@intel.com> # v6.0 backport
Signed-off-by: Alex Williamson <alex.williamson@redhat.com> # v6.0 backport
---
 drivers/gpu/drm/i915/gvt/kvmgt.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c
index e3cd58946477..de89946c4817 100644
--- a/drivers/gpu/drm/i915/gvt/kvmgt.c
+++ b/drivers/gpu/drm/i915/gvt/kvmgt.c
@@ -1595,6 +1595,9 @@ static void intel_vgpu_remove(struct mdev_device *mdev)
 
 	if (WARN_ON_ONCE(vgpu->attached))
 		return;
+
+	vfio_unregister_group_dev(&vgpu->vfio_device);
+	vfio_uninit_group_dev(&vgpu->vfio_device);
 	intel_gvt_destroy_vgpu(vgpu);
 }
 



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-11  8:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-09 23:31 [PATCH 6.0] drm/i915/gvt: Add missing vfio_unregister_group_dev() call Alex Williamson
2022-11-11  8:57 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox