diff options
| author | Zhenzhong Duan <zhenzhong.duan@intel.com> | 2023-11-02 15:12:40 +0800 |
|---|---|---|
| committer | Cédric Le Goater <clg@redhat.com> | 2023-12-19 19:03:38 +0100 |
| commit | f79baf8c9575ac3193ca86ec508791c86d96b13e (patch) | |
| tree | 0370497193f2f899575b3b9eb83026de68c423c2 /hw/vfio/container-base.c | |
| parent | 4d6b95010c59127ac4f7230d6ee88b5d0e99738c (diff) | |
| download | focaccia-qemu-f79baf8c9575ac3193ca86ec508791c86d96b13e.tar.gz focaccia-qemu-f79baf8c9575ac3193ca86ec508791c86d96b13e.zip | |
vfio/container: Move iova_ranges to base container
Meanwhile remove the helper function vfio_free_container as it only calls g_free now. No functional change intended. Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/vfio/container-base.c')
| -rw-r--r-- | hw/vfio/container-base.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/vfio/container-base.c b/hw/vfio/container-base.c index 7f508669f5..0177f43741 100644 --- a/hw/vfio/container-base.c +++ b/hw/vfio/container-base.c @@ -54,6 +54,7 @@ void vfio_container_init(VFIOContainerBase *bcontainer, VFIOAddressSpace *space, bcontainer->error = NULL; bcontainer->dirty_pages_supported = false; bcontainer->dma_max_mappings = 0; + bcontainer->iova_ranges = NULL; QLIST_INIT(&bcontainer->giommu_list); QLIST_INIT(&bcontainer->vrdl_list); } @@ -70,4 +71,6 @@ void vfio_container_destroy(VFIOContainerBase *bcontainer) QLIST_REMOVE(giommu, giommu_next); g_free(giommu); } + + g_list_free_full(bcontainer->iova_ranges, g_free); } |