vfio/container: Simplify vfio_container_init()
commit09181a8e9729c77c69f8d3988a1dbed0b91402d4
authorCédric Le Goater <clg@redhat.com>
Mon, 17 Jun 2024 06:33:58 +0000 (17 08:33 +0200)
committerCédric Le Goater <clg@redhat.com>
Mon, 24 Jun 2024 21:15:31 +0000 (24 23:15 +0200)
tree77522baa83be33594c6820432f72ef0d87bee28f
parentb7b79588ebb365e157ec2425a4fa472a314c3ea5
vfio/container: Simplify vfio_container_init()

Assign the base container VFIOAddressSpace 'space' pointer in
vfio_address_space_insert(). The ultimate goal is to remove
vfio_container_init() and instead rely on an .instance_init() handler
to perfom the initialization of VFIOContainerBase.

To be noted that vfio_connect_container() will assign the 'space'
pointer later in the execution flow. This should not have any
consequence.

Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/vfio/common.c
hw/vfio/container-base.c
hw/vfio/container.c
hw/vfio/iommufd.c
include/hw/vfio/vfio-container-base.h