drm/i915/gvt: Add missing vfio_unregister_group_dev() call
PATCH 1/1 drm/i915/gvt: Add missing vfio_unregister_group_dev() call
From: Jason Gunthorpe <[email protected]>
[ 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.
Fixes 978cf586ac35 ("drm/i915/gvt: convert to use vfio_register_emulated_iommu_dev")
Reported-by Alex Williamson <[email protected]>
Signed-off-by Jason Gunthorpe <[email protected]>
Reviewed-by Kevin Tian <[email protected]>
Reviewed-by Christoph Hellwig <[email protected]>
Signed-off-by Alex Williamson <[email protected]>
Reviewed-by Kevin Tian <[email protected]> # v6.0 backport
Signed-off-by Alex Williamson <[email protected]> # v6.0 backport
--- drivers/gpu/drm/i915/gvt/kvmgt.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/gvt/kvmgt.c +3 -0
@@ -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); }
Greg KH
maintainerQuoted 19 lines · Alex Williamson
From: Jason Gunthorpe <[email protected]>
[ Upstream commit
f423fa1bc9fe1978e6b9f54927411b62cb43eb04]When converting to directly create the
vfio_devicethe mdev driver has to put avfio_register_emulated_iommu_dev()in theprobe()and a pairingvfio_unregister_group_dev()in the remove.This was missed for gvt, add it.
Fixes 978cf586ac35 ("drm/i915/gvt: convert to use vfio_register_emulated_iommu_dev")Reported-by Alex Williamson <[email protected]>Signed-off-by Jason Gunthorpe <[email protected]>Reviewed-by Kevin Tian <[email protected]>Reviewed-by Christoph Hellwig <[email protected]>Signed-off-by Alex Williamson <[email protected]>
Quoted 6 lines
Reviewed-by Kevin Tian <[email protected]> # v6.0 backportSigned-off-by Alex Williamson <[email protected]> # v6.0 backport--- drivers/gpu/drm/i915/gvt/kvmgt.c | 3 +++ 1 file changed, 3 insertions(+)
Now queued up, thanks.
greg k-h