Re: [PATCH v10 12/13] iommu/arm-smmu-v3: Implement iommu_sva_bind/unbind()

2020-11-25 Thread Jason Gunthorpe
On Wed, Nov 25, 2020 at 10:27:49AM +0100, Jean-Philippe Brucker wrote: > > I'm strongly > > trying to discourage static lists matching mm's like smmu_mn is > > doing. This is handled by the core code, don't open code it.. > > We discussed this at v6, which wonkily stored the mn ops in the domain t

Re: [PATCH v10 12/13] iommu/arm-smmu-v3: Implement iommu_sva_bind/unbind()

2020-11-25 Thread Jean-Philippe Brucker
On Tue, Nov 24, 2020 at 07:58:00PM -0400, Jason Gunthorpe wrote: > On Fri, Sep 18, 2020 at 12:18:52PM +0200, Jean-Philippe Brucker wrote: > > > +/* Allocate or get existing MMU notifier for this {domain, mm} pair */ > > +static struct arm_smmu_mmu_notifier * > > +arm_smmu_mmu_notifier_get(struct a

Re: [PATCH v10 12/13] iommu/arm-smmu-v3: Implement iommu_sva_bind/unbind()

2020-11-24 Thread Jason Gunthorpe
On Fri, Sep 18, 2020 at 12:18:52PM +0200, Jean-Philippe Brucker wrote: > +/* Allocate or get existing MMU notifier for this {domain, mm} pair */ > +static struct arm_smmu_mmu_notifier * > +arm_smmu_mmu_notifier_get(struct arm_smmu_domain *smmu_domain, > + struct mm_struct *mm

[PATCH v10 12/13] iommu/arm-smmu-v3: Implement iommu_sva_bind/unbind()

2020-09-18 Thread Jean-Philippe Brucker
The sva_bind() function allows devices to access process address spaces using a PASID (aka SSID). (1) bind() allocates or gets an existing MMU notifier tied to the (domain, mm) pair. Each mm gets one PASID. (2) Any change to the address space calls invalidate_range() which sends ATC inval