Re: [RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API

2021-12-09 Thread Eric Auger
Hi Jason, On 12/9/21 4:40 PM, Jason Gunthorpe wrote: > On Thu, Dec 09, 2021 at 08:50:04AM +0100, Eric Auger wrote: > >>> The kernel API should accept the S1ContextPtr IPA and all the parts of >>> the STE that relate to the defining the layout of what the S1Context >>> points to an thats it. >>

Re: [RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API

2021-12-09 Thread Jason Gunthorpe via iommu
On Thu, Dec 09, 2021 at 03:59:57AM +, Tian, Kevin wrote: > > From: Tian, Kevin > > Sent: Thursday, December 9, 2021 10:58 AM > > > > For ARM it's SMMU's PASID table format. There is no step-2 since PASID > > is already within the address space covered by the user PASID table. > > > > One

Re: [RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API

2021-12-09 Thread Jason Gunthorpe via iommu
On Thu, Dec 09, 2021 at 08:50:04AM +0100, Eric Auger wrote: > > The kernel API should accept the S1ContextPtr IPA and all the parts of > > the STE that relate to the defining the layout of what the S1Context > > points to an thats it. > Yes that's exactly what is done currently. At config time

Re: [RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API

2021-12-09 Thread Eric Auger
Hi Kevin, On 12/9/21 4:21 AM, Tian, Kevin wrote: >> From: Jason Gunthorpe >> Sent: Wednesday, December 8, 2021 8:56 PM >> >> On Wed, Dec 08, 2021 at 08:33:33AM +0100, Eric Auger wrote: >>> Hi Baolu, >>> >>> On 12/8/21 3:44 AM, Lu Baolu wrote: Hi Eric, On 12/7/21 6:22 PM, Eric

Re: [RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API

2021-12-09 Thread Eric Auger
Hi Jason, On 12/8/21 1:56 PM, Jason Gunthorpe wrote: > On Wed, Dec 08, 2021 at 08:33:33AM +0100, Eric Auger wrote: >> Hi Baolu, >> >> On 12/8/21 3:44 AM, Lu Baolu wrote: >>> Hi Eric, >>> >>> On 12/7/21 6:22 PM, Eric Auger wrote: On 12/6/21 11:48 AM, Joerg Roedel wrote: > On Wed, Oct 27,

Re: [RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API

2021-12-08 Thread Eric Auger
Hi Jason, On 12/8/21 7:31 PM, Jason Gunthorpe wrote: > On Wed, Dec 08, 2021 at 05:20:39PM +, Jean-Philippe Brucker wrote: >> On Wed, Dec 08, 2021 at 08:56:16AM -0400, Jason Gunthorpe wrote: >>> From a progress perspective I would like to start with simple 'page >>> tables in userspace', ie no

RE: [RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API

2021-12-08 Thread Tian, Kevin
> From: Tian, Kevin > Sent: Thursday, December 9, 2021 10:58 AM > > For ARM it's SMMU's PASID table format. There is no step-2 since PASID > is already within the address space covered by the user PASID table. > One correction here. 'no step-2' is definitely wrong here as it means more than

RE: [RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API

2021-12-08 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Wednesday, December 8, 2021 8:56 PM > > On Wed, Dec 08, 2021 at 08:33:33AM +0100, Eric Auger wrote: > > Hi Baolu, > > > > On 12/8/21 3:44 AM, Lu Baolu wrote: > > > Hi Eric, > > > > > > On 12/7/21 6:22 PM, Eric Auger wrote: > > >> On 12/6/21 11:48 AM, Joerg Roedel

RE: [RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API

2021-12-08 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, December 9, 2021 2:31 AM > > On Wed, Dec 08, 2021 at 05:20:39PM +, Jean-Philippe Brucker wrote: > > On Wed, Dec 08, 2021 at 08:56:16AM -0400, Jason Gunthorpe wrote: > > > From a progress perspective I would like to start with simple 'page > > >

Re: [RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API

2021-12-08 Thread Jason Gunthorpe via iommu
On Wed, Dec 08, 2021 at 05:20:39PM +, Jean-Philippe Brucker wrote: > On Wed, Dec 08, 2021 at 08:56:16AM -0400, Jason Gunthorpe wrote: > > From a progress perspective I would like to start with simple 'page > > tables in userspace', ie no PASID in this step. > > > > 'page tables in userspace'

Re: [RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API

2021-12-08 Thread Jean-Philippe Brucker
On Wed, Dec 08, 2021 at 08:56:16AM -0400, Jason Gunthorpe wrote: > From a progress perspective I would like to start with simple 'page > tables in userspace', ie no PASID in this step. > > 'page tables in userspace' means an iommufd ioctl to create an > iommu_domain where the IOMMU HW is directly

Re: [RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API

2021-12-08 Thread Jason Gunthorpe via iommu
On Wed, Dec 08, 2021 at 08:33:33AM +0100, Eric Auger wrote: > Hi Baolu, > > On 12/8/21 3:44 AM, Lu Baolu wrote: > > Hi Eric, > > > > On 12/7/21 6:22 PM, Eric Auger wrote: > >> On 12/6/21 11:48 AM, Joerg Roedel wrote: > >>> On Wed, Oct 27, 2021 at 12:44:20PM +0200, Eric Auger wrote: >

Re: [RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API

2021-12-07 Thread Eric Auger
Hi Baolu, On 12/8/21 3:44 AM, Lu Baolu wrote: > Hi Eric, > > On 12/7/21 6:22 PM, Eric Auger wrote: >> On 12/6/21 11:48 AM, Joerg Roedel wrote: >>> On Wed, Oct 27, 2021 at 12:44:20PM +0200, Eric Auger wrote: Signed-off-by: Jean-Philippe Brucker Signed-off-by: Liu, Yi L

Re: [RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API

2021-12-07 Thread Lu Baolu
Hi Eric, On 12/7/21 6:22 PM, Eric Auger wrote: On 12/6/21 11:48 AM, Joerg Roedel wrote: On Wed, Oct 27, 2021 at 12:44:20PM +0200, Eric Auger wrote: Signed-off-by: Jean-Philippe Brucker Signed-off-by: Liu, Yi L Signed-off-by: Ashok Raj Signed-off-by: Jacob Pan Signed-off-by: Eric Auger This

Re: [RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API

2021-12-07 Thread Eric Auger
Hi Joerg, On 12/6/21 11:48 AM, Joerg Roedel wrote: > On Wed, Oct 27, 2021 at 12:44:20PM +0200, Eric Auger wrote: >> Signed-off-by: Jean-Philippe Brucker >> Signed-off-by: Liu, Yi L >> Signed-off-by: Ashok Raj >> Signed-off-by: Jacob Pan >> Signed-off-by: Eric Auger > This Signed-of-by chain

Re: [RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API

2021-12-06 Thread Joerg Roedel
On Wed, Oct 27, 2021 at 12:44:20PM +0200, Eric Auger wrote: > Signed-off-by: Jean-Philippe Brucker > Signed-off-by: Liu, Yi L > Signed-off-by: Ashok Raj > Signed-off-by: Jacob Pan > Signed-off-by: Eric Auger This Signed-of-by chain looks dubious, you are the author but the last one in the

[RFC v16 1/9] iommu: Introduce attach/detach_pasid_table API

2021-10-27 Thread Eric Auger
In virtualization use case, when a guest is assigned a PCI host device, protected by a virtual IOMMU on the guest, the physical IOMMU must be programmed to be consistent with the guest mappings. If the physical IOMMU supports two translation stages it makes sense to program guest mappings onto the