vfio: Wrap vfio group module init/clean code into helpers
authorYi Liu <yi.l.liu@intel.com>
Fri, 23 Sep 2022 14:08:36 +0000 (07:08 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 5 Dec 2022 12:56:01 +0000 (08:56 -0400)
commit1334e47ee798ac4715330a6ade0afc929cd54aff
treec3a44aaa4e8943acd23cb53c6cb89875d09ddbf9
parent5c8d3d93f6a7c9371212690b0195160e5f88bdff
vfio: Wrap vfio group module init/clean code into helpers

This wraps the init/clean code of vfio group global variable to be
helpers, and prepares for further moving vfio group specific code into
separate file.

As container is used by group, so vfio_container_init/cleanup() is moved
into vfio_group_init/cleanup().

Link: https://lore.kernel.org/r/20221201145535.589687-9-yi.l.liu@intel.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Tested-by: Lixiao Yang <lixiao.yang@intel.com>
Tested-by: Yu He <yu.he@intel.com>
Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/vfio/vfio_main.c