]> git.ipfire.org Git - thirdparty/qemu.git/commit
vfio/container: Discover IOMMU type before creating the container
authorCédric Le Goater <clg@redhat.com>
Mon, 17 Jun 2024 06:34:02 +0000 (08:34 +0200)
committerCédric Le Goater <clg@redhat.com>
Mon, 24 Jun 2024 21:15:31 +0000 (23:15 +0200)
commit9550fdfd29f52d548d99aed2b1a002308ad6175a
tree8a7be0e481333a6dae7eff85fca27920538af3e9
parent58f5c13260c2bf8fe158d0e176d1595858157946
vfio/container: Discover IOMMU type before creating the container

Since the QEMU struct type representing the VFIO container is deduced
from the IOMMU type exposed by the host, this type should be well
defined *before* creating the container struct. This will be necessary
to instantiate a QOM object of the correct type in future changes.

Rework vfio_set_iommu() to extract the part doing the container
initialization and move it under vfio_create_container().

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