Re: [PATCH v2 3/8] iommu/vt-d: Implement device_pasid domain attach ops
From: Jason Gunthorpe
Date: Wed Mar 16 2022 - 20:04:17 EST
On Wed, Mar 16, 2022 at 10:23:26PM +0000, Luck, Tony wrote:
> Kernel users (ring0) can supply any PASID when they use
> the ENQCMDS instruction. Is that what you mean when you
> say "real applications"?
I'm not talking about ENQCMD at all
I'm saying I don't see much utility to have two PASIDs assigned to the
same device that perform the same IOVA translation.
So I would expect the list of attachments in an iommu_domain to have
exactly one device in it and multiple PASIDs to the same device from
the same iommu_domain is a oddball corner case we don't need to
optimize for, beyond being able to allow it to happen.
Jason