From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <JPF@zurich.ibm.com>
Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com
 [148.163.158.5]) by dpdk.org (Postfix) with ESMTP id C39571B384
 for <dev@dpdk.org>; Tue,  7 Nov 2017 10:50:37 +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
 vA79lQBZ091760 for <dev@dpdk.org>; Tue, 7 Nov 2017 04:50:37 -0500
Received: from smtp.notes.na.collabserv.com (smtp.notes.na.collabserv.com
 [192.155.248.74])
 by mx0b-001b2d01.pphosted.com with ESMTP id 2e38s8n4nj-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)
 for <dev@dpdk.org>; Tue, 07 Nov 2017 04:50:36 -0500
Received: from localhost
 by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP
 for <dev@dpdk.org> from <JPF@zurich.ibm.com>;
 Tue, 7 Nov 2017 09:50:34 -0000
Received: from us1a3-smtp06.a3.dal06.isc4sb.com (10.146.103.243)
 by smtp.notes.na.collabserv.com (10.106.227.92) with
 smtp.notes.na.collabserv.com ESMTP; Tue, 7 Nov 2017 09:50:31 -0000
Received: from us1a3-mail173.a3.dal06.isc4sb.com ([10.146.71.126])
 by us1a3-smtp06.a3.dal06.isc4sb.com
 with ESMTP id 2017110709503140-292038 ;
 Tue, 7 Nov 2017 09:50:31 +0000 
MIME-Version: 1.0
In-Reply-To: <3858523.3OloCCdIaW@xps>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: anatoly.burakov@intel.com, dev@dpdk.org
From: "Jonas Pfefferle1" <JPF@zurich.ibm.com>
Date: Tue, 7 Nov 2017 10:50:30 +0100
References: <1509465586-7436-1-git-send-email-jpf@zurich.ibm.com>
 <3884119.bRk7rexRDt@xps>
 <OF16C3B3D8.330B4ED7-ONC12581D1.00302F92-C12581D1.0031FB9C@notes.na.collabserv.com>
 <3858523.3OloCCdIaW@xps>
X-KeepSent: 0E8E7833:5B467171-C12581D1:00360502;
 type=4; name=$KeepSent
X-Mailer: IBM Notes Release 9.0.1 October 14, 2013
X-LLNOutbound: False
X-Disclaimed: 58375
X-TNEFEvaluated: 1
x-cbid: 17110709-7581-0000-0000-00000487EC43
X-IBM-SpamModules-Scores: BY=0; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0;
 SC=0.417846; ST=0; TS=0; UL=0; ISC=; MB=0.000005
X-IBM-SpamModules-Versions: BY=3.00008025; HX=3.00000241; KW=3.00000007;
 PH=3.00000004; SC=3.00000239; SDB=6.00942360; UDB=6.00475355; IPR=6.00722648; 
 BA=6.00005675; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000;
 ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017893; XFM=3.00000015;
 UTC=2017-11-07 09:50:33
X-IBM-AV-DETECTION: SAVI=unsuspicious REMOTE=unsuspicious XFE=unused
X-IBM-AV-VERSION: SAVI=2017-11-07 07:09:57 - 6.00007576
x-cbparentid: 17110709-7582-0000-0000-0000BE569ACF
Message-Id: <OF0E8E7833.5B467171-ONC12581D1.00360502-C12581D1.00361016@notes.na.collabserv.com>
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, ,
 definitions=2017-11-07_03:, , 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 v2] vfio: noiommu check error handling
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 07 Nov 2017 09:50:38 -0000

Thomas Monjalon <thomas@monjalon.net> wrote on 11/07/2017 10:40:15 AM:

> From: Thomas Monjalon <thomas@monjalon.net>
> To: Jonas Pfefferle1 <JPF@zurich.ibm.com>, anatoly.burakov@intel.com
> Cc: dev@dpdk.org
> Date: 11/07/2017 10:40 AM
> Subject: Re: [dpdk-dev] [PATCH v2] vfio: noiommu check error handling
>
> 07/11/2017 10:05, Jonas Pfefferle1:
> > Thomas Monjalon <thomas@monjalon.net> wrote on 11/06/2017 09:25:15 PM:
> >
> > > From: Thomas Monjalon <thomas@monjalon.net>
> > > To: Jonas Pfefferle <jpf@zurich.ibm.com>, anatoly.burakov@intel.com
> > > Cc: dev@dpdk.org
> > > Date: 11/06/2017 09:55 PM
> > > Subject: Re: [dpdk-dev] [PATCH v2] vfio: noiommu check error handling
> > >
> > > 31/10/2017 16:59, Jonas Pfefferle:
> > > > Check and report errors on open/read in noiommu check.
> > > >
> > > > Signed-off-by: Jonas Pfefferle <jpf@zurich.ibm.com>
> > >
> > > I cannot decide to apply this patch as it does not explain what
> > > it is fixing, and as it is not reviewed.
> > >
> >
> > This patch adds error handling and logging to the noiommu check.
> > Also, on older kernels when the noiommu=5Fenable file does not exist it
> > assumes noiommu is not enabled instead of returning -1.
> > Note that in rte=5Fpci=5Fget=5Fiommu=5Fclass (drivers/bus/pci/linux/pci=
.c)
> > is the only usage of the function and it assumes return =3D=3D 1:
> > noiommu is enabled any other return value noiommu disabled, i.e.
> > my code change does not change the behavior of this function.
> > We might want to check for errors in rte=5Fpci=5Fget=5Fiommu=5Fclass
> > as well since assuming it is not enabled when we cannot open
> > and read it might lead to iova =3D=3D VA being used even if noiommu is
> > enabled.
> >
> > All this comes back to what I proposed before: instead of
> > the noiommu and PPC64 check we should decide which iova mode
> > to use depending on the iommu types available.
> > The type should be already available at the point where we
> > decide on the iova type.
> > (iommu types supported is checked by vfio=5Fget=5Fcontainer=5Ffd)
>
> Is there something urgent for 17.11?
> Or can it be refined in 18.02?

Nothing urgent. We can refine this for 18.02.


>
> Anatoly, any thought?
>