Re: [PATCH 2/2] iommu/arm-smmu: add support for access-protected mappings

2014-09-19 Thread Will Deacon
On Wed, Sep 17, 2014 at 09:16:09PM +0100, Mitchel Humpherys wrote: > ARM SMMUs support memory access control via some bits in the translation > table descriptor memory attributes. Currently we assume all translations > are "unprivileged". Add support for privileged mappings, controlled by > the IOM

[PATCH] iommu/arm-smmu: fix bug in pmd construction

2014-09-19 Thread Mitchel Humpherys
We are using the same pfn for every pte we create while constructing the pmd. Fix this by actually updating the pfn on each iteration of the pmd construction loop. It's not clear if we can actually hit this bug right now since iommu_map splits up the calls to .map based on the page size, so we onl

Re: [PATCH 04/13 v2] iommu/arm-smmu: Convert to iommu_capable() API function function

2014-09-19 Thread Will Deacon
On Wed, Sep 17, 2014 at 09:53:12AM +0100, Joerg Roedel wrote: > Hi Will, Hello Joerg, > On Mon, Sep 08, 2014 at 05:51:36PM +0100, Will Deacon wrote: > > On Fri, Sep 05, 2014 at 11:52:56AM +0100, Joerg Roedel wrote: > > > From: Joerg Roedel > > > > > > Cc: Will Deacon > > > Signed-off-by: Joerg

[PATCH 2/2] iommu/amd: Split init_iommu_group() from iommu_init_device()

2014-09-19 Thread Alex Williamson
For a PCI device, aliases from the IVRS table won't be populated into dma_alias_devfn until after iommu_init_device() is called on each device. We therefore want to split init_iommu_group() to be called from a separate loop immediately following. Signed-off-by: Alex Williamson Cc: sta...@vger.ke

[PATCH 1/2] iommu: Rework iommu_group_get_for_pci_dev()

2014-09-19 Thread Alex Williamson
It turns out that our assumption that aliases are always to the same slot isn't true. One particular platform reports an IVRS alias of the SATA controller (00:11.0) for the legacy IDE controller (00:14.1). When we hit this, we attempt to use a single IOMMU group for everything on the same bus, whi

[PATCH 0/2] iommu: Fix regression in IOMMU grouping

2014-09-19 Thread Alex Williamson
We've had surprisingly little fallout from the DMA alias changes, but unfortunately one regression has popped up. We have an AMD system that seems to use the SATA controller to master transactions for the legacy IDE controller and they are different slots on the root complex. The IVRS reports 00:1