[PATCH 04/14] vfio/mdev: embedd struct mdev_parent in the parent data structure
Eric Farman
farman at linux.ibm.com
Tue Aug 23 18:06:49 UTC 2022
On Mon, 2022-08-22 at 08:21 +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 at lst.de>
> Reviewed-by: Jason Gunthorpe <jgg at nvidia.com>
> Reviewed-by: Kevin Tian <kevin.tian at intel.com>
> Reviewed-by: Kirti Wankhede <kwankhede at nvidia.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 | 1 +
> drivers/s390/cio/vfio_ccw_drv.c | 5 +-
> drivers/s390/cio/vfio_ccw_ops.c | 1 -
> drivers/s390/cio/vfio_ccw_private.h | 2 +
>
>
> ...snip...
>
> --- a/drivers/s390/cio/cio.h
> +++ b/drivers/s390/cio/cio.h
> @@ -5,6 +5,7 @@
> #include <linux/mutex.h>
> #include <linux/device.h>
> #include <linux/mod_devicetable.h>
> +#include <linux/mdev.h>
> #include <asm/chpid.h>
> #include <asm/cio.h>
> #include <asm/fcx.h>
Since the mdev_type/mdev_parent stuff isn't in struct subchannel, this
should be in vfio_ccw_private.h instead.
Thanks,
Eric
More information about the intel-gvt-dev
mailing list