From: Jonas Pfefferle Date: Fri, 3 Nov 2017 12:05:19 +0000 (+0100) Subject: bus/pci: fix IOMMU class for sPAPR X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b48e0e2d9cb4;p=dpdk.git bus/pci: fix IOMMU class for sPAPR PPC64 sPAPR iommu does not support iova as va. Use pa mode instead. Fixes: 815c7deaed2d ("pci: get IOMMU class on Linux") Signed-off-by: Jonas Pfefferle --- diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c index 7367a82fa8..7be74708ab 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;