mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-26 23:17:23 -07:00
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>
This commit is contained in:
parent
2016986aed
commit
f7f9c7b232
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue