From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by dpdk.org (Postfix) with ESMTP id 62DFE1B640 for ; Fri, 3 Nov 2017 13:05:28 +0100 (CET) Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vA3C085e015953 for ; Fri, 3 Nov 2017 08:05:27 -0400 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0b-001b2d01.pphosted.com with ESMTP id 2e0kweeqqp-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 03 Nov 2017 08:05:27 -0400 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 3 Nov 2017 12:05:25 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 3 Nov 2017 12:05:24 -0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vA3C5NJx39780398; Fri, 3 Nov 2017 12:05:23 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B791AAE058; Fri, 3 Nov 2017 11:59:06 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id ADCBDAE051; Fri, 3 Nov 2017 11:59:04 +0000 (GMT) Received: from malvito.zurich.ibm.com (unknown [9.4.69.78]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 3 Nov 2017 11:59:04 +0000 (GMT) From: Jonas Pfefferle To: dev@dpdk.org Cc: thomas@monjalon.net, anatoly.burakov@intel.com, Jonas Pfefferle Date: Fri, 3 Nov 2017 13:05:19 +0100 X-Mailer: git-send-email 2.7.4 X-TM-AS-GCONF: 00 x-cbid: 17110312-0012-0000-0000-0000058923AA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17110312-0013-0000-0000-00001903BAB4 Message-Id: <1509710719-17741-1-git-send-email-jpf@zurich.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-11-03_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1711030147 Subject: [dpdk-dev] [PATCH] pci: get IOMMU class sPAPR iommu fix X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Nov 2017 12:05:28 -0000 PPC64 sPAPR iommu does not support iova as va. Use pa mode instead. Signed-off-by: Jonas Pfefferle --- 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