> From: Jason Gunthorpe <jgg@xxxxxxxxxx> > Sent: Wednesday, August 17, 2022 3:13 AM > > + * > + * A driver may only call this function if the vfio_device was created > + * by vfio_register_emulated_iommu_dev(). > */ > int vfio_pin_pages(struct vfio_device *device, dma_addr_t iova, > int npage, int prot, struct page **pages) Though I agree with the code change, I'm still unclear about this comment. First this comment is not equivalent to the old code which only checks dev_counter (implying a physical device in a singleton group can use this API too). though I didn't get why the singleton restriction was imposed in the first place... Second I also didn't get why such a pinning API is tied to emulated iommu now. Though not required for any physical device today, what would be the actual problem of allowing a variant driver to make such call? Thanks Kevin