Re: [PATCH v2] iommu/intel: Exclude devices using RMRRs from IOMMU API domains

2014-06-16 Thread Alex Williamson
On Fri, 2014-06-13 at 10:30 -0600, Alex Williamson wrote: > The user of the IOMMU API domain expects to have full control of > the IOVA space for the domain. RMRRs are fundamentally incompatible > with that idea. We can neither map the RMRR into the IOMMU API > domain, nor can we guarantee that t

RE: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-16 Thread Stuart Yoder
> -Original Message- > From: Will Deacon [mailto:will.dea...@arm.com] > Sent: Monday, June 16, 2014 12:04 PM > To: Yoder Stuart-B08248 > Cc: Sethi Varun-B16395; Thierry Reding; Mark Rutland; > devicet...@vger.kernel.org; linux-samsung-...@vger.kernel.org; Pawel > Moll; Arnd Bergmann; Ian

[PATCH 1/1] drivers/iommu/omap-iovmm.c: use PAGE_ALIGNED instead of IS_ALIGNED(PAGE_SIZE

2014-06-16 Thread Fabian Frederick
use mm.h definition Cc: Joerg Roedel Cc: iommu@lists.linux-foundation.org Signed-off-by: Fabian Frederick --- drivers/iommu/omap-iovmm.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/iommu/omap-iovmm.c b/drivers/iommu/omap-iovmm.c index d147259..f583ba0

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-16 Thread Arnd Bergmann
On Monday 16 June 2014 18:04:16 Will Deacon wrote: > > On Mon, Jun 16, 2014 at 05:56:32PM +0100, Stuart Yoder wrote: > > > Do you have use-cases where you really need to change these mappings > > > dynamically? > > > > Yes. In the case of a PCI bus-- you may not know in advance how many > > PCI

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-16 Thread Will Deacon
Hi Stuart, On Mon, Jun 16, 2014 at 05:56:32PM +0100, Stuart Yoder wrote: > > Do you have use-cases where you really need to change these mappings > > dynamically? > > Yes. In the case of a PCI bus-- you may not know in advance how many > PCI devices there are until you probe the bus. We have a

RE: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-16 Thread Stuart Yoder
> -Original Message- > From: Will Deacon [mailto:will.dea...@arm.com] > Sent: Monday, June 16, 2014 10:28 AM > To: Sethi Varun-B16395 > Cc: Thierry Reding; Mark Rutland; devicet...@vger.kernel.org; linux- > samsung-...@vger.kernel.org; Pawel Moll; Arnd Bergmann; Ian Campbell; > Grant Grun

Re: [RFC PATCH v6 04/20] iommu/arm-smmu: add capability IOMMU_CAP_INTR_REMAP

2014-06-16 Thread Joerg Roedel
On Mon, Jun 16, 2014 at 04:25:26PM +0100, Will Deacon wrote: > Ok, thanks. In which case, I think this is really a combined property of > the SMMU and the interrupt controller, so we might need some extra code > so that the SMMU can check that the interrupt controller for the device > is also capab

Re: [PATCH v4 00/16] PCI/iommu: Fix DMA alias problems

2014-06-16 Thread Alex Williamson
On Mon, 2014-06-16 at 16:47 +0200, Joerg Roedel wrote: > Hi Alex, > > On Thu, May 22, 2014 at 05:07:23PM -0600, Alex Williamson wrote: > > Alex Williamson (16): > > PCI: Add DMA alias iterator > > PCI: define pci_dev_flags as bit shifts > > PCI: quirk pci_for_each_dma_alias() > >

Re: [RFC PATCH v6 04/20] iommu/arm-smmu: add capability IOMMU_CAP_INTR_REMAP

2014-06-16 Thread Alex Williamson
On Mon, 2014-06-16 at 17:21 +0200, Joerg Roedel wrote: > On Mon, Jun 16, 2014 at 04:13:29PM +0100, Will Deacon wrote: > > MSIs look just like memory accesses made by the device, so the SMMU > > will translate them to point at the GIC ITS (doorbell). The ITS then > > has tables to work out how to ro

Re: [RFC PATCH v6 03/20] iommu/arm-smmu: add IOMMU_CAP_NOEXEC to the ARM SMMU driver

2014-06-16 Thread Will Deacon
On Mon, Jun 16, 2014 at 04:25:28PM +0100, Alex Williamson wrote: > On Mon, 2014-06-16 at 16:04 +0100, Will Deacon wrote: > > On Thu, Jun 05, 2014 at 06:03:11PM +0100, Antonios Motakis wrote: > > > The ARM SMMU supports the IOMMU_NOEXEC protection flag. Add the > > > corresponding IOMMU capability.

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-16 Thread Will Deacon
Hi Varun, On Thu, Jun 05, 2014 at 08:10:19PM +0100, Varun Sethi wrote: > > The set of StreamIDs that can be generated by a master is fixed in the > > hardware. The SMMU can then be programmed to map these incoming IDs onto > > a context ID (or a set of context IDs), which are the IDs used internal

Re: [RFC PATCH v6 04/20] iommu/arm-smmu: add capability IOMMU_CAP_INTR_REMAP

2014-06-16 Thread Will Deacon
On Mon, Jun 16, 2014 at 04:21:58PM +0100, Joerg Roedel wrote: > On Mon, Jun 16, 2014 at 04:13:29PM +0100, Will Deacon wrote: > > MSIs look just like memory accesses made by the device, so the SMMU > > will translate them to point at the GIC ITS (doorbell). The ITS then > > has tables to work out ho

Re: [RFC PATCH v6 03/20] iommu/arm-smmu: add IOMMU_CAP_NOEXEC to the ARM SMMU driver

2014-06-16 Thread Alex Williamson
On Mon, 2014-06-16 at 16:04 +0100, Will Deacon wrote: > On Thu, Jun 05, 2014 at 06:03:11PM +0100, Antonios Motakis wrote: > > The ARM SMMU supports the IOMMU_NOEXEC protection flag. Add the > > corresponding IOMMU capability. > > > > Signed-off-by: Antonios Motakis > > --- > > drivers/iommu/arm-

Re: [PATCH 0/3] iommu: Expose IOMMU information in sysfs

2014-06-16 Thread Alex Williamson
On Mon, 2014-06-16 at 17:16 +0200, Joerg Roedel wrote: > On Thu, Jun 12, 2014 at 04:12:18PM -0600, Alex Williamson wrote: > > Alex Williamson (3): > > iommu: Add sysfs support for IOMMUs > > iommu/intel: Make use of IOMMU sysfs support > > iommu/amd: Add sysfs support > > I like

Re: [RFC PATCH v6 04/20] iommu/arm-smmu: add capability IOMMU_CAP_INTR_REMAP

2014-06-16 Thread Joerg Roedel
On Mon, Jun 16, 2014 at 04:13:29PM +0100, Will Deacon wrote: > MSIs look just like memory accesses made by the device, so the SMMU > will translate them to point at the GIC ITS (doorbell). The ITS then > has tables to work out how to route the MSI. > > So, if IOMMU_CAP_INTR_REMAP is simply suppose

Re: [PATCH 0/3] iommu: Expose IOMMU information in sysfs

2014-06-16 Thread Joerg Roedel
On Thu, Jun 12, 2014 at 04:12:18PM -0600, Alex Williamson wrote: > Alex Williamson (3): > iommu: Add sysfs support for IOMMUs > iommu/intel: Make use of IOMMU sysfs support > iommu/amd: Add sysfs support I like the general approach. But why do you only enable the x86 iommus? Some

Re: [RFC PATCH v6 04/20] iommu/arm-smmu: add capability IOMMU_CAP_INTR_REMAP

2014-06-16 Thread Will Deacon
On Mon, Jun 16, 2014 at 03:53:44PM +0100, Joerg Roedel wrote: > On Sun, Jun 08, 2014 at 12:31:29PM +0200, Christoffer Dall wrote: > > On Thu, Jun 05, 2014 at 07:03:12PM +0200, Antonios Motakis wrote: > > > With an ARM SMMU, interrupt remapping should always be safe from the > > > SMMU's point of vi

Re: [PATCH v2 02/10] iommu/ipmmu-vmsa: Cleanup failures of ARM mapping creation or attachment

2014-06-16 Thread Joerg Roedel
Hi Laurent, On Mon, May 26, 2014 at 12:08:37PM +0200, Laurent Pinchart wrote: > > Skipped this one because it didn't apply. The others are applied. > > Thank you. I'll rebase the patch on top of your tree as soon as you publish > the related branch and resubmit. What happened to this patch? And

Re: [RFC PATCH v6 01/20] iommu/arm-smmu: change IOMMU_EXEC to IOMMU_NOEXEC

2014-06-16 Thread Will Deacon
On Thu, Jun 05, 2014 at 06:03:09PM +0100, Antonios Motakis wrote: > Exposing the XN flag of the SMMU driver as IOMMU_NOEXEC instead of > IOMMU_EXEC makes it enforceable, since for IOMMUs that don't support > the XN flag pages will always be executable. > > Signed-off-by: Antonios Motakis > --- >

Re: [RFC PATCH v6 03/20] iommu/arm-smmu: add IOMMU_CAP_NOEXEC to the ARM SMMU driver

2014-06-16 Thread Will Deacon
On Thu, Jun 05, 2014 at 06:03:11PM +0100, Antonios Motakis wrote: > The ARM SMMU supports the IOMMU_NOEXEC protection flag. Add the > corresponding IOMMU capability. > > Signed-off-by: Antonios Motakis > --- > drivers/iommu/arm-smmu.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/d

Re: [RFC PATCH v6 04/20] iommu/arm-smmu: add capability IOMMU_CAP_INTR_REMAP

2014-06-16 Thread Joerg Roedel
On Sun, Jun 08, 2014 at 12:31:29PM +0200, Christoffer Dall wrote: > On Thu, Jun 05, 2014 at 07:03:12PM +0200, Antonios Motakis wrote: > > With an ARM SMMU, interrupt remapping should always be safe from the > > SMMU's point of view, as it is properly handled by the GIC. > > > > Signed-off-by: Anto

Re: [PATCH v4 00/16] PCI/iommu: Fix DMA alias problems

2014-06-16 Thread Joerg Roedel
Hi Alex, On Thu, May 22, 2014 at 05:07:23PM -0600, Alex Williamson wrote: > Alex Williamson (16): > PCI: Add DMA alias iterator > PCI: define pci_dev_flags as bit shifts > PCI: quirk pci_for_each_dma_alias() > PCI: quirk dma_alias_devfn for Ricoh devices > PCI: quirk

Re: [PATCH v2] devicetree: Add generic IOMMU device tree bindings

2014-06-16 Thread Will Deacon
On Wed, Jun 04, 2014 at 10:12:38PM +0100, Thierry Reding wrote: > On Fri, May 30, 2014 at 12:27:28PM +0100, Dave Martin wrote: > > On Fri, May 30, 2014 at 08:30:08AM +0100, Thierry Reding wrote: > [...] > > > Arnd, can you take another look at this binding and see if there's > > > anything else mis