From: Jonas Pfefferle <jpf@zurich.ibm.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, anatoly.burakov@intel.com,
Jonas Pfefferle <jpf@zurich.ibm.com>
Subject: [dpdk-dev] [PATCH] pci: get IOMMU class sPAPR iommu fix
Date: Fri, 3 Nov 2017 13:05:19 +0100 [thread overview]
Message-ID: <1509710719-17741-1-git-send-email-jpf@zurich.ibm.com> (raw)
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
next reply other threads:[~2017-11-03 12:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-03 12:05 Jonas Pfefferle [this message]
2017-11-06 23:38 ` Thomas Monjalon
2017-11-07 14:31 ` Jonas Pfefferle1
2017-11-07 14:37 ` Thomas Monjalon
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=1509710719-17741-1-git-send-email-jpf@zurich.ibm.com \
--to=jpf@zurich.ibm.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
/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 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).