-
- Downloads
vfio/mdev: simplify mdev_type handling
Instead of abusing struct attribute_group to control initialization of struct mdev_type, just define the actual attributes in the mdev_driver, allocate the mdev_type structures in the caller and pass them to mdev_register_parent. This allows the caller to use container_of to get at the containing structure and thus significantly simplify the code. Signed-off-by:Christoph Hellwig <hch@lst.de> Reviewed-by:
Jason Gunthorpe <jgg@nvidia.com> Reviewed-by:
Tony Krowiak <akrowiak@linux.ibm.com> Reviewed-by:
Kevin Tian <kevin.tian@intel.com> Reviewed-by:
Kirti Wankhede <kwankhede@nvidia.com> Reviewed-by:
Eric Farman <farman@linux.ibm.com> Link: https://lore.kernel.org/r/20220923092652.100656-6-hch@lst.de Signed-off-by:
Alex Williamson <alex.williamson@redhat.com>
Showing
- Documentation/driver-api/vfio-mediated-device.rst 1 addition, 1 deletionDocumentation/driver-api/vfio-mediated-device.rst
- drivers/gpu/drm/i915/gvt/gvt.h 2 additions, 1 deletiondrivers/gpu/drm/i915/gvt/gvt.h
- drivers/gpu/drm/i915/gvt/kvmgt.c 14 additions, 88 deletionsdrivers/gpu/drm/i915/gvt/kvmgt.c
- drivers/gpu/drm/i915/gvt/vgpu.c 12 additions, 1 deletiondrivers/gpu/drm/i915/gvt/vgpu.c
- drivers/s390/cio/vfio_ccw_drv.c 4 additions, 2 deletionsdrivers/s390/cio/vfio_ccw_drv.c
- drivers/s390/cio/vfio_ccw_ops.c 2 additions, 12 deletionsdrivers/s390/cio/vfio_ccw_ops.c
- drivers/s390/cio/vfio_ccw_private.h 2 additions, 0 deletionsdrivers/s390/cio/vfio_ccw_private.h
- drivers/s390/crypto/vfio_ap_ops.c 6 additions, 13 deletionsdrivers/s390/crypto/vfio_ap_ops.c
- drivers/s390/crypto/vfio_ap_private.h 2 additions, 0 deletionsdrivers/s390/crypto/vfio_ap_private.h
- drivers/vfio/mdev/mdev_core.c 6 additions, 25 deletionsdrivers/vfio/mdev/mdev_core.c
- drivers/vfio/mdev/mdev_driver.c 2 additions, 3 deletionsdrivers/vfio/mdev/mdev_driver.c
- drivers/vfio/mdev/mdev_private.h 0 additions, 8 deletionsdrivers/vfio/mdev/mdev_private.h
- drivers/vfio/mdev/mdev_sysfs.c 22 additions, 69 deletionsdrivers/vfio/mdev/mdev_sysfs.c
- include/linux/mdev.h 18 additions, 8 deletionsinclude/linux/mdev.h
- samples/vfio-mdev/mbochs.c 23 additions, 34 deletionssamples/vfio-mdev/mbochs.c
- samples/vfio-mdev/mdpy.c 19 additions, 31 deletionssamples/vfio-mdev/mdpy.c
- samples/vfio-mdev/mtty.c 30 additions, 30 deletionssamples/vfio-mdev/mtty.c
Loading
Please register or sign in to comment