Re: [Qemu-devel] [RFC PATCH 1/8] iommu: Introduce bind_pasid_table API function

2017-05-23 Thread Liu, Yi L
On Fri, Apr 28, 2017 at 01:51:42PM +0100, Jean-Philippe Brucker wrote: > On 28/04/17 10:04, Liu, Yi L wrote: Hi Jean, Sorry for the delay response. Still have some follow-up comments on per-device or per-group. Pls refer to comments inline. > > On Wed, Apr 26, 2017 at 05:56:45PM +0100, Jean-Phili

Re: [RFC PATCH 04/30] iommu/arm-smmu-v3: Add support for PCI ATS

2017-05-23 Thread Leizhen (ThunderTown)
On 2017/2/28 3:54, Jean-Philippe Brucker wrote: > PCIe devices can implement their own TLB, named Address Translation Cache > (ATC). Steps involved in the use and maintenance of such caches are: > > * Device sends an Address Translation Request for a given IOVA to the > IOMMU. If the translati

Re: [PATCH V11 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-05-23 Thread Lorenzo Pieralisi
On Tue, May 23, 2017 at 02:26:10AM -0400, Nate Watterson wrote: > Hi Sricharan, > > On 4/10/2017 7:21 AM, Sricharan R wrote: > >This is an equivalent to the DT's handling of the iommu master's probe > >with deferred probing when the corrsponding iommu is not probed yet. > >The lack of a registered

Re: [PATCH V11 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-05-23 Thread Sricharan R
Hi, On 5/23/2017 11:56 AM, Nate Watterson wrote: > Hi Sricharan, > > On 4/10/2017 7:21 AM, Sricharan R wrote: >> This is an equivalent to the DT's handling of the iommu master's probe >> with deferred probing when the corrsponding iommu is not probed yet. >> The lack of a registered IOMMU can be

Re: [PATCH V11 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-05-23 Thread Sricharan R
Hi Lorenzo, On 5/23/2017 2:22 PM, Lorenzo Pieralisi wrote: > On Tue, May 23, 2017 at 02:26:10AM -0400, Nate Watterson wrote: >> Hi Sricharan, >> >> On 4/10/2017 7:21 AM, Sricharan R wrote: >>> This is an equivalent to the DT's handling of the iommu master's probe >>> with deferred probing when the

Re: [PATCH V11 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-05-23 Thread Lorenzo Pieralisi
On Tue, May 23, 2017 at 02:31:17PM +0530, Sricharan R wrote: > Hi Lorenzo, > > On 5/23/2017 2:22 PM, Lorenzo Pieralisi wrote: > > On Tue, May 23, 2017 at 02:26:10AM -0400, Nate Watterson wrote: > >> Hi Sricharan, > >> > >> On 4/10/2017 7:21 AM, Sricharan R wrote: > >>> This is an equivalent to the

Re: [RFC PATCH 04/30] iommu/arm-smmu-v3: Add support for PCI ATS

2017-05-23 Thread Jean-Philippe Brucker
On 23/05/17 09:41, Leizhen (ThunderTown) wrote: > On 2017/2/28 3:54, Jean-Philippe Brucker wrote: >> PCIe devices can implement their own TLB, named Address Translation Cache >> (ATC). Steps involved in the use and maintenance of such caches are: >> >> * Device sends an Address Translation Request

Re: [PATCH V11 08/11] drivers: acpi: Handle IOMMU lookup failure with deferred probing or error

2017-05-23 Thread Nate Watterson
Hi Lorenzo, On 5/23/2017 5:26 AM, Lorenzo Pieralisi wrote: On Tue, May 23, 2017 at 02:31:17PM +0530, Sricharan R wrote: Hi Lorenzo, On 5/23/2017 2:22 PM, Lorenzo Pieralisi wrote: On Tue, May 23, 2017 at 02:26:10AM -0400, Nate Watterson wrote: Hi Sricharan, On 4/10/2017 7:21 AM, Sricharan R

[PATCH v5 3/5] ACPI/IORT: Ignore all errors except EPROBE_DEFER

2017-05-23 Thread Sricharan R
While deferring the probe of IOMMU masters, xlate and add_device callbacks called from iort_iommu_configure can pass back error values like -ENODEV, which means the IOMMU cannot be connected with that master for real reasons. Before the IOMMU probe deferral, all such errors were ignored. Now all th

[PATCH v5 1/5] iommu: of: Fix check for returning EPROBE_DEFER

2017-05-23 Thread Sricharan R
Now with IOMMU probe deferral, we return -EPROBE_DEFER for masters that are connected to an IOMMU which is not probed yet, but going to get probed, so that we can attach the correct dma_ops. So while trying to defer the probe of the master, check if the of_iommu node that it is connected to is mark

[PATCH v5 2/5] iommu: of: Ignore all errors except EPROBE_DEFER

2017-05-23 Thread Sricharan R
While deferring the probe of IOMMU masters, xlate and add_device callbacks called from of_iommu_configure can pass back error values like -ENODEV, which means the IOMMU cannot be connected with that master for real reasons. Before the IOMMU probe deferral, all such errors were ignored. Now all thos

[PATCH v5 4/5] ARM: dma-mapping: Don't tear third-party mappings

2017-05-23 Thread Sricharan R
From: Laurent Pinchart arch_setup_dma_ops() is used in device probe code paths to create an IOMMU mapping and attach it to the device. The function assumes that the device is attached to a device-specific IOMMU instance (or at least a device-specific TLB in a shared IOMMU instance) and thus creat

[PATCH v5 5/5] ACPI/IORT: Move the check to get iommu_ops from translated fwspec

2017-05-23 Thread Sricharan R
From: Lorenzo Pieralisi With IOMMU probe deferral, iort_iommu_configure can be called multiple times for the same device. Hence we have a check to see if the device's fwspec is already translated and return the iommu_ops from that directly. But the check is wrongly placed in iort_iommu_xlate, whi

Re: [PATCH V3 6/8] arm: dma-mapping: Reset the device's dma_ops

2017-05-23 Thread Russell King - ARM Linux
On Thu, Oct 27, 2016 at 09:07:23AM +0530, Sricharan wrote: > Hi Robin, > > >-Original Message- > >From: Robin Murphy [mailto:robin.mur...@arm.com] > >Sent: Wednesday, October 26, 2016 8:37 PM > >To: Sricharan R ; will.dea...@arm.com; > >j...@8bytes.org; iommu@lists.linux-foundation.org; l

Re: [PATCH V3 6/8] arm: dma-mapping: Reset the device's dma_ops

2017-05-23 Thread Robin Murphy
On 23/05/17 17:25, Russell King - ARM Linux wrote: > On Thu, Oct 27, 2016 at 09:07:23AM +0530, Sricharan wrote: >> Hi Robin, >> >>> -Original Message- >>> From: Robin Murphy [mailto:robin.mur...@arm.com] >>> Sent: Wednesday, October 26, 2016 8:37 PM >>> To: Sricharan R ; will.dea...@arm.com

Re: [PATCH V3 6/8] arm: dma-mapping: Reset the device's dma_ops

2017-05-23 Thread Russell King - ARM Linux
On Tue, May 23, 2017 at 05:55:57PM +0100, Robin Murphy wrote: > On 23/05/17 17:25, Russell King - ARM Linux wrote: > > So, I've come to apply this patch (since it's finally landed in the patch > > system), and I'm not convinced that the commit message is really up to > > scratch. > > > > The curre

RE: [PATCH] iommu/amd: flush IOTLB for specific domains only (v3)

2017-05-23 Thread Deucher, Alexander
> -Original Message- > From: Arindam Nath [mailto:anath@gmail.com] On Behalf Of > arindam.n...@amd.com > Sent: Monday, May 22, 2017 3:48 AM > To: iommu@lists.linux-foundation.org > Cc: amd-...@lists.freedesktop.org; Joerg Roedel; Deucher, Alexander; > Bridgman, John; dr...@endlessm.com;

Re: [PATCH 1/2] PCI: Save properties required to handle FLR for replay purposes.

2017-05-23 Thread Bjorn Helgaas
On Wed, May 10, 2017 at 11:39:02AM -0700, Ashok Raj wrote: > From: CQ Tang > > Requires: https://patchwork.kernel.org/patch/9593891 I'm not sure what the status of the patch above is. I acked it, but it's part of a 30-patch IOMMU series, so I expect it to be merged via an IOMMU tree. In any ca

Re: [PATCH V3 6/8] arm: dma-mapping: Reset the device's dma_ops

2017-05-23 Thread Laurent Pinchart
Hi Russell, On Tuesday 23 May 2017 18:53:19 Russell King - ARM Linux wrote: > On Tue, May 23, 2017 at 05:55:57PM +0100, Robin Murphy wrote: > > On 23/05/17 17:25, Russell King - ARM Linux wrote: > >> So, I've come to apply this patch (since it's finally landed in the > >> patch system), and I'm no

Re: [PATCH V3 6/8] arm: dma-mapping: Reset the device's dma_ops

2017-05-23 Thread Russell King - ARM Linux
On Wed, May 24, 2017 at 12:46:51AM +0300, Laurent Pinchart wrote: > Hi Russell, > > On Tuesday 23 May 2017 18:53:19 Russell King - ARM Linux wrote: > > On Tue, May 23, 2017 at 05:55:57PM +0100, Robin Murphy wrote: > > > On 23/05/17 17:25, Russell King - ARM Linux wrote: > > >> So, I've come to app