Re: [PATCH 04/14] iommu: sva: Add support for pasid allocation

2018-03-02 Thread Jean-Philippe Brucker
On 21/02/18 22:59, Jordan Crouse wrote: [...] > +int iommu_sva_alloc_pasid(struct iommu_domain *domain, struct device *dev) > +{ > + int ret, pasid; > + struct io_pasid *io_pasid; > + > + if (!domain->ops->pasid_alloc || !domain->ops->pasid_free) > + return -ENODEV; > + > +

Re: [PATCH 04/14] iommu: sva: Add support for pasid allocation

2018-03-02 Thread Jordan Crouse
On Fri, Mar 02, 2018 at 12:27:58PM +, Jean-Philippe Brucker wrote: > On 21/02/18 22:59, Jordan Crouse wrote: > [...] > > +int iommu_sva_alloc_pasid(struct iommu_domain *domain, struct device *dev) > > +{ > > + int ret, pasid; > > + struct io_pasid *io_pasid; > > + > > + if (!domain->ops->

[PATCH 04/14] iommu: sva: Add support for pasid allocation

2018-02-21 Thread Jordan Crouse
Some older SMMU implementations that do not have a fully featured PASID model have alternate workarounds for using multiple pagetables. For example, MSM GPUs have logic to automatically switch the user pagetable from hardware by writing the context bank directly. Instead of binding and sharing CPU