Re: [Qemu-devel] [PATCH] hw/vfio/common: Refactor container initialization

2019-01-14 Thread Greg Kurz
On Mon, 14 Jan 2019 09:34:12 +0100 Auger Eric wrote: > Hi Alexey, > > On 1/14/19 7:32 AM, Alexey Kardashevskiy wrote: > > > > > > On 12/01/2019 03:45, Eric Auger wrote: > >> In vfio_connect_container() the code that selects the > >> iommu type can benefit from helpers such as > >> vfio_iommu

Re: [Qemu-devel] [PATCH] hw/vfio/common: Refactor container initialization

2019-01-14 Thread Auger Eric
Hi Alexey, On 1/14/19 7:32 AM, Alexey Kardashevskiy wrote: > > > On 12/01/2019 03:45, Eric Auger wrote: >> In vfio_connect_container() the code that selects the >> iommu type can benefit from helpers such as >> vfio_iommu_get_type() and vfio_init_container(). As >> a result we end up with a swit

Re: [Qemu-devel] [PATCH] hw/vfio/common: Refactor container initialization

2019-01-13 Thread Alexey Kardashevskiy
On 12/01/2019 03:45, Eric Auger wrote: > In vfio_connect_container() the code that selects the > iommu type can benefit from helpers such as > vfio_iommu_get_type() and vfio_init_container(). As > a result we end up with a switch/case on the iommu type > that makes the code a little bit more rea

[Qemu-devel] [PATCH] hw/vfio/common: Refactor container initialization

2019-01-11 Thread Eric Auger
In vfio_connect_container() the code that selects the iommu type can benefit from helpers such as vfio_iommu_get_type() and vfio_init_container(). As a result we end up with a switch/case on the iommu type that makes the code a little bit more readable and ready for addition of new iommu types. Als