Re: [PATCH V4 05/18] iommu/ioasid: Redefine IOASID set and allocation APIs
From: Jason Gunthorpe
Date: Fri May 07 2021 - 07:56:48 EST
On Fri, May 07, 2021 at 07:36:49AM +0000, Tian, Kevin wrote:
> for /dev/ioasid there is still an open whether an process is allowed to
> open /dev/ioasid once or multiple times. If there is only one ioasid_fd
> per process, the accounting can be made accurately. otherwise the
> same problem still exists as each ioasid_fd is akin to the container, then
> we need find a better solution.
You can't really do tricks like 'FD once per process' in linux.
The locked page accounting problem is much bigger than vfio and I
don't really know of any solution..