From: "Sricharan" <sricharan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: 'Robin Murphy' <robin.murphy-5wv7dgnIgG8@public.gmane.org>,
will.deacon-5wv7dgnIgG8@public.gmane.org
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: RE: [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-5wv7dgnIgG8@public.gmane.org>
Hi Robin,
>-----Original Message-----
>From: linux-arm-kernel [mailto:linux-arm-kernel-bounces-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org] On Behalf Of Robin Murphy
>Sent: Friday, January 27, 2017 5:53 PM
>To: will.deacon-5wv7dgnIgG8@public.gmane.org
>Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org; sricharan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org; linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.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-5wv7dgnIgG8@public.gmane.org>
>---
>
>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
WARNING: multiple messages have this Message-ID (diff)
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
next prev parent reply other threads:[~2017-01-27 16:58 UTC|newest]
Thread overview: 34+ 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 ` Sricharan R
2017-01-06 13:28 ` Sricharan R
[not found] ` <1483709296-32761-1-git-send-email-sricharan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-01-06 13:28 ` [PATCH V9 1/9] iommu: add IOMMU_PRIV attribute Sricharan R
2017-01-06 13:28 ` Sricharan R
2017-01-06 13:28 ` Sricharan R
[not found] ` <1483709296-32761-2-git-send-email-sricharan-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-01-27 12:22 ` [PATCH] iommu: Better document the IOMMU_PRIV flag Robin Murphy
2017-01-27 12:22 ` Robin Murphy
[not found] ` <edc67cc1775f3bafb6895346184e8042fd881ba4.1485519627.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
2017-01-27 16:58 ` Sricharan [this message]
2017-01-27 16:58 ` Sricharan
2017-01-06 13:28 ` [PATCH V9 2/9] iommu/io-pgtable-arm: add support for " Sricharan R
2017-01-06 13:28 ` Sricharan R
2017-01-06 13:28 ` Sricharan R
2017-01-06 13:28 ` [PATCH V9 3/9] iommu/io-pgtable-arm-v7s: Add " Sricharan R
2017-01-06 13:28 ` Sricharan R
2017-01-06 13:28 ` 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 ` Sricharan R
2017-01-06 13:28 ` 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 ` Sricharan R
2017-01-06 13:28 ` Sricharan R
2017-01-06 13:28 ` [PATCH V9 6/9] arm/dma-mapping: " Sricharan R
2017-01-06 13:28 ` Sricharan R
2017-01-06 13:28 ` 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 ` Sricharan R
2017-01-06 13:28 ` 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 ` Sricharan R
2017-01-06 13:28 ` Sricharan R
2017-01-06 13:28 ` [PATCH V9 9/9] Revert "iommu/arm-smmu: Set PRIVCFG in stage 1 STEs" Sricharan R
2017-01-06 13:28 ` Sricharan R
2017-01-06 13:28 ` 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-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=robin.murphy-5wv7dgnIgG8@public.gmane.org \
--cc=will.deacon-5wv7dgnIgG8@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.