]> 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)
commit93ee6462324fd87fb68f7180f7b8994fafab2040
treed8d79d500d36f2d67a3e857119978eaaf657cf82
parent0cd9a513de99cb82507a9613519ef3a3c1c615b9
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