public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: sricharan@codeaurora•org (Sricharan)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] iommu: Better document the IOMMU_PRIV flag
Date: Fri, 27 Jan 2017 22:28:46 +0530	[thread overview]
Message-ID: <009101d278be$a388b310$ea9a1930$@codeaurora.org> (raw)
In-Reply-To: <edc67cc1775f3bafb6895346184e8042fd881ba4.1485519627.git.robin.murphy@arm.com>

Hi Robin,

>-----Original Message-----
>From: linux-arm-kernel [mailto:linux-arm-kernel-bounces at lists.infradead.org] On Behalf Of Robin Murphy
>Sent: Friday, January 27, 2017 5:53 PM
>To: will.deacon at arm.com
>Cc: iommu at lists.linux-foundation.org; sricharan at codeaurora.org; linux-arm-kernel at lists.infradead.org
>Subject: [PATCH] iommu: Better document the IOMMU_PRIV flag
>
>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>
>---
>
>Having another look through the IOMMU_PRIV series, I wasn't convinced
>that the original comment was really all that helpful - I'm happy for
>this to be squashed in if you like.
>
>Robin.
>
> include/linux/iommu.h | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
>diff --git a/include/linux/iommu.h b/include/linux/iommu.h
>index 69e2417a2965..3c830e153069 100644
>--- a/include/linux/iommu.h
>+++ b/include/linux/iommu.h
>@@ -32,10 +32,13 @@
> #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.
>  */

Agree, gives much more insight.

Regards,
  Sricharan

  reply	other threads:[~2017-01-27 16:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-06 13:28 [PATCH V9 0/9] Add support for privileged mappings Sricharan R
2017-01-06 13:28 ` [PATCH V9 1/9] iommu: add IOMMU_PRIV attribute Sricharan R
2017-01-27 12:22   ` [PATCH] iommu: Better document the IOMMU_PRIV flag Robin Murphy
2017-01-27 16:58     ` Sricharan [this message]
2017-01-06 13:28 ` [PATCH V9 2/9] iommu/io-pgtable-arm: add support for " Sricharan R
2017-01-06 13:28 ` [PATCH V9 3/9] iommu/io-pgtable-arm-v7s: Add " Sricharan R
2017-01-06 13:28 ` [PATCH V9 4/9] common: DMA-mapping: add DMA_ATTR_PRIVILEGED attribute Sricharan R
2017-01-06 13:28 ` [PATCH V9 5/9] arm64/dma-mapping: Implement DMA_ATTR_PRIVILEGED Sricharan R
2017-01-06 13:28 ` [PATCH V9 6/9] arm/dma-mapping: " Sricharan R
2017-01-06 13:28 ` [PATCH V9 7/9] dmaengine: pl330: Make sure microcode is privileged Sricharan R
2017-01-06 13:28 ` [PATCH V9 8/9] iommu/arm-smmu: Set privileged attribute to 'default' instead of 'unprivileged' Sricharan R
2017-01-06 13:28 ` [PATCH V9 9/9] Revert "iommu/arm-smmu: Set PRIVCFG in stage 1 STEs" Sricharan R

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='009101d278be$a388b310$ea9a1930$@codeaurora.org' \
    --to=sricharan@codeaurora$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox