diff options
author | Joerg Roedel <jroedel@suse.de> | 2017-01-30 16:05:18 +0100 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2017-01-30 16:05:18 +0100 |
commit | ce273db0ff1ae64fea785af25a43977b0b6a4555 (patch) | |
tree | 1a5d03cb1e5c0d63f298691a980b3e248654619f /include | |
parent | 93fa6cf60aad833e7572a61f98b2d0aa6f67de40 (diff) | |
parent | 14b4dbafa7e7e13323e402efd7723aafa391d69a (diff) |
Merge branch 'iommu/iommu-priv' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/core
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/dma-iommu.h | 3 | ||||
-rw-r--r-- | include/linux/dma-mapping.h | 7 | ||||
-rw-r--r-- | include/linux/iommu.h | 7 |
3 files changed, 16 insertions, 1 deletions
diff --git a/include/linux/dma-iommu.h b/include/linux/dma-iommu.h index 28df844a23b6..3a846f9ec0fd 100644 --- a/include/linux/dma-iommu.h +++ b/include/linux/dma-iommu.h @@ -35,7 +35,8 @@ int iommu_dma_init_domain(struct iommu_domain *domain, dma_addr_t base, u64 size, struct device *dev); /* General helpers for DMA-API <-> IOMMU-API interaction */ -int dma_direction_to_prot(enum dma_data_direction dir, bool coherent); +int dma_info_to_prot(enum dma_data_direction dir, bool coherent, + unsigned long attrs); /* * These implement the bulk of the relevant DMA mapping callbacks, but require diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 10c5a17b1f51..c24721a33b4c 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -63,6 +63,13 @@ #define DMA_ATTR_NO_WARN (1UL << 8) /* + * DMA_ATTR_PRIVILEGED: used to indicate that the buffer is fully + * accessible at an elevated privilege level (and ideally inaccessible or + * at least read-only at lesser-privileged levels). + */ +#define DMA_ATTR_PRIVILEGED (1UL << 9) + +/* * A dma_addr_t can hold any valid DMA or bus address for the platform. * It can be given to a device to use as a DMA source or target. A CPU cannot * reference a dma_addr_t directly because there may be translation between diff --git a/include/linux/iommu.h b/include/linux/iommu.h index bec3730dc009..add30c375332 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -31,6 +31,13 @@ #define IOMMU_CACHE (1 << 2) /* DMA cache coherency */ #define IOMMU_NOEXEC (1 << 3) #define IOMMU_MMIO (1 << 4) /* e.g. things like MSI doorbells */ +/* + * This is to make the IOMMU API setup privileged + * mapppings accessible by the master only at higher + * privileged execution level and inaccessible at + * less privileged levels. + */ +#define IOMMU_PRIV (1 << 5) struct iommu_ops; struct iommu_group; |