/[packages]/backports/8/kernel/current/SOURCES/drm-i915-gvt-add-missing-vfio_unregister_group_dev-c.patch
ViewVC logotype

Contents of /backports/8/kernel/current/SOURCES/drm-i915-gvt-add-missing-vfio_unregister_group_dev-c.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1903762 - (show annotations) (download)
Sat Nov 5 11:53:10 2022 UTC (17 months, 2 weeks ago) by tmb
File size: 1546 byte(s)
drm/i915/gvt: Add missing vfio_unregister_group_dev() call
1 From 9df747c58f96b4595e835824008f2a2974ba7723 Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Thu, 29 Sep 2022 14:48:35 -0300
4 Subject: drm/i915/gvt: Add missing vfio_unregister_group_dev() call
5
6 From: Jason Gunthorpe <jgg@nvidia.com>
7
8 [ Upstream commit f423fa1bc9fe1978e6b9f54927411b62cb43eb04 ]
9
10 When converting to directly create the vfio_device the mdev driver has to
11 put a vfio_register_emulated_iommu_dev() in the probe() and a pairing
12 vfio_unregister_group_dev() in the remove.
13
14 This was missed for gvt, add it.
15
16 Cc: stable@vger.kernel.org
17 Fixes: 978cf586ac35 ("drm/i915/gvt: convert to use vfio_register_emulated_iommu_dev")
18 Reported-by: Alex Williamson <alex.williamson@redhat.com>
19 Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
20 Reviewed-by: Kevin Tian <kevin.tian@intel.com>
21 Reviewed-by: Christoph Hellwig <hch@lst.de>
22 Link: https://lore.kernel.org/r/0-v1-013609965fe8+9d-vfio_gvt_unregister_jgg@nvidia.com
23 Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
24 Signed-off-by: Sasha Levin <sashal@kernel.org>
25 ---
26 drivers/gpu/drm/i915/gvt/kvmgt.c | 1 +
27 1 file changed, 1 insertion(+)
28
29 diff --git a/drivers/gpu/drm/i915/gvt/kvmgt.c b/drivers/gpu/drm/i915/gvt/kvmgt.c
30 index e3cd58946477..dacd57732dbe 100644
31 --- a/drivers/gpu/drm/i915/gvt/kvmgt.c
32 +++ b/drivers/gpu/drm/i915/gvt/kvmgt.c
33 @@ -1595,6 +1595,7 @@ static void intel_vgpu_remove(struct mdev_device *mdev)
34
35 if (WARN_ON_ONCE(vgpu->attached))
36 return;
37 + vfio_unregister_group_dev(&vgpu->vfio_device);
38 intel_gvt_destroy_vgpu(vgpu);
39 }
40
41 --
42 2.35.1
43

  ViewVC Help
Powered by ViewVC 1.1.30