Messages in this thread | | | Date | Sun, 12 Dec 2021 19:34:28 -0400 | From | Jason Gunthorpe <> | Subject | Re: [PATCH 1/4] ioasid: Reserve a global PASID for in-kernel DMA |
| |
On Sat, Dec 11, 2021 at 08:39:12AM +0000, Tian, Kevin wrote:
> Uniqueness is not the main argument of using global PASIDs for > SWQ, since it can be defined either in per-RID or in global PASID > space. No SVA architecture can allow two processes to use the > same PASID to submit work unless they share mm! 😊 > > IMO the real reason is that SWQ for user SVA must be accessed > via ENQCMD instruction which fetches the PASID from a CPU MSR
This really should have been inside a comment in the struct mm
"pasid is the value used by x86 ENQCMD"
(and if we phrase it that way I wonder why it is in a struct mm not some process or task related struct, since it has nothing to do with page tables)
And, IMHO, the IOMMU part of the code should avoid using this field. IOMMU should be able to create arbitarily many "SVA" iommu_domains for use by PASID even if they can't be used with ENQCMD. Such is proper layering.
Jason
| |