On Mon, Jun 30, 2025 at 03:25:18PM +0800, lizhe.67@xxxxxxxxxxxxx wrote: > diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c > index a02bc340c112..7cacfb2cefe3 100644 > --- a/drivers/vfio/vfio_iommu_type1.c > +++ b/drivers/vfio/vfio_iommu_type1.c > @@ -802,17 +802,29 @@ static long vfio_pin_pages_remote(struct vfio_dma *dma, unsigned long vaddr, > return pinned; > } > > +static inline void put_valid_unreserved_pfns(unsigned long start_pfn, > + unsigned long npage, int prot) > +{ > + unpin_user_page_range_dirty_lock(pfn_to_page(start_pfn), npage, > + prot & IOMMU_WRITE); > +} I don't think you need this wrapper. This patch and the prior look OK Jason