]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gvt: convert to use vfio_register_emulated_iommu_dev
authorChristoph Hellwig <hch@lst.de>
Mon, 11 Apr 2022 14:13:57 +0000 (16:13 +0200)
committerZhi Wang <zhi.a.wang@intel.com>
Thu, 21 Apr 2022 11:36:56 +0000 (07:36 -0400)
commit3fbeb0618276c2843ec88817686a619508dfb040
treed8d79d500d36f2d67a3e857119978eaaf657cf82
parentdb4e9e21e1acb8f50f0d279d0c50ff8dad2095e0
drm/i915/gvt: convert to use vfio_register_emulated_iommu_dev

This is straightforward conversion, the intel_vgpu already has a pointer
to the vfio_dev, which can be replaced with the embedded structure and
we can replace all the mdev_get_drvdata() with a simple container_of().

Based on an patch from Jason Gunthorpe.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20220411141403.86980-29-hch@lst.de
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Zhi Wang <zhi.a.wang@intel.com>
drivers/gpu/drm/i915/gvt/gvt.h
drivers/gpu/drm/i915/gvt/kvmgt.c