From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by dpdk.org (Postfix) with ESMTP id 4A0321B65C for ; Fri, 3 Nov 2017 11:44:29 +0100 (CET) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vA3AhSQs114839 for ; Fri, 3 Nov 2017 06:44:28 -0400 Received: from smtp.notes.na.collabserv.com (smtp.notes.na.collabserv.com [192.155.248.91]) by mx0a-001b2d01.pphosted.com with ESMTP id 2e0pk1hd55-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 03 Nov 2017 06:44:28 -0400 Received: from localhost by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for from ; Fri, 3 Nov 2017 10:44:27 -0000 Received: from us1a3-smtp06.a3.dal06.isc4sb.com (10.146.103.243) by smtp.notes.na.collabserv.com (10.106.227.143) with smtp.notes.na.collabserv.com ESMTP; Fri, 3 Nov 2017 10:44:19 -0000 Received: from us1a3-mail173.a3.dal06.isc4sb.com ([10.146.71.126]) by us1a3-smtp06.a3.dal06.isc4sb.com with ESMTP id 2017110310441789-321666 ; Fri, 3 Nov 2017 10:44:17 +0000 MIME-Version: 1.0 In-Reply-To: <3063385.K5PMv1yDeD@xps> To: Thomas Monjalon Cc: aconole@redhat.com, Alexey Kardashevskiy , anatoly.burakov@intel.com, bruce.richardson@intel.com, dev@dpdk.org, gaetan.rivet@6wind.com, hemant.agrawal@nxp.com, jerin.jacob@caviumnetworks.com, maxime.coquelin@redhat.com, olivier.matz@6wind.com, Santosh Shukla , sergio.gonzalez.monroy@intel.com, shreyansh.jain@nxp.com, stephen@networkplumber.org From: "Jonas Pfefferle1" Date: Fri, 3 Nov 2017 11:44:16 +0100 References: <20170814161059.6684-1-santosh.shukla@caviumnetworks.com> <3063385.K5PMv1yDeD@xps> X-KeepSent: 5A281D28:C72C1E61-C12581CD:003A7EA9; type=4; name=$KeepSent X-Mailer: IBM Notes Release 9.0.1 October 14, 2013 X-LLNOutbound: False X-Disclaimed: 15131 X-TNEFEvaluated: 1 x-cbid: 17110310-9951-0000-0000-000004E7945C X-IBM-SpamModules-Scores: BY=0; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.433748; ST=0; TS=0; UL=0; ISC=; MB=0.217434 X-IBM-SpamModules-Versions: BY=3.00008002; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000239; SDB=6.00940503; UDB=6.00474261; IPR=6.00720759; BA=6.00005669; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017845; XFM=3.00000015; UTC=2017-11-03 10:44:25 X-IBM-AV-DETECTION: SAVI=unsuspicious REMOTE=unsuspicious XFE=unused X-IBM-AV-VERSION: SAVI=2017-11-03 09:30:46 - 6.00007557 x-cbparentid: 17110310-9952-0000-0000-00002F819B48 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-11-03_04:, , signatures=0 X-Proofpoint-Spam-Reason: safe Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v7 7/9] linuxapp/eal_vfio: honor iova mode before mapping 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 10:44:29 -0000 Thomas Monjalon wrote on 11/03/2017 11:28:10 AM: > From: Thomas Monjalon > To: Jonas Pfefferle1 > Cc: aconole@redhat.com, anatoly.burakov@intel.com, > bruce.richardson@intel.com, dev@dpdk.org, gaetan.rivet@6wind.com, > hemant.agrawal@nxp.com, jerin.jacob@caviumnetworks.com, > maxime.coquelin@redhat.com, olivier.matz@6wind.com, Santosh Shukla > , > sergio.gonzalez.monroy@intel.com, shreyansh.jain@nxp.com, > stephen@networkplumber.org, Alexey Kardashevskiy > Date: 11/03/2017 11:28 AM > Subject: Re: [dpdk-dev] [PATCH v7 7/9] linuxapp/eal=5Fvfio: honor iova > mode before mapping > > 03/11/2017 10:56, Jonas Pfefferle1: > > Thomas Monjalon wrote on 11/02/2017 11:17:10 AM: > > > > 26/10/2017 14:57, Jonas Pfefferle1: > > > > > > > > > > Hi @all > > > > > > > > > > I just stumbled upon this patch while testing on POWER. RTE=5FIOVA=5FVA > > > will > > > > > not work for the sPAPR code since the dma window size is currently > > > > > determined by the physical address only. > > > > > > > > Is it affecting POWER8? > > > > > > It is. > > > > > > > > > > > > I'm preparing a patch to address this. > > > > > > > > Any news? > > > > Can you use virtual addresses? > > > > > > After a long discussion with Alexey (CC) we came to the conclusion that > > > with the current sPAPR iommu driver we cannot use virtual addresses since > > > the iova is restricted to lay in the DMA window which itself is > > restricted > > > to physical RAM addresses resp. with the current code 0 to hotplug memory > > > max. However, Alexey is working on a patch to lift this restriction on > > the > > > DMA window size which should allow us to do VA:VA mappings in the future. > > > For now we should fall back to PA in the dynamic iova mode check. I will > > > send an according patch later today. > > > > I looked into this yesterday but I'm not sure what the right solution is > > here. > > At the time rte=5Fpci=5Fget=5Fiommu=5Fclass is called we already know w= hich IOMMU > > types are supported because vfio=5Fget=5Fcontainer=5Ffd resp. > > vfio=5Fhas=5Fsupported=5Fextensions has been called however we do not = know which > > one is going to be used (Decided later in vfio=5Fsetup=5Fdevice resp. > > vfio=5Fset=5Fiommu=5Ftype). We can choose a iova mode which is supporte= d by all > > types but if the modes are exclusive to the types we have to guess which > > one is going to be used. Or let the user decide? > > You can keep the old behaviour, restricting to physical memory, > until you support virtual addressing. > It can be just a #ifdef RTE=5FARCH=5FPPC=5F64. > Ok but we might want to refine this in the future. IMO It looks much cleaner to decide this on the iommu type plus this would also cover the noiommu case without having this extra check reading the sysfs variable.