summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorVivek Kasireddy <vivek.kasireddy@intel.com>2025-11-20 11:28:26 +0200
committerAlex Williamson <alex@shazbot.org>2025-11-20 12:02:32 -0700
commit64a5dedcff801072154a806102d731ecdf0e7552 (patch)
tree6b9c608723b565912f86e30cf267b02910b16bf8 /drivers
parent3aa31a8bb11e47c0ff2b306988d1756b810c1c3c (diff)
vfio: Export vfio device get and put registration helpers
These helpers are useful for managing additional references taken on the device from other associated VFIO modules. Original-patch-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Tested-by: Alex Mastro <amastro@fb.com> Tested-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Acked-by: Ankit Agrawal <ankita@nvidia.com> Link: https://lore.kernel.org/r/20251120-dmabuf-vfio-v9-7-d7f71607f371@nvidia.com Signed-off-by: Alex Williamson <alex@shazbot.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/vfio/vfio_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/vfio/vfio_main.c b/drivers/vfio/vfio_main.c
index 38c8e9350a60..9aa4a5d081e8 100644
--- a/drivers/vfio/vfio_main.c
+++ b/drivers/vfio/vfio_main.c
@@ -172,11 +172,13 @@ void vfio_device_put_registration(struct vfio_device *device)
if (refcount_dec_and_test(&device->refcount))
complete(&device->comp);
}
+EXPORT_SYMBOL_GPL(vfio_device_put_registration);
bool vfio_device_try_get_registration(struct vfio_device *device)
{
return refcount_inc_not_zero(&device->refcount);
}
+EXPORT_SYMBOL_GPL(vfio_device_try_get_registration);
/*
* VFIO driver API