Re: [PATCH] iommu/vt-d: Fix unmap_pages support

2021-11-18 Thread Lu Baolu
Hi Jerry, On 11/19/21 3:48 AM, Jerry Snitselaar wrote: On Fri, 2021-11-12 at 10:59 +0800, Lu Baolu wrote: Hi Alex, On 11/11/21 8:32 AM, Alex Williamson wrote: When supporting only the .map and .unmap callbacks of iommu_ops, the IOMMU driver can make assumptions about the size and alignment

Re: [PATCH] iommu/vt-d: Fix unmap_pages support

2021-11-18 Thread Jerry Snitselaar
On Fri, 2021-11-12 at 10:59 +0800, Lu Baolu wrote: > Hi Alex, > > On 11/11/21 8:32 AM, Alex Williamson wrote: > > When supporting only the .map and .unmap callbacks of iommu_ops, > > the IOMMU driver can make assumptions about the size and alignment > > used for mappings based on the driver

Re: [PATCH] iommu/vt-d: Fix unmap_pages support

2021-11-11 Thread Lu Baolu
Hi Alex, On 11/11/21 8:32 AM, Alex Williamson wrote: When supporting only the .map and .unmap callbacks of iommu_ops, the IOMMU driver can make assumptions about the size and alignment used for mappings based on the driver provided pgsize_bitmap. VT-d previously used essentially PAGE_MASK for

Re: [PATCH] iommu/vt-d: Fix unmap_pages support

2021-11-11 Thread Giovanni Cabiddu
I was able to hit the issue that this patch is fixing using the memory allocator in QATlib (https://github.com/intel/qatlib/) which uses vfio to map and unmap memory. This patch fixes the problem. On Wed, Nov 10, 2021 at 05:32:50PM -0700, Alex Williamson wrote: > When supporting only the .map

Re: [PATCH] iommu/vt-d: Fix unmap_pages support

2021-11-11 Thread Ajay Garg
Thanks Alex, Baolu. The patch fixes things at my end. No kernel-flooding is seen now (tested starting/stopping vm > 10 times). Thanks and Regards, Ajay On Thu, Nov 11, 2021 at 6:03 AM Alex Williamson wrote: > > When supporting only the .map and .unmap callbacks of iommu_ops, > the IOMMU driver

[PATCH] iommu/vt-d: Fix unmap_pages support

2021-11-10 Thread Alex Williamson
When supporting only the .map and .unmap callbacks of iommu_ops, the IOMMU driver can make assumptions about the size and alignment used for mappings based on the driver provided pgsize_bitmap. VT-d previously used essentially PAGE_MASK for this bitmap as any power of two mapping was acceptably