The PL330 can perform privileged instruction fetches. This can result
in SMMU permission faults on SMMUs that implement the ARMv8 VMSA, which
specifies that mappings that are writeable at one execution level shall
not be executable at any higher-privileged level. Fix this by using the
This patch adds the DMA_ATTR_PRIVILEGED_EXECUTABLE attribute to the
DMA-mapping subsystem.
Some architectures require that writable mappings also be non-executable at
lesser-privileged levels of execution. This attribute is used to indicate
to the DMA-mapping subsystem that it should do whatever
This reverts commit d346180e70b9 ("iommu/arm-smmu: Treat all device
transactions as unprivileged") since some platforms actually make use of
privileged transactions.
Signed-off-by: Mitchel Humpherys
---
drivers/iommu/arm-smmu.c | 5 +
1 file changed, 1 insertion(+),
The newly added DMA_ATTR_PRIVILEGED_EXECUTABLE is useful for creating
mappings that are executable by privileged DMA engines. Implement it in
dma-iommu.c so that the ARM64 DMA IOMMU mapper can make use of it.
Signed-off-by: Mitchel Humpherys
---
Add the IOMMU_PRIV attribute, which is used to indicate privileged
mappings.
Signed-off-by: Mitchel Humpherys
---
include/linux/iommu.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 664683aedcce..01c9f2667f2b
The following patch to the ARM SMMU driver:
commit d346180e70b91b3d5a1ae7e5603e65593d4622bc
Author: Robin Murphy
Date: Tue Jan 26 18:06:34 2016 +
iommu/arm-smmu: Treat all device transactions as unprivileged
started forcing all SMMU
On Thu, Jul 07 2016 at 02:58:21 PM, Jordan Crouse
wrote:
>> Whilst this series is a step in the right direction for fixing that, I
>> don't think you can claim that only low-level users need this, given that
>> we have in-tree code which would break without it. Perhaps
From: Jeremy Gebben
Allow the creation of privileged mode mappings, for stage 1 only.
Signed-off-by: Jeremy Gebben
---
drivers/iommu/io-pgtable-arm.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git
On Fri, Jul 08, 2016 at 03:55:21PM +0100, Will Deacon wrote:
> On Fri, Jul 01, 2016 at 05:50:10PM +0100, Robin Murphy wrote:
> > From: Lorenzo Pieralisi
> >
> > Current bus notifier in ARM64 (__iommu_attach_notifier)
> > attempts to attach dma_ops to a device on
Hi Joerg,
Please pull these arm-smmu updates for 4.8. There's really not a lot
here, but the highlight is the fix to iova_to_phys which really improves
our VFIO teardown performance, where we previously did everything on a
page-by-page basis.
Whilst Robin had an SMMUv3 series in good shape for
Hi Catalin,
On Fri, Jul 01, 2016 at 05:50:10PM +0100, Robin Murphy wrote:
> From: Lorenzo Pieralisi
>
> Current bus notifier in ARM64 (__iommu_attach_notifier)
> attempts to attach dma_ops to a device on BUS_NOTIFY_ADD_DEVICE
> action notification.
>
> This will
Hi Linus,
The following changes since commit a99cde438de0c4c0cecc1d1af1a55a75b10bfdef:
Linux 4.7-rc6 (2016-07-03 23:01:00 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
tags/iommu-fixes-v4.7-rc6
for you to fetch changes up to
From: Joerg Roedel
Optimize these functions so that they need only one call
into the address alloctor. This also saves a couple of
io-tlb flushes in the unmap_sg path.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu.c | 77
From: Joerg Roedel
Before a dma_ops_domain can be freed, we need to make sure
it is not longer referenced by the flush queue. So empty the
queue before a dma_ops_domain can be freed.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu.c | 17
From: Joerg Roedel
This domain type is not yet handled in the
iommu_ops->domain_free() call-back. Fix that.
Fixes: 0bb6e243d7fb ('iommu/amd: Support IOMMU_DOMAIN_DMA type allocation')
Cc: sta...@vger.kernel.org # v4.2+
Signed-off-by: Joerg Roedel
---
From: Joerg Roedel
There are other remains in the code from the old allocatore.
Remove them all.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu.c | 305 +-
1 file changed, 5 insertions(+), 300 deletions(-)
From: Joerg Roedel
If domain == NULL is passed to the function, it will queue a
completion-wait command on all IOMMUs in the system.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
From: Joerg Roedel
With the flush queue the IOMMU TLBs will not be flushed at
every dma-ops unmap operation. The unmapped ranges will be
queued and flushed at once, when the queue is full. This
makes unmapping operations a lot faster (on average) and
restores the performance of
From: Joerg Roedel
Using the cached value is much more efficient than calling
into the IOMMU core code.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu.c | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git
From: Joerg Roedel
The flush queue is the equivalent to defered-flushing in the
Intel VT-d driver. This patch sets up the data structures
needed for this.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu.c | 40 +++-
From: Joerg Roedel
Make this function ready to be used in the DMA-API path.
Reorder parameters a bit while at it.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
From: Joerg Roedel
In case the queue doesn't fill up, we flush the TLB at least
10ms after the unmap happened to make sure that the TLB is
cleaned up.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu.c | 28
1 file changed,
From: Joerg Roedel
This function converts dma_data_direction to
iommu-protection flags. This will be needed on multiple
places in the code, so this will save some code.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu.c | 20 +---
1
From: Joerg Roedel
This parameter is not required anymore because the
iova-allocations are always aligned to its size.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git
Hi,
here is a patch-set to make the AMD IOMMU driver use the
generic IOVA allocator, which is already used in the Intel
VT-d driver and a few other places.
The main reason for the conversion is to make the driver
benefit from the recent scalability improvements to the IOVA
code. Some of these
From: Joerg Roedel
Put the MSI-range, the HT-range and the MMIO ranges of PCI
devices into that range, so that these addresses are not
allocated for DMA.
Copy this address list into every created dma_ops_domain.
Signed-off-by: Joerg Roedel
---
From: Joerg Roedel
Remove the old address allocation code and make use of the
generic IOVA allocator that is also used by other dma-ops
implementations.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu.c | 183
From: Joerg Roedel
This new call-back will be used by the iommu driver to do
reserve the given dm_region in its iova space before the
mapping is created.
The call-back is temporary until the dma-ops implementation
is part of the common iommu code.
Signed-off-by: Joerg Roedel
From: Joerg Roedel
Use it later for allocating the IO virtual addresses.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu.c | 20 +++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/amd_iommu.c
From: Joerg Roedel
It is used to reserve the dm-regions in the iova-tree.
Signed-off-by: Joerg Roedel
---
drivers/iommu/amd_iommu.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
From: Joerg Roedel
Include the generic IOVA code to make use of it in the AMD
IOMMU driver too.
Signed-off-by: Joerg Roedel
---
drivers/iommu/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index
31 matches
Mail list logo