]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
iommu: Better document the IOMMU_PRIV flag
authorRobin Murphy <robin.murphy@arm.com>
Fri, 27 Jan 2017 12:22:54 +0000 (12:22 +0000)
committerWill Deacon <will.deacon@arm.com>
Thu, 6 Apr 2017 15:06:42 +0000 (16:06 +0100)
This is a fairly subtle thing - let's make sure it's described as
clearly as possible to avoid potential misunderstandings.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
include/linux/iommu.h

index 2e4de0deee531adbd7c1cd8ff1d25e0d0eb98d47..88ec8c6580d3f8c2f5e415393b3bbc47ea0be059 100644 (file)
 #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.
+ * Where the bus hardware includes a privilege level as part of its access type
+ * markings, and certain devices are capable of issuing transactions marked as
+ * either 'supervisor' or 'user', the IOMMU_PRIV flag requests that the other
+ * given permission flags only apply to accesses at the higher privilege level,
+ * and that unprivileged transactions should have as little access as possible.
+ * This would usually imply the same permissions as kernel mappings on the CPU,
+ * if the IOMMU page table format is equivalent.
  */
 #define IOMMU_PRIV     (1 << 5)