Hi, In patch series[1], I put forward some fixes and optimizations for vfio_iommu_type1. This extracts and improves the optimization part of it. [1] https://lore.kernel.org/linux-iommu/20201210073425.25960-1-zhukeqian1@xxxxxxxxxx/T/#t Thanks, Keqian Keqian Zhu (6): vfio/iommu_type1: Make an explicit "promote" semantic vfio/iommu_type1: Ignore external domain when promote pinned_scope vfio/iommu_type1: Initially set the pinned_page_dirty_scope vfio/iommu_type1: Drop parameter "pgsize" of vfio_dma_bitmap_alloc_all vfio/iommu_type1: Drop parameter "pgsize" of vfio_iova_dirty_bitmap vfio/iommu_type1: Drop parameter "pgsize" of update_user_bitmap drivers/vfio/vfio_iommu_type1.c | 67 +++++++++++++-------------------- 1 file changed, 26 insertions(+), 41 deletions(-) -- 2.19.1