aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/vfio.h
diff options
context:
space:
mode:
authorMax Gurtovoy <mgurtovoy@nvidia.com>2021-08-05 22:18:59 -0300
committerAlex Williamson <alex.williamson@redhat.com>2021-08-11 09:50:10 -0600
commitae03c3771b8cbbed3802ad1153d896c32015c520 (patch)
tree88b17c4754f6823d47dc2516ba43f8ff2ba38506 /include/linux/vfio.h
parentvfio/mbochs: Fix missing error unwind of mbochs_used_mbytes (diff)
downloadlinux-dev-ae03c3771b8cbbed3802ad1153d896c32015c520.tar.xz
linux-dev-ae03c3771b8cbbed3802ad1153d896c32015c520.zip
vfio: Introduce a vfio_uninit_group_dev() API call
This pairs with vfio_init_group_dev() and allows undoing any state that is stored in the vfio_device unrelated to registration. Add appropriately placed calls to all the drivers. The following patch will use this to add pre-registration state for the device set. Signed-off-by: Max Gurtovoy <mgurtovoy@nvidia.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/3-v4-9ea22c5e6afb+1adf-vfio_reflck_jgg@nvidia.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'include/linux/vfio.h')
-rw-r--r--include/linux/vfio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/vfio.h b/include/linux/vfio.h
index a2c5b30e1763..b0875cf8e496 100644
--- a/include/linux/vfio.h
+++ b/include/linux/vfio.h
@@ -61,6 +61,7 @@ extern void vfio_iommu_group_put(struct iommu_group *group, struct device *dev);
void vfio_init_group_dev(struct vfio_device *device, struct device *dev,
const struct vfio_device_ops *ops);
+void vfio_uninit_group_dev(struct vfio_device *device);
int vfio_register_group_dev(struct vfio_device *device);
void vfio_unregister_group_dev(struct vfio_device *device);
extern struct vfio_device *vfio_device_get_from_dev(struct device *dev);