* [dpdk-dev] [PATCH] pci: get IOMMU class sPAPR iommu fix
@ 2017-11-03 12:05 Jonas Pfefferle
2017-11-06 23:38 ` Thomas Monjalon
0 siblings, 1 reply; 4+ messages in thread
From: Jonas Pfefferle @ 2017-11-03 12:05 UTC (permalink / raw)
To: dev; +Cc: thomas, anatoly.burakov, Jonas Pfefferle
PPC64 sPAPR iommu does not support iova as va.
Use pa mode instead.
Signed-off-by: Jonas Pfefferle <jpf@zurich.ibm.com>
---
drivers/bus/pci/linux/pci.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index cdf8106..6a58c5f 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -586,6 +586,12 @@ rte_pci_get_iommu_class(void)
bool is_vfio_noiommu_enabled = true;
bool has_iova_va;
bool is_bound_uio;
+ bool spapr_iommu =
+#if defined(RTE_ARCH_PPC64)
+ true;
+#else
+ false;
+#endif
is_bound = pci_one_device_is_bound();
if (!is_bound)
@@ -598,7 +604,8 @@ rte_pci_get_iommu_class(void)
true : false;
#endif
- if (has_iova_va && !is_bound_uio && !is_vfio_noiommu_enabled)
+ if (has_iova_va && !is_bound_uio && !is_vfio_noiommu_enabled &&
+ !spapr_iommu)
return RTE_IOVA_VA;
if (has_iova_va) {
@@ -607,6 +614,8 @@ rte_pci_get_iommu_class(void)
RTE_LOG(WARNING, EAL, "vfio-noiommu mode configured\n");
if (is_bound_uio)
RTE_LOG(WARNING, EAL, "few device bound to UIO\n");
+ if (spapr_iommu)
+ RTE_LOG(WARNING, EAL, "sPAPR iommu does not support iova as va\n");
}
return RTE_IOVA_PA;
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] pci: get IOMMU class sPAPR iommu fix
2017-11-03 12:05 [dpdk-dev] [PATCH] pci: get IOMMU class sPAPR iommu fix Jonas Pfefferle
@ 2017-11-06 23:38 ` Thomas Monjalon
2017-11-07 14:31 ` Jonas Pfefferle1
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2017-11-06 23:38 UTC (permalink / raw)
To: Jonas Pfefferle; +Cc: dev, anatoly.burakov
03/11/2017 13:05, Jonas Pfefferle:
> PPC64 sPAPR iommu does not support iova as va.
> Use pa mode instead.
>
> Signed-off-by: Jonas Pfefferle <jpf@zurich.ibm.com>
Applied, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] pci: get IOMMU class sPAPR iommu fix
2017-11-06 23:38 ` Thomas Monjalon
@ 2017-11-07 14:31 ` Jonas Pfefferle1
2017-11-07 14:37 ` Thomas Monjalon
0 siblings, 1 reply; 4+ messages in thread
From: Jonas Pfefferle1 @ 2017-11-07 14:31 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: anatoly.burakov, dev
Thomas Monjalon <thomas@monjalon.net> wrote on 11/07/2017 12:38:11 AM:
> From: Thomas Monjalon <thomas@monjalon.net>
> To: Jonas Pfefferle <jpf@zurich.ibm.com>
> Cc: dev@dpdk.org, anatoly.burakov@intel.com
> Date: 11/07/2017 12:38 AM
> Subject: Re: [dpdk-dev] [PATCH] pci: get IOMMU class sPAPR iommu fix
>
> 03/11/2017 13:05, Jonas Pfefferle:
> > PPC64 sPAPR iommu does not support iova as va.
> > Use pa mode instead.
> >
> > Signed-off-by: Jonas Pfefferle <jpf@zurich.ibm.com>
>
> Applied, thanks
>
Hi Thomas,
I just noticed that I send in an old patch by mistake.
It uses the wrong define RTE_ARCH_PPC64 instead of RTE_ARCH_PPC_64.
Sorry for this, I will send in a fix for this in the next hour.
Thanks,
Jonas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] pci: get IOMMU class sPAPR iommu fix
2017-11-07 14:31 ` Jonas Pfefferle1
@ 2017-11-07 14:37 ` Thomas Monjalon
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2017-11-07 14:37 UTC (permalink / raw)
To: Jonas Pfefferle1; +Cc: anatoly.burakov, dev
07/11/2017 15:31, Jonas Pfefferle1:
> Thomas Monjalon <thomas@monjalon.net> wrote on 11/07/2017 12:38:11 AM:
>
> > From: Thomas Monjalon <thomas@monjalon.net>
> > To: Jonas Pfefferle <jpf@zurich.ibm.com>
> > Cc: dev@dpdk.org, anatoly.burakov@intel.com
> > Date: 11/07/2017 12:38 AM
> > Subject: Re: [dpdk-dev] [PATCH] pci: get IOMMU class sPAPR iommu fix
> >
> > 03/11/2017 13:05, Jonas Pfefferle:
> > > PPC64 sPAPR iommu does not support iova as va.
> > > Use pa mode instead.
> > >
> > > Signed-off-by: Jonas Pfefferle <jpf@zurich.ibm.com>
> >
> > Applied, thanks
> >
>
> Hi Thomas,
>
> I just noticed that I send in an old patch by mistake.
> It uses the wrong define RTE_ARCH_PPC64 instead of RTE_ARCH_PPC_64.
> Sorry for this, I will send in a fix for this in the next hour.
OK, thanks for the notice
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-07 14:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-03 12:05 [dpdk-dev] [PATCH] pci: get IOMMU class sPAPR iommu fix Jonas Pfefferle
2017-11-06 23:38 ` Thomas Monjalon
2017-11-07 14:31 ` Jonas Pfefferle1
2017-11-07 14:37 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).