Re: [Qemu-devel] [RFC v2 07/28] hw/vfio/common: Refactor container initialization

2018-10-24 Thread Auger Eric
Hi Greg, On 10/22/18 4:39 PM, Greg Kurz wrote: > On Fri, 21 Sep 2018 10:17:58 +0200 > Eric Auger wrote: > >> To prepare for testing yet another extension, let's >> refactor the code. We introduce vfio_iommu_get_type() >> helper which selects the richest API (v2 first). Then >> vfio_init_container

Re: [Qemu-devel] [RFC v2 07/28] hw/vfio/common: Refactor container initialization

2018-10-22 Thread Greg Kurz
On Fri, 21 Sep 2018 10:17:58 +0200 Eric Auger wrote: > To prepare for testing yet another extension, let's > refactor the code. We introduce vfio_iommu_get_type() > helper which selects the richest API (v2 first). Then > vfio_init_container() does the SET_CONTAINER and > SET_IOMMU ioctl calls. So

[Qemu-devel] [RFC v2 07/28] hw/vfio/common: Refactor container initialization

2018-09-21 Thread Eric Auger
To prepare for testing yet another extension, let's refactor the code. We introduce vfio_iommu_get_type() helper which selects the richest API (v2 first). Then vfio_init_container() does the SET_CONTAINER and SET_IOMMU ioctl calls. So we end up with a switch/case on the iommu_type which should be a