]> git.proxmox.com Git - mirror_qemu.git/commit
hw/vfio/common: Refactor container initialization
authorEric Auger <eric.auger@redhat.com>
Fri, 22 Feb 2019 04:07:03 +0000 (21:07 -0700)
committerAlex Williamson <alex.williamson@redhat.com>
Fri, 22 Feb 2019 04:07:03 +0000 (21:07 -0700)
commit2b6326c0bf2c686ae83d6904899cb80e9ad7a6fb
tree3fc3447565d98996bbb815c5f509f74bb3a76631
parent567d7d3e6be5e84741655729aebf78c7257ed043
hw/vfio/common: Refactor container initialization

We introduce the vfio_init_container_type() helper.
It computes the highest usable iommu type and then
set the container and the iommu type.

Its usage in vfio_connect_container() makes the code
ready for addition of new iommu types.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/common.c