Re: [Intel-gfx] [PATCH 08/12] vfio/gvt: Convert to use vfio_register_group_dev()

2021-04-27 Thread Jason Gunthorpe
On Mon, Apr 26, 2021 at 04:13:55PM +0200, Christoph Hellwig wrote: > > diff --git a/drivers/vfio/mdev/Makefile b/drivers/vfio/mdev/Makefile > > index ff9ecd80212503..7c236ba1b90eb1 100644 > > +++ b/drivers/vfio/mdev/Makefile > > @@ -1,5 +1,5 @@ > > # SPDX-License-Identifier: GPL-2.0-only > > > >

Re: [Intel-gfx] [PATCH 08/12] vfio/gvt: Convert to use vfio_register_group_dev()

2021-04-26 Thread Christoph Hellwig
> diff --git a/drivers/vfio/mdev/Makefile b/drivers/vfio/mdev/Makefile > index ff9ecd80212503..7c236ba1b90eb1 100644 > --- a/drivers/vfio/mdev/Makefile > +++ b/drivers/vfio/mdev/Makefile > @@ -1,5 +1,5 @@ > # SPDX-License-Identifier: GPL-2.0-only > > -mdev-y := mdev_core.o mdev_sysfs.o mdev_driv

[Intel-gfx] [PATCH 08/12] vfio/gvt: Convert to use vfio_register_group_dev()

2021-04-26 Thread Jason Gunthorpe
While there is a confusing mess of pointers and structs in this driver, the struct kvmgt_vdev (which in turn is 1:1 with a struct intel_vgpu) is what holds the vfio_device. Replace all the drvdata's and weird derivations of vgpu and vdev with container_of() or vdev->vgpu. Signed-off-by: Jason Gunt