Re: [PATCH v3] vfio/type1: Adopt fast IOTLB flush interface when unmap IOVAs

2018-01-24 Thread Suravee Suthikulpanit
Alex / Joerg, On 1/24/18 5:04 AM, Alex Williamson wrote: @@ -648,12 +685,40 @@ static int vfio_iommu_type1_unpin_pages(void *iommu_data, return i > npage ? npage : (i > 0 ? i : -EINVAL); } +static size_t try_unmap_unpin_fast(struct vfio_domain *domain, dma_addr_t iova, +

Re: [PATCH v3] vfio/type1: Adopt fast IOTLB flush interface when unmap IOVAs

2018-01-23 Thread Suravee Suthikulpanit
Alex/Joerg, On 1/24/18 5:04 AM, Alex Williamson wrote: +static size_t try_unmap_unpin_fast(struct vfio_domain *domain, dma_addr_t iova, + size_t len, phys_addr_t phys, + struct list_head *unmapped_regions) +{ + struct

Re: [PATCH v3] vfio/type1: Adopt fast IOTLB flush interface when unmap IOVAs

2018-01-23 Thread Alex Williamson
Hi Suravee, On Sun, 21 Jan 2018 23:29:37 -0500 Suravee Suthikulpanit wrote: > VFIO IOMMU type1 currently upmaps IOVA pages synchronously, which requires > IOTLB flushing for every unmapping. This results in large IOTLB flushing > overhead when handling

[PATCH v3] vfio/type1: Adopt fast IOTLB flush interface when unmap IOVAs

2018-01-21 Thread Suravee Suthikulpanit
VFIO IOMMU type1 currently upmaps IOVA pages synchronously, which requires IOTLB flushing for every unmapping. This results in large IOTLB flushing overhead when handling pass-through devices has a large number of mapped IOVAs (e.g. GPUs). This could also cause IOTLB invalidate time-out issue on