> From: Jason Gunthorpe <jgg@xxxxxxxxxx> > Sent: Monday, February 6, 2023 11:11 PM > > On Mon, Feb 06, 2023 at 10:09:52AM +0000, Tian, Kevin wrote: > > It's probably simpler if we always mark DMA owner with vfio_group > > for the group path, no matter vfio type1 or iommufd compat is used. > > This should avoid all the tricky corner cases between the two paths. > > Yes Then, we have two choices: 1) extend iommufd_device_bind() to allow a caller-specified DMA marker 2) claim DMA owner before calling iommufd_device_bind(), still need to extend iommufd_device_bind() to accept a flag to bypass DMA owner claim which one would be better? or do we have a third choice? Regards, Yi Liu