Re: [PATCH 04/14] vfio/mdev: embedd struct mdev_parent in the parent data structure

Jason Gunthorpe
2022-07-04T15:56:31Z

On Mon, Jul 04, 2022 at 02:51:34PM +0200, Christoph Hellwig wrote:
> Simplify mdev_{un}register_device by requiring the caller to pass in
> a structure allocate as part of the parent device structure. This
> removes the need for a list of parents and the separate mdev_parent
> refcount as we can simplify rely on the reference to the parent device.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Kevin Tian <kevin.tian@intel.com>
> ---
> .../driver-api/vfio-mediated-device.rst | 12 +-
> Documentation/s390/vfio-ap.rst | 2 +-
> Documentation/s390/vfio-ccw.rst | 2 +-
> drivers/gpu/drm/i915/gvt/gvt.h | 2 +
> drivers/gpu/drm/i915/gvt/kvmgt.c | 5 +-
> drivers/s390/cio/cio.h | 2 +
> drivers/s390/cio/vfio_ccw_ops.c | 6 +-
> drivers/s390/crypto/vfio_ap_ops.c | 5 +-
> drivers/s390/crypto/vfio_ap_private.h | 1 +
> drivers/vfio/mdev/mdev_core.c | 120 ++++--------------
> drivers/vfio/mdev/mdev_private.h | 23 ----
> drivers/vfio/mdev/mdev_sysfs.c | 4 +-
> include/linux/mdev.h | 15 ++-
> samples/vfio-mdev/mbochs.c | 5 +-
> samples/vfio-mdev/mdpy.c | 5 +-
> samples/vfio-mdev/mtty.c | 6 +-
> 16 files changed, 69 insertions(+), 146 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason