Re: [RFC 1/3] util/vfio-helpers: Collect IOVA reserved regions

2020-09-25 Thread Auger Eric
Hi Fam, On 9/25/20 5:44 PM, Fam Zheng wrote: > On Fri, 2020-09-25 at 17:23 +0200, Auger Eric wrote: @@ -365,8 +430,12 @@ static int qemu_vfio_init_pci(QEMUVFIOState *s, const char *device, if (ret) { goto fail; } +g_free(iommu_info);

Re: [RFC 1/3] util/vfio-helpers: Collect IOVA reserved regions

2020-09-25 Thread Fam Zheng
On Fri, 2020-09-25 at 17:23 +0200, Auger Eric wrote: > > > @@ -365,8 +430,12 @@ static int qemu_vfio_init_pci(QEMUVFIOState > > > *s, const char *device, > > > if (ret) { > > > goto fail; > > > } > > > +g_free(iommu_info); > > > return 0; > > > fail: > > > +

Re: [RFC 1/3] util/vfio-helpers: Collect IOVA reserved regions

2020-09-25 Thread Auger Eric
Hi Fam, On 9/25/20 4:43 PM, Fam Zheng wrote: > On 2020-09-25 15:48, Eric Auger wrote: >> The IOVA allocator currently ignores host reserved regions. >> As a result some chosen IOVAs may collide with some of them, >> resulting in VFIO MAP_DMA errors later on. This happens on ARM >> where the MSI

Re: [RFC 1/3] util/vfio-helpers: Collect IOVA reserved regions

2020-09-25 Thread Fam Zheng
On 2020-09-25 15:48, Eric Auger wrote: > The IOVA allocator currently ignores host reserved regions. > As a result some chosen IOVAs may collide with some of them, > resulting in VFIO MAP_DMA errors later on. This happens on ARM > where the MSI reserved window quickly is encountered: > [0x800,

[RFC 1/3] util/vfio-helpers: Collect IOVA reserved regions

2020-09-25 Thread Eric Auger
The IOVA allocator currently ignores host reserved regions. As a result some chosen IOVAs may collide with some of them, resulting in VFIO MAP_DMA errors later on. This happens on ARM where the MSI reserved window quickly is encountered: [0x800, 0x810]. since 5.4 kernel, VFIO returns the