summaryrefslogtreecommitdiffstats
path: root/drivers/vfio/vfio_main.c
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2022-12-05 11:29:20 -0400
committerAlex Williamson <alex.williamson@redhat.com>2022-12-05 12:04:32 -0700
commite2d55709398e62cf53e5c7df3758ae52cc62d63a (patch)
tree26c5eb9f3188af9e40236e9a999329dd2848d35b /drivers/vfio/vfio_main.c
parent20601c45a0fa20bbb5545f4dd69f4f18448f4973 (diff)
downloadlinux-e2d55709398e62cf53e5c7df3758ae52cc62d63a.tar.gz
linux-e2d55709398e62cf53e5c7df3758ae52cc62d63a.tar.bz2
linux-e2d55709398e62cf53e5c7df3758ae52cc62d63a.zip
vfio: Fold vfio_virqfd.ko into vfio.ko
This is only 1.8k, putting it in its own module is not really necessary. The kconfig infrastructure is still there to completely remove it for systems that are trying for small footprint. Put it in the main vfio.ko module now that kbuild can support multiple .c files. Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Link: https://lore.kernel.org/r/5-v5-fc5346cacfd4+4c482-vfio_modules_jgg@nvidia.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/vfio_main.c')
-rw-r--r--drivers/vfio/vfio_main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/vfio/vfio_main.c b/drivers/vfio/vfio_main.c
index 662e267a3e13..7f88569c3eba 100644
--- a/drivers/vfio/vfio_main.c
+++ b/drivers/vfio/vfio_main.c
@@ -1832,6 +1832,10 @@ static int __init vfio_init(void)
if (ret)
return ret;
+ ret = vfio_virqfd_init();
+ if (ret)
+ goto err_virqfd;
+
/* /dev/vfio/$GROUP */
vfio.class = class_create(THIS_MODULE, "vfio");
if (IS_ERR(vfio.class)) {
@@ -1862,6 +1866,8 @@ err_dev_class:
class_destroy(vfio.class);
vfio.class = NULL;
err_group_class:
+ vfio_virqfd_exit();
+err_virqfd:
vfio_container_cleanup();
return ret;
}
@@ -1876,6 +1882,7 @@ static void __exit vfio_cleanup(void)
class_destroy(vfio.device_class);
vfio.device_class = NULL;
class_destroy(vfio.class);
+ vfio_virqfd_exit();
vfio_container_cleanup();
vfio.class = NULL;
xa_destroy(&vfio_device_set_xa);