From 4508a533fce4db0004c1e8dd047c1e77046fc9c5 Mon Sep 17 00:00:00 2001 From: Yi Liu Date: Mon, 27 Mar 2023 02:33:48 -0700 Subject: vfio-iommufd: No need to record iommufd_ctx in vfio_device iommufd_ctx is stored in vfio_device for emulated devices per bind_iommufd. However, as iommufd_access is created in bind, no more need to stored it since iommufd_access implicitly stores it. Link: https://lore.kernel.org/r/20230327093351.44505-4-yi.l.liu@intel.com Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Tested-by: Terrence Xu Tested-by: Nicolin Chen Signed-off-by: Yi Liu Acked-by: Alex Williamson Signed-off-by: Jason Gunthorpe --- include/linux/vfio.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/linux/vfio.h') diff --git a/include/linux/vfio.h b/include/linux/vfio.h index 93134b023968..3188d8a374bd 100644 --- a/include/linux/vfio.h +++ b/include/linux/vfio.h @@ -60,7 +60,6 @@ struct vfio_device { void (*put_kvm)(struct kvm *kvm); #if IS_ENABLED(CONFIG_IOMMUFD) struct iommufd_device *iommufd_device; - struct iommufd_ctx *iommufd_ictx; bool iommufd_attached; #endif }; -- cgit v1.2.3-70-g09d2 From 38e4614c27210e63aafad1bb2e4a427515e46d71 Mon Sep 17 00:00:00 2001 From: Simon Horman Date: Wed, 29 Mar 2023 14:06:03 +0200 Subject: vfio: correct kdoc for ops structures Address minor omissions from kdoc for ops structures flagged by check-kdoc: ./scripts/kernel-doc -Werror -none include/linux/vfio.h include/linux/vfio.h:114: warning: Function parameter or member 'name' not described in 'vfio_device_ops' include/linux/vfio.h:143: warning: Cannot understand * @migration_set_state: Optional callback to change the migration state for on line 143 - I thought it was a doc line include/linux/vfio.h:168: warning: Cannot understand * @log_start: Optional callback to ask the device start DMA logging. on line 168 - I thought it was a doc line Signed-off-by: Simon Horman Link: https://lore.kernel.org/r/20230329120603.468031-1-horms@kernel.org Signed-off-by: Alex Williamson --- include/linux/vfio.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/linux/vfio.h') diff --git a/include/linux/vfio.h b/include/linux/vfio.h index 93134b023968..cb46050045c0 100644 --- a/include/linux/vfio.h +++ b/include/linux/vfio.h @@ -68,6 +68,7 @@ struct vfio_device { /** * struct vfio_device_ops - VFIO bus driver device callbacks * + * @name: Name of the device driver. * @init: initialize private fields in device structure * @release: Reclaim private fields in device structure * @bind_iommufd: Called when binding the device to an iommufd @@ -140,6 +141,8 @@ int vfio_iommufd_emulated_attach_ioas(struct vfio_device *vdev, u32 *pt_id); #endif /** + * struct vfio_migration_ops - VFIO bus device driver migration callbacks + * * @migration_set_state: Optional callback to change the migration state for * devices that support migration. It's mandatory for * VFIO_DEVICE_FEATURE_MIGRATION migration support. @@ -165,6 +168,8 @@ struct vfio_migration_ops { }; /** + * struct vfio_log_ops - VFIO bus device driver logging callbacks + * * @log_start: Optional callback to ask the device start DMA logging. * @log_stop: Optional callback to ask the device stop DMA logging. * @log_read_and_clear: Optional callback to ask the device read -- cgit v1.2.3-70-g09d2