diff options
author | Will Deacon <will.deacon@arm.com> | 2013-11-05 10:59:53 -0500 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2013-12-16 14:30:31 -0500 |
commit | ca13bb3d4e54f5c30089e55d5b8f4bb80c8f05e2 (patch) | |
tree | a8635a8d76bc772fc958b2a0abfad13db1fc56f2 | |
parent | 06f983dd571f564bdd3eb2ac4c33002034ea7810 (diff) |
iommu: add IOMMU_EXEC flag for safely allowing XN mappings
Whilst most IOMMU mappings should probably be non-executable, there
may be cases (HSA?) where executable mappings are required.
This patch introduces a new mapping flag, IOMMU_EXEC, to indicate that
the mapping should be mapped as executable.
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r-- | include/linux/iommu.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index a444c790fa72..709a697c4e02 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h | |||
@@ -24,9 +24,10 @@ | |||
24 | #include <linux/types.h> | 24 | #include <linux/types.h> |
25 | #include <trace/events/iommu.h> | 25 | #include <trace/events/iommu.h> |
26 | 26 | ||
27 | #define IOMMU_READ (1) | 27 | #define IOMMU_READ (1 << 0) |
28 | #define IOMMU_WRITE (2) | 28 | #define IOMMU_WRITE (1 << 1) |
29 | #define IOMMU_CACHE (4) /* DMA cache coherency */ | 29 | #define IOMMU_CACHE (1 << 2) /* DMA cache coherency */ |
30 | #define IOMMU_EXEC (1 << 3) | ||
30 | 31 | ||
31 | struct iommu_ops; | 32 | struct iommu_ops; |
32 | struct iommu_group; | 33 | struct iommu_group; |