RE: Support SVM without PASID

2017-08-28 Thread Tian, Kevin
> From: Bharat Kumar Gogada [mailto:bhara...@xilinx.com] > Sent: Monday, August 28, 2017 9:10 PM > > > Subject: RE: Support SVM without PASID > > > > > From: valmiki [mailto:valmiki...@gmail.com] > > > Sent: Saturday, August 12, 2017 8:11 PM > > >

RE: Support SVM without PASID

2017-08-28 Thread Bharat Kumar Gogada
> Subject: RE: Support SVM without PASID > > > From: valmiki [mailto:valmiki...@gmail.com] > > Sent: Saturday, August 12, 2017 8:11 PM > > > > On 8/7/2017 4:01 PM, Jean-Philippe Brucker wrote: > > > On 05/08/17 06:14, valmiki wrote: > > > [...] &g

Re: Support SVM without PASID

2017-08-14 Thread Jean-Philippe Brucker
On 14/08/17 09:00, Tian, Kevin wrote: >> From: Raj, Ashok >> Sent: Saturday, August 12, 2017 12:25 AM >> >> On Fri, Aug 04, 2017 at 10:42:41AM +0100, Jean-Philippe Brucker wrote: >>> Hi Kevin, >>> >>> >>> Consider the situation where a userspace driver (no virtualization) is >>> built in a client-s

RE: Support SVM without PASID

2017-08-14 Thread Tian, Kevin
> From: Raj, Ashok > Sent: Saturday, August 12, 2017 12:25 AM > > On Fri, Aug 04, 2017 at 10:42:41AM +0100, Jean-Philippe Brucker wrote: > > Hi Kevin, > > > > > > Consider the situation where a userspace driver (no virtualization) is > > built in a client-server fashion: the server controls a devi

RE: Support SVM without PASID

2017-08-14 Thread Tian, Kevin
> From: valmiki [mailto:valmiki...@gmail.com] > Sent: Saturday, August 12, 2017 8:11 PM > > On 8/7/2017 4:01 PM, Jean-Philippe Brucker wrote: > > On 05/08/17 06:14, valmiki wrote: > > [...] > >> Hi Jean, Thanks a lot, now i understood the flow. From vfio kernel > >> documentation we fill vaddr and

Re: Support SVM without PASID

2017-08-12 Thread valmiki
On 8/7/2017 4:01 PM, Jean-Philippe Brucker wrote: On 05/08/17 06:14, valmiki wrote: [...] Hi Jean, Thanks a lot, now i understood the flow. From vfio kernel documentation we fill vaddr and iova in struct vfio_iommu_type1_dma_map and pass them to VFIO. But if we use dynamic allocation in applic

Re: Support SVM without PASID

2017-08-11 Thread Raj, Ashok
On Fri, Aug 04, 2017 at 10:42:41AM +0100, Jean-Philippe Brucker wrote: > Hi Kevin, > > > Consider the situation where a userspace driver (no virtualization) is > built in a client-server fashion: the server controls a device and spawns > new processes (clients), each sharing a context with the de

Re: Support SVM without PASID

2017-08-11 Thread Bob Liu
On 2017/8/11 14:41, Tian, Kevin wrote: >> From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] >> Sent: Monday, August 7, 2017 8:52 PM >> >> Hi Bob, >> >> On 07/08/17 13:18, Bob Liu wrote: >>> On 2017/8/7 18:31, Jean-Philippe Brucker wrote: On 05/08/17 06:14, valmiki wrote:

Re: Support SVM without PASID

2017-08-11 Thread Jean-Philippe Brucker
On 11/08/17 07:41, Tian, Kevin wrote: [...] >>> Hi Jean, >>> >>> I think there is another way to support SVM without PASID. >>> >>> Suppose there is a device in the same SOC-chip, the device access memory >> through SMMU(using internal bus instead of PCIe) >>> Once page fault, the device send an ev

RE: Support SVM without PASID

2017-08-10 Thread Tian, Kevin
> From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] > Sent: Monday, August 7, 2017 8:52 PM > > Hi Bob, > > On 07/08/17 13:18, Bob Liu wrote: > > On 2017/8/7 18:31, Jean-Philippe Brucker wrote: > >> On 05/08/17 06:14, valmiki wrote: > >> [...] > >>> Hi Jean, Thanks a lot, now i un

RE: Support SVM without PASID

2017-08-10 Thread Tian, Kevin
> From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] > Sent: Friday, August 4, 2017 5:43 PM > > Hi Kevin, > > On 04/08/17 02:49, Tian, Kevin wrote: > >> From: Jean-Philippe Brucker > >> Sent: Tuesday, August 1, 2017 4:26 PM > >> > >> It depends what type you use when registering t

Re: Support SVM without PASID

2017-08-09 Thread Jean-Philippe Brucker
On 08/08/17 01:51, Bob Liu wrote: > On 2017/8/7 20:52, Jean-Philippe Brucker wrote: >> Hi Bob, >> >> On 07/08/17 13:18, Bob Liu wrote: >>> On 2017/8/7 18:31, Jean-Philippe Brucker wrote: On 05/08/17 06:14, valmiki wrote: [...] > Hi Jean, Thanks a lot, now i understood the flow. From v

Re: Support SVM without PASID

2017-08-07 Thread Bob Liu
On 2017/8/7 20:52, Jean-Philippe Brucker wrote: > Hi Bob, > > On 07/08/17 13:18, Bob Liu wrote: >> On 2017/8/7 18:31, Jean-Philippe Brucker wrote: >>> On 05/08/17 06:14, valmiki wrote: >>> [...] Hi Jean, Thanks a lot, now i understood the flow. From vfio kernel documentation we fill vadd

Re: Support SVM without PASID

2017-08-07 Thread Jean-Philippe Brucker
Hi Bob, On 07/08/17 13:18, Bob Liu wrote: > On 2017/8/7 18:31, Jean-Philippe Brucker wrote: >> On 05/08/17 06:14, valmiki wrote: >> [...] >>> Hi Jean, Thanks a lot, now i understood the flow. From vfio kernel >>> documentation we fill vaddr and iova in struct vfio_iommu_type1_dma_map >>> and pass

Re: Support SVM without PASID

2017-08-07 Thread Bob Liu
On 2017/8/7 18:31, Jean-Philippe Brucker wrote: > On 05/08/17 06:14, valmiki wrote: > [...] >> Hi Jean, Thanks a lot, now i understood the flow. From vfio kernel >> documentation we fill vaddr and iova in struct vfio_iommu_type1_dma_map >> and pass them to VFIO. But if we use dynamic allocation in

Re: Support SVM without PASID

2017-08-07 Thread Jean-Philippe Brucker
On 05/08/17 06:14, valmiki wrote: [...] > Hi Jean, Thanks a lot, now i understood the flow. From vfio kernel > documentation we fill vaddr and iova in struct vfio_iommu_type1_dma_map > and pass them to VFIO. But if we use dynamic allocation in application > (say malloc), do we need to use dma API t

Re: Support SVM without PASID

2017-08-04 Thread valmiki
On 8/2/2017 12:10 AM, Jean-Philippe Brucker wrote: On 01/08/17 18:38, valmiki wrote: [...] So i digged through your patches and i understood that using BIND ioctls satge-1 translations are setup in SMMU for an application. If we use VFIO_IOMMU_MAP/UNMAP_DMA ioctls they are setting up stage-2 tra

Re: Support SVM without PASID

2017-08-04 Thread Jean-Philippe Brucker
Hi Kevin, On 04/08/17 02:49, Tian, Kevin wrote: >> From: Jean-Philippe Brucker >> Sent: Tuesday, August 1, 2017 4:26 PM >> >> It depends what type you use when registering the IOMMU with >> VFIO_SET_IOMMU: >> >> * If the type is VFIO_TYPE1v2_IOMMU, then >> VFIO_IOMMU_MAP/UNMAP_DMA >> affects the

RE: Support SVM without PASID

2017-08-03 Thread Tian, Kevin
> From: Jean-Philippe Brucker > Sent: Tuesday, August 1, 2017 4:26 PM > > It depends what type you use when registering the IOMMU with > VFIO_SET_IOMMU: > > * If the type is VFIO_TYPE1v2_IOMMU, then > VFIO_IOMMU_MAP/UNMAP_DMA > affects the stage-1 non-PASID context (already the case in mainline

Re: Support SVM without PASID

2017-08-01 Thread Jean-Philippe Brucker
On 01/08/17 18:38, valmiki wrote: [...] >>> So i digged through your patches and i understood that using BIND ioctls >>> satge-1 translations are setup in SMMU for an application. >>> If we use VFIO_IOMMU_MAP/UNMAP_DMA ioctls they are setting up stage-2 >>> translations in SMMU. >>> So without PASI

Re: Support SVM without PASID

2017-08-01 Thread valmiki
On 8/1/2017 1:56 PM, Jean-Philippe Brucker wrote: Hi Valmiki, Sorry for the delay, I was away last week. On 22/07/17 03:05, valmiki wrote: On 7/12/2017 10:18 PM, Jean-Philippe Brucker wrote: On 12/07/17 17:27, valmiki wrote: On 7/11/2017 4:26 PM, Jean-Philippe Brucker wrote: Hi Valmiki, On

Re: Support SVM without PASID

2017-08-01 Thread Jean-Philippe Brucker
Hi Valmiki, Sorry for the delay, I was away last week. On 22/07/17 03:05, valmiki wrote: > On 7/12/2017 10:18 PM, Jean-Philippe Brucker wrote: >> On 12/07/17 17:27, valmiki wrote: >>> On 7/11/2017 4:26 PM, Jean-Philippe Brucker wrote: Hi Valmiki, On 09/07/17 04:15, valmiki wrote: >

Re: Support SVM without PASID

2017-07-21 Thread valmiki
On 7/12/2017 10:18 PM, Jean-Philippe Brucker wrote: On 12/07/17 17:27, valmiki wrote: On 7/11/2017 4:26 PM, Jean-Philippe Brucker wrote: Hi Valmiki, On 09/07/17 04:15, valmiki wrote: Hi, In SMMUv3 architecture document i see "PASIDs are optional, configurable, and of a size determined by the

Re: Support SVM without PASID

2017-07-12 Thread Jean-Philippe Brucker
On 12/07/17 17:27, valmiki wrote: > On 7/11/2017 4:26 PM, Jean-Philippe Brucker wrote: >> Hi Valmiki, >> >> On 09/07/17 04:15, valmiki wrote: > Hi, > > In SMMUv3 architecture document i see "PASIDs are optional, > configurable, and of a size determined by the minimum > of the en

Re: Support SVM without PASID

2017-07-12 Thread valmiki
On 7/11/2017 4:26 PM, Jean-Philippe Brucker wrote: Hi Valmiki, On 09/07/17 04:15, valmiki wrote: Hi, In SMMUv3 architecture document i see "PASIDs are optional, configurable, and of a size determined by the minimum of the endpoint". So if PASID's are optional and not supported by PCIe end poi

Re: Support SVM without PASID

2017-07-12 Thread valmiki
On 7/11/2017 1:01 AM, Jerome Glisse wrote: On Sun, Jul 09, 2017 at 08:45:57AM +0530, valmiki wrote: Hi, In SMMUv3 architecture document i see "PASIDs are optional, configurable, and of a size determined by the minimum of the endpoint". So if PASID's are optional and not supported by PCIe end p

Re: Support SVM without PASID

2017-07-11 Thread Jean-Philippe Brucker
Hi Valmiki, On 09/07/17 04:15, valmiki wrote: >>> Hi, >>> >>> In SMMUv3 architecture document i see "PASIDs are optional, >>> configurable, and of a size determined by the minimum >>> of the endpoint". >>> >>> So if PASID's are optional and not supported by PCIe end point, how SVM >>> can be achie

Re: Support SVM without PASID

2017-07-10 Thread Jerome Glisse
On Sun, Jul 09, 2017 at 08:45:57AM +0530, valmiki wrote: > > > Hi, > > > > > > In SMMUv3 architecture document i see "PASIDs are optional, > > > configurable, and of a size determined by the minimum > > > of the endpoint". > > > > > > So if PASID's are optional and not supported by PCIe end point

Re: Support SVM without PASID

2017-07-09 Thread Bob Liu
On 2017/7/9 11:15, valmiki wrote: >>> Hi, >>> >>> In SMMUv3 architecture document i see "PASIDs are optional, >>> configurable, and of a size determined by the minimum >>> of the endpoint". >>> >>> So if PASID's are optional and not supported by PCIe end point, how SVM >>> can be achieved ? >> >> I

RE: Support SVM without PASID

2017-07-09 Thread Liu, Yi L
x-...@vger.kernel.org; > iommu@lists.linux-foundation.org; > Pan, Jacob jun > Subject: Re: Support SVM without PASID > > >> Hi, > >> > >> In SMMUv3 architecture document i see "PASIDs are optional, > >> configurable, and of a size determined by t

Re: Support SVM without PASID

2017-07-08 Thread valmiki
Hi, In SMMUv3 architecture document i see "PASIDs are optional, configurable, and of a size determined by the minimum of the endpoint". So if PASID's are optional and not supported by PCIe end point, how SVM can be achieved ? It cannot be inferred from that statement that PASID support is not

Re: Support SVM without PASID

2017-07-08 Thread Alex Williamson
On Sat, 8 Jul 2017 22:33:01 +0530 valmiki wrote: > Hi, > > In SMMUv3 architecture document i see "PASIDs are optional, > configurable, and of a size determined by the minimum > of the endpoint". > > So if PASID's are optional and not supported by PCIe end point, how SVM > can be achieved ? I