Re: [PATCH v2 03/40] iommu/sva: Manage process address spaces

2018-09-06 Thread Jean-Philippe Brucker
On 05/09/2018 19:18, Jacob Pan wrote: > On Wed, 5 Sep 2018 14:14:12 +0200 > Auger Eric wrote: > >>> + * >>> + * On Arm and AMD IOMMUs, entry 0 of the PASID table can be used >>> to hold >>> + * non-PASID translations. In this case PASID 0 is reserved and >>> entry 0 points >>> + * to the

Re: [PATCH v2 03/40] iommu/sva: Manage process address spaces

2018-09-06 Thread Jean-Philippe Brucker
On 05/09/2018 13:14, Auger Eric wrote: >> +static struct io_mm * >> +io_mm_alloc(struct iommu_domain *domain, struct device *dev, >> +struct mm_struct *mm, unsigned long flags) >> +{ >> +int ret; >> +int pasid; >> +struct io_mm *io_mm; >> +struct iommu_sva_param *param =

Re: [PATCH v2 03/40] iommu/sva: Manage process address spaces

2018-09-05 Thread Jacob Pan
On Wed, 5 Sep 2018 14:14:12 +0200 Auger Eric wrote: > > + * > > + * On Arm and AMD IOMMUs, entry 0 of the PASID table can be used > > to hold > > + * non-PASID translations. In this case PASID 0 is reserved and > > entry 0 points > > + * to the io_pgtable base. On Intel IOMMU, the io_pgtable

Re: [PATCH v2 03/40] iommu/sva: Manage process address spaces

2018-09-05 Thread Auger Eric
Hi Jean-Philippe, On 05/11/2018 09:06 PM, Jean-Philippe Brucker wrote: > Allocate IOMMU mm structures and binding them to devices. Four operations s/binding/bind > are added to IOMMU drivers: > > * mm_alloc(): to create an io_mm structure and perform architecture- > specific operations

Re: [PATCH v2 03/40] iommu/sva: Manage process address spaces

2018-06-11 Thread Kenneth Lee
, Jacob Pan , > "alex.william...@redhat.com" , > "rgum...@xilinx.com" , "thunder.leiz...@huawei.com" > , "linux-arm-ker...@lists.infradead.org" > , "shunyong.y...@hxt-semitech.com" > , "dw...@infradead.org" > , "liu

Re: [PATCH v2 03/40] iommu/sva: Manage process address spaces

2018-06-11 Thread Kenneth Lee
.com" , Jacob Pan > , "alex.william...@redhat.com" > , "rgum...@xilinx.com" , > "thunder.leiz...@huawei.com" , > "linux-arm-ker...@lists.infradead.org" > , "shunyong.y...@hxt-semitech.com" > , "dw...@infradead.org" >

Re: [PATCH v2 03/40] iommu/sva: Manage process address spaces

2018-05-25 Thread Kenneth Lee
arm-ker...@lists.infradead.org" > <linux-arm-ker...@lists.infradead.org>, "shunyong.y...@hxt-semitech.com" > <shunyong.y...@hxt-semitech.com>, "dw...@infradead.org" > <dw...@infradead.org>, "liub...@huawei.com" <liub...@huawei.com&

Re: [PATCH v2 03/40] iommu/sva: Manage process address spaces

2018-05-25 Thread Jonathan Cameron
+CC Kenneth Lee On Fri, 25 May 2018 09:33:11 +0300 Ilias Apalodimas wrote: > On Thu, May 24, 2018 at 04:04:39PM +0100, Jean-Philippe Brucker wrote: > > On 24/05/18 12:50, Ilias Apalodimas wrote: > > >> Interesting, I hadn't thought about this use-case before. At

Re: [PATCH v2 03/40] iommu/sva: Manage process address spaces

2018-05-25 Thread Ilias Apalodimas
On Thu, May 24, 2018 at 04:04:39PM +0100, Jean-Philippe Brucker wrote: > On 24/05/18 12:50, Ilias Apalodimas wrote: > >> Interesting, I hadn't thought about this use-case before. At first I > >> thought you were talking about mdev devices assigned to VMs, but I think > >> you're referring to mdevs

Re: [PATCH v2 03/40] iommu/sva: Manage process address spaces

2018-05-24 Thread Jean-Philippe Brucker
On 24/05/18 12:50, Ilias Apalodimas wrote: >> Interesting, I hadn't thought about this use-case before. At first I >> thought you were talking about mdev devices assigned to VMs, but I think >> you're referring to mdevs assigned to userspace drivers instead? Out of >> curiosity, is it only

Re: [PATCH v2 03/40] iommu/sva: Manage process address spaces

2018-05-24 Thread Ilias Apalodimas
> Interesting, I hadn't thought about this use-case before. At first I > thought you were talking about mdev devices assigned to VMs, but I think > you're referring to mdevs assigned to userspace drivers instead? Out of > curiosity, is it only theoretical or does someone actually need this? There

Re: [PATCH v2 03/40] iommu/sva: Manage process address spaces

2018-05-24 Thread Jean-Philippe Brucker
On 22/05/18 17:43, Jacob Pan wrote: > On Thu, 17 May 2018 11:02:42 +0100 > Jean-Philippe Brucker wrote: > >> On 17/05/18 00:31, Jacob Pan wrote: >>> On Fri, 11 May 2018 20:06:04 +0100 >>> I am a little confused about domain vs. pasid relationship. If >>> each

Re: [PATCH v2 03/40] iommu/sva: Manage process address spaces

2018-05-22 Thread Jacob Pan
On Thu, 17 May 2018 11:02:42 +0100 Jean-Philippe Brucker wrote: > On 17/05/18 00:31, Jacob Pan wrote: > > On Fri, 11 May 2018 20:06:04 +0100 > > I am a little confused about domain vs. pasid relationship. If > > each domain represents a address space, should there

Re: [PATCH v2 03/40] iommu/sva: Manage process address spaces

2018-05-21 Thread Jean-Philippe Brucker
On 17/05/18 15:25, Jonathan Cameron wrote: >> +static struct io_mm * >> +io_mm_alloc(struct iommu_domain *domain, struct device *dev, >> +struct mm_struct *mm, unsigned long flags) >> +{ >> +int ret; >> +int pasid; >> +struct io_mm *io_mm; >> +struct iommu_sva_param *param

Re: [PATCH v2 03/40] iommu/sva: Manage process address spaces

2018-05-17 Thread Jonathan Cameron
On Fri, 11 May 2018 20:06:04 +0100 Jean-Philippe Brucker wrote: > Allocate IOMMU mm structures and binding them to devices. Four operations > are added to IOMMU drivers: > > * mm_alloc(): to create an io_mm structure and perform architecture- > specific

Re: [PATCH v2 03/40] iommu/sva: Manage process address spaces

2018-05-17 Thread Jean-Philippe Brucker
On 17/05/18 00:31, Jacob Pan wrote: > On Fri, 11 May 2018 20:06:04 +0100 > I am a little confused about domain vs. pasid relationship. If > each domain represents a address space, should there be a domain for > each pasid? I don't think there is a formal definition, but from previous discussion

Re: [PATCH v2 03/40] iommu/sva: Manage process address spaces

2018-05-16 Thread Jacob Pan
On Fri, 11 May 2018 20:06:04 +0100 Jean-Philippe Brucker wrote: > Allocate IOMMU mm structures and binding them to devices. Four > operations are added to IOMMU drivers: > > * mm_alloc(): to create an io_mm structure and perform architecture- > specific

[PATCH v2 03/40] iommu/sva: Manage process address spaces

2018-05-11 Thread Jean-Philippe Brucker
Allocate IOMMU mm structures and binding them to devices. Four operations are added to IOMMU drivers: * mm_alloc(): to create an io_mm structure and perform architecture- specific operations required to grab the process (for instance on ARM, pin down the CPU ASID so that the process doesn't