linux/drivers/iommu
Robin Murphy d346180e70 iommu/arm-smmu: Treat all device transactions as unprivileged
The IOMMU API has no concept of privilege so assumes all devices and
mappings are equal, and indeed most non-CPU master devices on an AMBA
interconnect make little use of the attribute bits on the bus thus by
default perform unprivileged data accesses.

Some devices, however, believe themselves more equal than others, such
as programmable DMA controllers whose 'master' thread issues bus
transactions marked as privileged instruction fetches, while the data
accesses of its channel threads (under the control of Linux, at least)
are marked as unprivileged. This poses a problem for implementing the
DMA API on an IOMMU conforming to ARM VMSAv8, under which a page that is
unprivileged-writeable is also implicitly privileged-execute-never.
Given that, there is no one set of attributes with which iommu_map() can
implement, say, dma_alloc_coherent() that will allow every possible type
of access without something running into unexecepted permission faults.

Fortunately the SMMU architecture provides a means to mitigate such
issues by overriding the incoming attributes of a transaction; make use
of that to strip the privileged/unprivileged status off incoming
transactions, leaving just the instruction/data dichotomy which the
IOMMU API does at least understand; Four states good, two states better.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-02-18 15:02:42 +00:00
..
amd_iommu.c iommu/amd: Correct the wrong setting of alias DTE in do_attach 2016-01-29 12:30:47 +01:00
amd_iommu_init.c IOMMU Updates for Linux v4.4 2015-11-05 16:12:10 -08:00
amd_iommu_proto.h IOMMU Updates for Linux v4.2 2015-06-23 18:27:19 -07:00
amd_iommu_types.h iommu/amd: Move 'struct dma_ops_domain' definition to amd_iommu.c 2015-12-28 17:18:50 +01:00
amd_iommu_v2.c iommu/amd: Constify mmu_notifier_ops structures 2015-12-14 15:44:29 +01:00
arm-smmu-v3.c iommu/arm-smmu: Use STE.S1STALLD only when supported 2015-12-17 12:05:36 +00:00
arm-smmu.c iommu/arm-smmu: Treat all device transactions as unprivileged 2016-02-18 15:02:42 +00:00
dma-iommu.c iommu/dma: Use correct offset in map_sg 2016-01-07 13:36:41 +01:00
dmar.c iommu/vt-d: Fix up error handling in alloc_iommu 2016-01-07 13:44:41 +01:00
exynos-iommu.c iommu/exynos: Add callback for initializing devices from device tree 2015-05-29 10:50:08 +02:00
fsl_pamu.c powerpc/fsl: Move fsl_guts.h out of arch/powerpc 2015-10-21 18:05:50 -05:00
fsl_pamu.h iommu/fsl: Various cleanups 2015-02-03 18:47:18 +01:00
fsl_pamu_domain.c iommu/fsl: Convert to device_group call-back 2015-10-22 00:00:49 +02:00
fsl_pamu_domain.h iommu/fsl: Make use of domain_alloc and domain_free 2015-03-31 15:32:14 +02:00
intel-iommu.c iommu/vt-d: Don't skip PCI devices when disabling IOTLB 2016-01-29 12:18:13 +01:00
intel-svm.c iommu/vt-d: Do access checks before calling handle_mm_fault() 2015-12-14 15:37:55 +01:00
intel_irq_remapping.c x86/cpufeature: Remove unused and seldomly used cpu_has_xx macros 2015-12-19 11:49:55 +01:00
io-pgtable-arm.c iommu/io-pgtable-arm: Fix io-pgtable-arm build failure 2016-01-29 12:14:08 +01:00
io-pgtable.c iommu/io-pgtable-arm: Move init-fn declarations to io-pgtable.h 2015-08-13 19:51:04 +02:00
io-pgtable.h iommu/io-pgtable: Make io_pgtable_ops_to_pgtable() macro common 2015-12-17 12:05:35 +00:00
iommu-sysfs.c iommu: Fix compile error in iommu-sysfs.c 2014-07-07 12:01:21 +02:00
iommu-traces.c iommu: Add iommu_error class event to iommu trace 2013-09-25 11:07:04 +02:00
iommu.c Revert "scatterlist: use sg_phys()" 2015-12-15 12:54:06 -08:00
iova.c iommu: Make the iova library a module 2015-07-28 15:48:01 +01:00
ipmmu-vmsa.c Merge branches 's390', 'arm/renesas', 'arm/msm', 'arm/shmobile', 'arm/smmu', 'x86/amd' and 'x86/vt-d' into next 2016-01-19 15:30:43 +01:00
irq_remapping.c iommu/vt-d: Add a command line parameter for VT-d posted-interrupts 2015-10-01 15:06:54 +02:00
irq_remapping.h iommu, x86: Setup Posted-Interrupts capability for Intel iommu 2015-06-12 11:33:52 +02:00
Kconfig iommu/shmobile: Remove unused Renesas IPMMU/IPMMUI driver 2015-12-14 15:55:57 +01:00
Makefile iommu/shmobile: Remove unused Renesas IPMMU/IPMMUI driver 2015-12-14 15:55:57 +01:00
msm_iommu.c iommu/msm: Use BUG_ON instead of if () BUG() 2015-08-13 19:50:51 +02:00
msm_iommu.h iommu/msm: Move mach includes to iommu directory 2013-08-06 11:18:03 -07:00
msm_iommu_dev.c iommu/msm: Use platform_register/unregister_drivers() 2015-12-14 15:51:21 +01:00
msm_iommu_hw-8xxx.h iommu/msm: Move mach includes to iommu directory 2013-08-06 11:18:03 -07:00
of_iommu.c of: iommu: Silence misleading warning 2015-08-03 16:07:49 +02:00
omap-iommu-debug.c fs/seq_file: convert int seq_vprint/seq_printf/etc... returns to void 2015-09-11 15:21:34 -07:00
omap-iommu.c iommu/omap: Add support for configuring dsp iommus on DRA7xx 2015-10-14 14:35:47 +02:00
omap-iommu.h iommu/omap: Add support for configuring dsp iommus on DRA7xx 2015-10-14 14:35:47 +02:00
omap-iopgtable.h iommu/omap: Use BIT(x) macros in omap-iopgtable.h 2015-08-03 16:04:42 +02:00
rockchip-iommu.c Merge branches 'arm/rockchip', 'arm/exynos', 'arm/smmu', 'x86/vt-d', 'x86/amd', 'default-domains' and 'core' into next 2015-06-19 17:17:47 +02:00
s390-iommu.c iommu/s390: Fix sparse warnings 2015-11-26 14:41:01 +01:00
tegra-gart.c Merge branches 'iommu/fixes', 'x86/vt-d', 'x86/amd', 'arm/smmu', 'arm/tegra' and 'core' into next 2015-04-02 13:33:19 +02:00
tegra-smmu.c iommu/tegra-smmu: Parameterize number of TLB lines 2015-08-13 17:05:28 +02:00