On Mon, 2015-08-03 at 17:34 -0400, Jerome Glisse wrote: > Note that i really would like the ASID <-> mm struct 1 to 1 match but > i am just fearing this is not something that can be common to all > platform. You are quite possibly right. And we don't *have* to force it. We probably do need to design the core IOMMU interfaces to tolerate either. The actual PASID allocation wants to be outside the individual IOMMU driver anyway. The main thing we need to do is let the IOMMU know if it can share PASID tables or not. I'm now pondering a 'pasid_space' object which will contain an IDR or something for allocating PASIDs, and when one of those object is created we can also call into an IOMMU driver function for allocating a set of PASID tables (if it needs to). You then attach a given device to a pasid space. I suppose it ends up looking at lot like the existing IOMMU domains that you can map multiple devices into. -- David Woodhouse Open Source Technology Centre David.Woodhouse@intel.com Intel Corporation