aboutsummaryrefslogtreecommitdiff
path: root/hw/vfio
diff options
context:
space:
mode:
authorLiu, Yi L <yi.l.liu@linux.intel.com>2017-12-13 10:19:33 -0700
committerAlex Williamson <alex.williamson@redhat.com>2017-12-13 10:19:33 -0700
commitf7f9c7b23243fef21296d04d03df1477d12c5c19 (patch)
tree475727fbfa81c571480209f66067d4b251a900ff /hw/vfio
parent2016986aedb6ea2839662eb5f60630f3e231bd1a (diff)
vfio/common: init giommu_list and hostwin_list of vfio container
The init of giommu_list and hostwin_list is missed during container initialization. Signed-off-by: Liu, Yi L <yi.l.liu@linux.intel.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw/vfio')
-rw-r--r--hw/vfio/common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/vfio/common.c b/hw/vfio/common.c
index 7007878e34..216eec68ef 100644
--- a/hw/vfio/common.c
+++ b/hw/vfio/common.c
@@ -991,6 +991,8 @@ static int vfio_connect_container(VFIOGroup *group, AddressSpace *as,
container = g_malloc0(sizeof(*container));
container->space = space;
container->fd = fd;
+ QLIST_INIT(&container->giommu_list);
+ QLIST_INIT(&container->hostwin_list);
if (ioctl(fd, VFIO_CHECK_EXTENSION, VFIO_TYPE1_IOMMU) ||
ioctl(fd, VFIO_CHECK_EXTENSION, VFIO_TYPE1v2_IOMMU)) {
bool v2 = !!ioctl(fd, VFIO_CHECK_EXTENSION, VFIO_TYPE1v2_IOMMU);