Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1691193 > unrolled thread
| Started by | Anup Patel <anup.patel@broadcom.com> |
|---|---|
| First post | 2017-07-19 11:40 +0200 |
| Last post | 2017-07-19 13:30 +0200 |
| Articles | 15 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 0/5] FlexRM support in VFIO platform Anup Patel <anup.patel@broadcom.com> - 2017-07-19 11:40 +0200
[PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS Anup Patel <anup.patel@broadcom.com> - 2017-07-19 11:40 +0200
Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS Robin Murphy <robin.murphy@arm.com> - 2017-07-19 13:00 +0200
Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS Anup Patel <anup.patel@broadcom.com> - 2017-07-19 13:20 +0200
Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS Robin Murphy <robin.murphy@arm.com> - 2017-07-19 13:30 +0200
Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS Will Deacon <will.deacon@arm.com> - 2017-07-19 13:30 +0200
Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS Anup Patel <anup.patel@broadcom.com> - 2017-07-19 13:30 +0200
Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS Anup Patel <anup.patel@broadcom.com> - 2017-07-19 13:40 +0200
Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS Will Deacon <will.deacon@arm.com> - 2017-07-19 13:40 +0200
[PATCH 2/5] iommu/arm-smmu: add IOMMU_CAP_BYPASS to the ARM SMMU driver Anup Patel <anup.patel@broadcom.com> - 2017-07-19 11:40 +0200
Re: [PATCH 2/5] iommu/arm-smmu: add IOMMU_CAP_BYPASS to the ARM SMMU driver Robin Murphy <robin.murphy@arm.com> - 2017-07-19 13:00 +0200
Re: [PATCH 0/5] FlexRM support in VFIO platform Robin Murphy <robin.murphy@arm.com> - 2017-07-19 13:00 +0200
Re: [PATCH 0/5] FlexRM support in VFIO platform Anup Patel <anup.patel@broadcom.com> - 2017-07-19 13:20 +0200
Re: [PATCH 0/5] FlexRM support in VFIO platform Robin Murphy <robin.murphy@arm.com> - 2017-07-19 13:30 +0200
Re: [PATCH 0/5] FlexRM support in VFIO platform Anup Patel <anup.patel@broadcom.com> - 2017-07-19 13:30 +0200
| From | Anup Patel <anup.patel@broadcom.com> |
|---|---|
| Date | 2017-07-19 11:40 +0200 |
| Subject | [PATCH 0/5] FlexRM support in VFIO platform |
| Message-ID | <u4TCy-6D1-9@gated-at.bofh.it> |
This patchset primarily adds Broadcom FlexRM reset module for VFIO platform driver. We also have minor improvments in IOMMU and VFIO driver to allow VFIO no-IOMMU mode access to FlexRM. The patches are based on Linux-4.13-rc1 and can also be found at flexrm-vfio-v1 branch of https://github.com/Broadcom/arm64-linux.git Anup Patel (5): iommu: Add capability IOMMU_CAP_BYPASS iommu/arm-smmu: add IOMMU_CAP_BYPASS to the ARM SMMU driver iommu/arm-smmu-v3: add IOMMU_CAP_BYPASS to the ARM SMMUv3 driver vfio: Allow No-IOMMU mode for IOMMUs with bypass capability vfio: platform: reset: Add Broadcom FlexRM reset module drivers/iommu/arm-smmu-v3.c | 2 + drivers/iommu/arm-smmu.c | 2 + drivers/vfio/platform/reset/Kconfig | 9 +++ drivers/vfio/platform/reset/Makefile | 1 + .../vfio/platform/reset/vfio_platform_bcmflexrm.c | 91 ++++++++++++++++++++++ drivers/vfio/vfio.c | 13 +++- include/linux/iommu.h | 4 + 7 files changed, 119 insertions(+), 3 deletions(-) create mode 100644 drivers/vfio/platform/reset/vfio_platform_bcmflexrm.c -- 2.7.4
[toc] | [next] | [standalone]
| From | Anup Patel <anup.patel@broadcom.com> |
|---|---|
| Date | 2017-07-19 11:40 +0200 |
| Subject | [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS |
| Message-ID | <u4TCz-6D1-39@gated-at.bofh.it> |
| In reply to | #1691193 |
Some of the IOMMUs (such as ARM SMMU) are capable of bypassing
transactions for which no IOMMU domain is configured.
This patch adds IOMMU_CAP_BYPASS which can be used by IOMMU
drivers to advertise transation bypass capability of an IOMMU.
Signed-off-by: Anup Patel <anup.patel@broadcom.com>
---
include/linux/iommu.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 2cb54ad..6bbb4cc 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -101,6 +101,10 @@ enum iommu_cap {
transactions */
IOMMU_CAP_INTR_REMAP, /* IOMMU supports interrupt isolation */
IOMMU_CAP_NOEXEC, /* IOMMU_NOEXEC flag */
+ IOMMU_CAP_BYPASS, /*
+ * IOMMU can bypass transactions for
+ * which domain is not configured
+ */
};
/*
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Robin Murphy <robin.murphy@arm.com> |
|---|---|
| Date | 2017-07-19 13:00 +0200 |
| Subject | Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS |
| Message-ID | <u4URX-7qy-7@gated-at.bofh.it> |
| In reply to | #1691197 |
On 19/07/17 10:33, Anup Patel wrote:
> Some of the IOMMUs (such as ARM SMMU) are capable of bypassing
> transactions for which no IOMMU domain is configured.
>
> This patch adds IOMMU_CAP_BYPASS which can be used by IOMMU
> drivers to advertise transation bypass capability of an IOMMU.
Whatever the intended semantics of this are, I can't help thinking it
would be better served by allowing callers to explicitly allocate their
own IOMMU_DOMAIN_IDENTITY domains. That would also be useful for the
problem we have with legacy virtio devices behind real IOMMUs.
Robin.
> Signed-off-by: Anup Patel <anup.patel@broadcom.com>
> ---
> include/linux/iommu.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/linux/iommu.h b/include/linux/iommu.h
> index 2cb54ad..6bbb4cc 100644
> --- a/include/linux/iommu.h
> +++ b/include/linux/iommu.h
> @@ -101,6 +101,10 @@ enum iommu_cap {
> transactions */
> IOMMU_CAP_INTR_REMAP, /* IOMMU supports interrupt isolation */
> IOMMU_CAP_NOEXEC, /* IOMMU_NOEXEC flag */
> + IOMMU_CAP_BYPASS, /*
> + * IOMMU can bypass transactions for
> + * which domain is not configured
> + */
> };
>
> /*
>
[toc] | [prev] | [next] | [standalone]
| From | Anup Patel <anup.patel@broadcom.com> |
|---|---|
| Date | 2017-07-19 13:20 +0200 |
| Subject | Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS |
| Message-ID | <u4Vbl-7Nz-31@gated-at.bofh.it> |
| In reply to | #1691470 |
On Wed, Jul 19, 2017 at 4:28 PM, Robin Murphy <robin.murphy@arm.com> wrote: > On 19/07/17 10:33, Anup Patel wrote: >> Some of the IOMMUs (such as ARM SMMU) are capable of bypassing >> transactions for which no IOMMU domain is configured. >> >> This patch adds IOMMU_CAP_BYPASS which can be used by IOMMU >> drivers to advertise transation bypass capability of an IOMMU. > > Whatever the intended semantics of this are, I can't help thinking it > would be better served by allowing callers to explicitly allocate their > own IOMMU_DOMAIN_IDENTITY domains. That would also be useful for the > problem we have with legacy virtio devices behind real IOMMUs. We want to use VFIO no-IOMMU mode for FlexRM device but currently it does not allow on our SOC because IOMMU ops are registered for platform bus. Regards, Anup
[toc] | [prev] | [next] | [standalone]
| From | Robin Murphy <robin.murphy@arm.com> |
|---|---|
| Date | 2017-07-19 13:30 +0200 |
| Subject | Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS |
| Message-ID | <u4VkZ-7Rv-1@gated-at.bofh.it> |
| In reply to | #1691489 |
On 19/07/17 12:26, Anup Patel wrote: > On Wed, Jul 19, 2017 at 4:53 PM, Will Deacon <will.deacon@arm.com> wrote: >> On Wed, Jul 19, 2017 at 04:49:00PM +0530, Anup Patel wrote: >>> On Wed, Jul 19, 2017 at 4:28 PM, Robin Murphy <robin.murphy@arm.com> wrote: >>>> On 19/07/17 10:33, Anup Patel wrote: >>>>> Some of the IOMMUs (such as ARM SMMU) are capable of bypassing >>>>> transactions for which no IOMMU domain is configured. >>>>> >>>>> This patch adds IOMMU_CAP_BYPASS which can be used by IOMMU >>>>> drivers to advertise transation bypass capability of an IOMMU. >>>> >>>> Whatever the intended semantics of this are, I can't help thinking it >>>> would be better served by allowing callers to explicitly allocate their >>>> own IOMMU_DOMAIN_IDENTITY domains. That would also be useful for the >>>> problem we have with legacy virtio devices behind real IOMMUs. >>> >>> We want to use VFIO no-IOMMU mode for FlexRM device but >>> currently it does not allow on our SOC because IOMMU ops are >>> registered for platform bus. >> >> Why do you want to use no-IOMMU mode if you have an IOMMU, and why you do >> think the individual IOMMU drivers are the place to implement this? >> >> NAK to the SMMU patches, for the reasons outlined by Robin. > > We have limited number of SMRs on our SOC. > > There are lot of devices for which we can potentially > configure SMMU but then due to limited number of > SMRs so we use SMMU only for certain devices. Is the stream ID allocation so whacked out that you can't use masking? Robin. > For FlexRM device on our SOC, we don't intend to > use SMMU hence we need VFIO no-IOMMU mode > working for FlexRM device on our SOC. > > Please re-consider your NAK. > > Regards, > Anup >
[toc] | [prev] | [next] | [standalone]
| From | Will Deacon <will.deacon@arm.com> |
|---|---|
| Date | 2017-07-19 13:30 +0200 |
| Subject | Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS |
| Message-ID | <u4VkZ-7Rv-3@gated-at.bofh.it> |
| In reply to | #1691489 |
On Wed, Jul 19, 2017 at 04:49:00PM +0530, Anup Patel wrote: > On Wed, Jul 19, 2017 at 4:28 PM, Robin Murphy <robin.murphy@arm.com> wrote: > > On 19/07/17 10:33, Anup Patel wrote: > >> Some of the IOMMUs (such as ARM SMMU) are capable of bypassing > >> transactions for which no IOMMU domain is configured. > >> > >> This patch adds IOMMU_CAP_BYPASS which can be used by IOMMU > >> drivers to advertise transation bypass capability of an IOMMU. > > > > Whatever the intended semantics of this are, I can't help thinking it > > would be better served by allowing callers to explicitly allocate their > > own IOMMU_DOMAIN_IDENTITY domains. That would also be useful for the > > problem we have with legacy virtio devices behind real IOMMUs. > > We want to use VFIO no-IOMMU mode for FlexRM device but > currently it does not allow on our SOC because IOMMU ops are > registered for platform bus. Why do you want to use no-IOMMU mode if you have an IOMMU, and why you do think the individual IOMMU drivers are the place to implement this? NAK to the SMMU patches, for the reasons outlined by Robin. Will
[toc] | [prev] | [next] | [standalone]
| From | Anup Patel <anup.patel@broadcom.com> |
|---|---|
| Date | 2017-07-19 13:30 +0200 |
| Subject | Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS |
| Message-ID | <u4VkZ-7Rv-5@gated-at.bofh.it> |
| In reply to | #1691545 |
On Wed, Jul 19, 2017 at 4:53 PM, Will Deacon <will.deacon@arm.com> wrote: > On Wed, Jul 19, 2017 at 04:49:00PM +0530, Anup Patel wrote: >> On Wed, Jul 19, 2017 at 4:28 PM, Robin Murphy <robin.murphy@arm.com> wrote: >> > On 19/07/17 10:33, Anup Patel wrote: >> >> Some of the IOMMUs (such as ARM SMMU) are capable of bypassing >> >> transactions for which no IOMMU domain is configured. >> >> >> >> This patch adds IOMMU_CAP_BYPASS which can be used by IOMMU >> >> drivers to advertise transation bypass capability of an IOMMU. >> > >> > Whatever the intended semantics of this are, I can't help thinking it >> > would be better served by allowing callers to explicitly allocate their >> > own IOMMU_DOMAIN_IDENTITY domains. That would also be useful for the >> > problem we have with legacy virtio devices behind real IOMMUs. >> >> We want to use VFIO no-IOMMU mode for FlexRM device but >> currently it does not allow on our SOC because IOMMU ops are >> registered for platform bus. > > Why do you want to use no-IOMMU mode if you have an IOMMU, and why you do > think the individual IOMMU drivers are the place to implement this? > > NAK to the SMMU patches, for the reasons outlined by Robin. We have limited number of SMRs on our SOC. There are lot of devices for which we can potentially configure SMMU but then due to limited number of SMRs so we use SMMU only for certain devices. For FlexRM device on our SOC, we don't intend to use SMMU hence we need VFIO no-IOMMU mode working for FlexRM device on our SOC. Please re-consider your NAK. Regards, Anup
[toc] | [prev] | [next] | [standalone]
| From | Anup Patel <anup.patel@broadcom.com> |
|---|---|
| Date | 2017-07-19 13:40 +0200 |
| Subject | Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS |
| Message-ID | <u4VuH-7V9-37@gated-at.bofh.it> |
| In reply to | #1691549 |
On Wed, Jul 19, 2017 at 5:00 PM, Will Deacon <will.deacon@arm.com> wrote: > On Wed, Jul 19, 2017 at 04:56:38PM +0530, Anup Patel wrote: >> On Wed, Jul 19, 2017 at 4:53 PM, Will Deacon <will.deacon@arm.com> wrote: >> > On Wed, Jul 19, 2017 at 04:49:00PM +0530, Anup Patel wrote: >> >> On Wed, Jul 19, 2017 at 4:28 PM, Robin Murphy <robin.murphy@arm.com> wrote: >> >> > On 19/07/17 10:33, Anup Patel wrote: >> >> >> Some of the IOMMUs (such as ARM SMMU) are capable of bypassing >> >> >> transactions for which no IOMMU domain is configured. >> >> >> >> >> >> This patch adds IOMMU_CAP_BYPASS which can be used by IOMMU >> >> >> drivers to advertise transation bypass capability of an IOMMU. >> >> > >> >> > Whatever the intended semantics of this are, I can't help thinking it >> >> > would be better served by allowing callers to explicitly allocate their >> >> > own IOMMU_DOMAIN_IDENTITY domains. That would also be useful for the >> >> > problem we have with legacy virtio devices behind real IOMMUs. >> >> >> >> We want to use VFIO no-IOMMU mode for FlexRM device but >> >> currently it does not allow on our SOC because IOMMU ops are >> >> registered for platform bus. >> > >> > Why do you want to use no-IOMMU mode if you have an IOMMU, and why you do >> > think the individual IOMMU drivers are the place to implement this? >> > >> > NAK to the SMMU patches, for the reasons outlined by Robin. >> >> We have limited number of SMRs on our SOC. >> >> There are lot of devices for which we can potentially >> configure SMMU but then due to limited number of >> SMRs so we use SMMU only for certain devices. >> >> For FlexRM device on our SOC, we don't intend to >> use SMMU hence we need VFIO no-IOMMU mode >> working for FlexRM device on our SOC. >> >> Please re-consider your NAK. > > I'm afraid it still stands for the current implementation. If you can't > solve the SMR restriction by grouping things appropriately (which would be > my strong preference), then I think you'll have to follow-up on Robin's > suggestion of implementing support for IDENTITY domains in VFIO for no-IOMMU > mode to be used even when an IOMMU is present. > Yes, we have considered making stream-id space for devices to be continuguous but this cannot be fixed in our current SOC. We will have to live with this limitation for our current SOC and it will be only fixed in future. Regards, Anup
[toc] | [prev] | [next] | [standalone]
| From | Will Deacon <will.deacon@arm.com> |
|---|---|
| Date | 2017-07-19 13:40 +0200 |
| Subject | Re: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS |
| Message-ID | <u4VuH-7V9-39@gated-at.bofh.it> |
| In reply to | #1691549 |
On Wed, Jul 19, 2017 at 04:56:38PM +0530, Anup Patel wrote: > On Wed, Jul 19, 2017 at 4:53 PM, Will Deacon <will.deacon@arm.com> wrote: > > On Wed, Jul 19, 2017 at 04:49:00PM +0530, Anup Patel wrote: > >> On Wed, Jul 19, 2017 at 4:28 PM, Robin Murphy <robin.murphy@arm.com> wrote: > >> > On 19/07/17 10:33, Anup Patel wrote: > >> >> Some of the IOMMUs (such as ARM SMMU) are capable of bypassing > >> >> transactions for which no IOMMU domain is configured. > >> >> > >> >> This patch adds IOMMU_CAP_BYPASS which can be used by IOMMU > >> >> drivers to advertise transation bypass capability of an IOMMU. > >> > > >> > Whatever the intended semantics of this are, I can't help thinking it > >> > would be better served by allowing callers to explicitly allocate their > >> > own IOMMU_DOMAIN_IDENTITY domains. That would also be useful for the > >> > problem we have with legacy virtio devices behind real IOMMUs. > >> > >> We want to use VFIO no-IOMMU mode for FlexRM device but > >> currently it does not allow on our SOC because IOMMU ops are > >> registered for platform bus. > > > > Why do you want to use no-IOMMU mode if you have an IOMMU, and why you do > > think the individual IOMMU drivers are the place to implement this? > > > > NAK to the SMMU patches, for the reasons outlined by Robin. > > We have limited number of SMRs on our SOC. > > There are lot of devices for which we can potentially > configure SMMU but then due to limited number of > SMRs so we use SMMU only for certain devices. > > For FlexRM device on our SOC, we don't intend to > use SMMU hence we need VFIO no-IOMMU mode > working for FlexRM device on our SOC. > > Please re-consider your NAK. I'm afraid it still stands for the current implementation. If you can't solve the SMR restriction by grouping things appropriately (which would be my strong preference), then I think you'll have to follow-up on Robin's suggestion of implementing support for IDENTITY domains in VFIO for no-IOMMU mode to be used even when an IOMMU is present. Will
[toc] | [prev] | [next] | [standalone]
| From | Anup Patel <anup.patel@broadcom.com> |
|---|---|
| Date | 2017-07-19 11:40 +0200 |
| Subject | [PATCH 2/5] iommu/arm-smmu: add IOMMU_CAP_BYPASS to the ARM SMMU driver |
| Message-ID | <u4TCA-6D1-59@gated-at.bofh.it> |
| In reply to | #1691193 |
The ARM SMMUv1 and SMMUv2 support bypassing transactions for which domain is not configured. The patch adds corresponding IOMMU capability to advertise this fact. Signed-off-by: Anup Patel <anup.patel@broadcom.com> --- drivers/iommu/arm-smmu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index bc89b4d..08a9020 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -1483,6 +1483,8 @@ static bool arm_smmu_capable(enum iommu_cap cap) return true; case IOMMU_CAP_NOEXEC: return true; + case IOMMU_CAP_BYPASS: + return true; default: return false; } -- 2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Robin Murphy <robin.murphy@arm.com> |
|---|---|
| Date | 2017-07-19 13:00 +0200 |
| Subject | Re: [PATCH 2/5] iommu/arm-smmu: add IOMMU_CAP_BYPASS to the ARM SMMU driver |
| Message-ID | <u4URX-7qy-5@gated-at.bofh.it> |
| In reply to | #1691205 |
On 19/07/17 10:33, Anup Patel wrote: > The ARM SMMUv1 and SMMUv2 support bypassing transactions for > which domain is not configured. The patch adds corresponding > IOMMU capability to advertise this fact. > > Signed-off-by: Anup Patel <anup.patel@broadcom.com> > --- > drivers/iommu/arm-smmu.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c > index bc89b4d..08a9020 100644 > --- a/drivers/iommu/arm-smmu.c > +++ b/drivers/iommu/arm-smmu.c > @@ -1483,6 +1483,8 @@ static bool arm_smmu_capable(enum iommu_cap cap) > return true; > case IOMMU_CAP_NOEXEC: > return true; > + case IOMMU_CAP_BYPASS: > + return true; Except when it isn't, of course. Beware that what we'd like to do in the long term is flip the polarity of disable_bypass, because there isn't generally a good reason for Non-Secure DMA to be happening behind Linux's back. Robin. > default: > return false; > } >
[toc] | [prev] | [next] | [standalone]
| From | Robin Murphy <robin.murphy@arm.com> |
|---|---|
| Date | 2017-07-19 13:00 +0200 |
| Message-ID | <u4URX-7qy-3@gated-at.bofh.it> |
| In reply to | #1691193 |
On 19/07/17 10:33, Anup Patel wrote: > This patchset primarily adds Broadcom FlexRM reset module for > VFIO platform driver. We also have minor improvments in IOMMU > and VFIO driver to allow VFIO no-IOMMU mode access to FlexRM. I'm struggling to understand the IOMMU changes here - what's the FlexRM's hardware relationship with the IOMMU, and how is it different from any other device? Furthermore, if there *is* a relevant IOMMU present, why would no-IOMMU mode need to be involved at all? Robin. > The patches are based on Linux-4.13-rc1 and can also be > found at flexrm-vfio-v1 branch of > https://github.com/Broadcom/arm64-linux.git > > Anup Patel (5): > iommu: Add capability IOMMU_CAP_BYPASS > iommu/arm-smmu: add IOMMU_CAP_BYPASS to the ARM SMMU driver > iommu/arm-smmu-v3: add IOMMU_CAP_BYPASS to the ARM SMMUv3 driver > vfio: Allow No-IOMMU mode for IOMMUs with bypass capability > vfio: platform: reset: Add Broadcom FlexRM reset module > > drivers/iommu/arm-smmu-v3.c | 2 + > drivers/iommu/arm-smmu.c | 2 + > drivers/vfio/platform/reset/Kconfig | 9 +++ > drivers/vfio/platform/reset/Makefile | 1 + > .../vfio/platform/reset/vfio_platform_bcmflexrm.c | 91 ++++++++++++++++++++++ > drivers/vfio/vfio.c | 13 +++- > include/linux/iommu.h | 4 + > 7 files changed, 119 insertions(+), 3 deletions(-) > create mode 100644 drivers/vfio/platform/reset/vfio_platform_bcmflexrm.c >
[toc] | [prev] | [next] | [standalone]
| From | Anup Patel <anup.patel@broadcom.com> |
|---|---|
| Date | 2017-07-19 13:20 +0200 |
| Message-ID | <u4Vbk-7Nz-13@gated-at.bofh.it> |
| In reply to | #1691467 |
On Wed, Jul 19, 2017 at 4:27 PM, Robin Murphy <robin.murphy@arm.com> wrote: > On 19/07/17 10:33, Anup Patel wrote: >> This patchset primarily adds Broadcom FlexRM reset module for >> VFIO platform driver. We also have minor improvments in IOMMU >> and VFIO driver to allow VFIO no-IOMMU mode access to FlexRM. > > I'm struggling to understand the IOMMU changes here - what's the > FlexRM's hardware relationship with the IOMMU, and how is it different > from any other device? Furthermore, if there *is* a relevant IOMMU > present, why would no-IOMMU mode need to be involved at all? We want to have FlexRM device accessible from user-space using VFIO platform with and without IOMMU. Currently, if IOMMU ops are available for platform bus then I cannot access FlexRM device using VFIO no-IOMMU mode. Since, SMMU can bypass transactions which do not match any SMRs, we should allow no-IOMMU mode for devices when IOMMU group is not available. Regards, Anup
[toc] | [prev] | [next] | [standalone]
| From | Robin Murphy <robin.murphy@arm.com> |
|---|---|
| Date | 2017-07-19 13:30 +0200 |
| Message-ID | <u4Vl0-7Rv-11@gated-at.bofh.it> |
| In reply to | #1691481 |
On 19/07/17 12:17, Anup Patel wrote: > On Wed, Jul 19, 2017 at 4:27 PM, Robin Murphy <robin.murphy@arm.com> wrote: >> On 19/07/17 10:33, Anup Patel wrote: >>> This patchset primarily adds Broadcom FlexRM reset module for >>> VFIO platform driver. We also have minor improvments in IOMMU >>> and VFIO driver to allow VFIO no-IOMMU mode access to FlexRM. >> >> I'm struggling to understand the IOMMU changes here - what's the >> FlexRM's hardware relationship with the IOMMU, and how is it different >> from any other device? Furthermore, if there *is* a relevant IOMMU >> present, why would no-IOMMU mode need to be involved at all? > > We want to have FlexRM device accessible from user-space > using VFIO platform with and without IOMMU. > > Currently, if IOMMU ops are available for platform bus then > I cannot access FlexRM device using VFIO no-IOMMU mode. So does the FlexRM hardware master through the SMMU or not? If it does, why do you need no-IOMMU mode? If it doesn't, then that's yet another reason to fix the real problem, which is the utterly broken notion of there being 'an IOMMU' on the platform 'bus', rather than papering over it in VFIO. Robin. > Since, SMMU can bypass transactions which do not match > any SMRs, we should allow no-IOMMU mode for devices > when IOMMU group is not available. > > Regards, > Anup >
[toc] | [prev] | [next] | [standalone]
| From | Anup Patel <anup.patel@broadcom.com> |
|---|---|
| Date | 2017-07-19 13:30 +0200 |
| Message-ID | <u4Vl1-7Rv-45@gated-at.bofh.it> |
| In reply to | #1691526 |
On Wed, Jul 19, 2017 at 4:55 PM, Robin Murphy <robin.murphy@arm.com> wrote: > On 19/07/17 12:17, Anup Patel wrote: >> On Wed, Jul 19, 2017 at 4:27 PM, Robin Murphy <robin.murphy@arm.com> wrote: >>> On 19/07/17 10:33, Anup Patel wrote: >>>> This patchset primarily adds Broadcom FlexRM reset module for >>>> VFIO platform driver. We also have minor improvments in IOMMU >>>> and VFIO driver to allow VFIO no-IOMMU mode access to FlexRM. >>> >>> I'm struggling to understand the IOMMU changes here - what's the >>> FlexRM's hardware relationship with the IOMMU, and how is it different >>> from any other device? Furthermore, if there *is* a relevant IOMMU >>> present, why would no-IOMMU mode need to be involved at all? >> >> We want to have FlexRM device accessible from user-space >> using VFIO platform with and without IOMMU. >> >> Currently, if IOMMU ops are available for platform bus then >> I cannot access FlexRM device using VFIO no-IOMMU mode. > > So does the FlexRM hardware master through the SMMU or not? If it does, > why do you need no-IOMMU mode? If it doesn't, then that's yet another > reason to fix the real problem, which is the utterly broken notion of > there being 'an IOMMU' on the platform 'bus', rather than papering over > it in VFIO. > We are not trying to paper-over the issue. The ARM SMMU will have limited number of SMRs so on a big SOC with large number of DMA-capable devices we can run-out of SMRs if we try to configure SMMU for all DMA-capable devices. Regards, Anup
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web