From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas@monjalon.net>
Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com
 [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 266A45F16;
 Mon, 21 Jan 2019 16:19:33 +0100 (CET)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id 4C02321908;
 Mon, 21 Jan 2019 10:19:32 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162])
 by compute1.internal (MEProxy); Mon, 21 Jan 2019 10:19:32 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 from:to:cc:subject:date:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding:content-type; s=mesmtp;
 bh=jZTthf1wiNU7QQhGjNz4Zo+4f4khmUEg3K412m1mQQU=; b=Nd1u2S+xfwfn
 396ATPL7lU3bh4dxaiWt9os7kdcuho5Rw1q4xs+T/RU2jlDr/hMnBWeX4KqCbmSA
 zbo0gpqrPvbSfqv8J9Es+AuflLrRfsviEDSbL0gbvDhUHmWUBUU69CJbF2NiiSuo
 KIidBQX5Yj+d0K1XOmEA0EtLYBgk3vY=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-transfer-encoding:content-type
 :date:from:in-reply-to:message-id:mime-version:references
 :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender
 :x-sasl-enc; s=fm1; bh=jZTthf1wiNU7QQhGjNz4Zo+4f4khmUEg3K412m1mQ
 QU=; b=CaTD7QBJAA0jn4F+KeHX4JVRKWAZYiUWnx4TRaqAOKOezDtnEv1FedSLZ
 fgbmnbsQYk4gDI3KNsxGwHPbW3DsrnezfnBjvjAA50qvgKajeBkCUnco9+E/7ViP
 ydoxuappxyPQO0DmuAOPhdzl8EbTJQUJQ+ORd1xIt5SOBvX/BDaSmzzAgZtDUEdf
 KuT8vCahf0ZQoUAbcWOLLopFc5b78NVm2SVgbdJzxBAHdHSy740NoamcrosSrOxH
 yCYhGA5KKitQLUsqKCE4Owz/m+lENWVpJR3Ye88FZWvU5Yvz6VhLJ0t2pHMc60pm
 maqGZutmSMQyf1IojyhnYxtAfVzpA==
X-ME-Sender: <xms:A-NFXMY7mAIZgTo0lmYo2zOmzwMZBLeephNtzIQa2SWLJxC0n3wmhQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledrheeigdejhecutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthenuceurghilhhouhhtmecufedt
 tdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkfgjfh
 gggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceo
 thhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukfhppeejjedrudefgedrvddtfe
 drudekgeenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho
 nhdrnhgvthenucevlhhushhtvghrufhiiigvpedt
X-ME-Proxy: <xmx:A-NFXEKBck1bkZjbRRZ2uHgEfVNPc9lsV50g3xIGBv5CHiOFGoAyLw>
 <xmx:A-NFXGgf3AY3fMQ2QSUIwauAlhxdNWaw36eDZnP7cFMzVbAfxWzzCQ>
 <xmx:A-NFXPQpNafFsBwrc-fRpLejGO_cp98AV1Xsi-n2P-y94XQbVnKbhg>
 <xmx:BONFXJ46bQUyCyH-_zFAY2g14hoXTTYyQLdbO7YwSMYHJK6flmVbZw>
Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id 404EEE4100;
 Mon, 21 Jan 2019 10:19:30 -0500 (EST)
From: Thomas Monjalon <thomas@monjalon.net>
To: "Burakov, Anatoly" <anatoly.burakov@intel.com>
Cc: stable@dpdk.org, "Stojaczyk, Dariusz" <dariusz.stojaczyk@intel.com>,
 "dev@dpdk.org" <dev@dpdk.org>, "Wang, Xiao W" <xiao.w.wang@intel.com>, "Zhang,
 Qi Z" <qi.z.zhang@intel.com>,
 "qingfu.cqf@alibaba-inc.com" <qingfu.cqf@alibaba-inc.com>,
 ferruh.yigit@intel.com
Date: Mon, 21 Jan 2019 16:19:29 +0100
Message-ID: <43003386.oRXqUKJA9s@xps>
In-Reply-To: <FBE7E039FA50BF47A673AD0BD3CD56A84626F2B3@HASMSX105.ger.corp.intel.com>
References: <a306fe2084c9f99dc00d18309c730bdce1817e37.1547746215.git.anatoly.burakov@intel.com>
 <2101fda2f9030723c662419ec9b4a33d2dc7aded.1547807046.git.anatoly.burakov@intel.com>
 <FBE7E039FA50BF47A673AD0BD3CD56A84626F2B3@HASMSX105.ger.corp.intel.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
Subject: Re: [dpdk-stable] [PATCH v2] vfio: allow secondary process to query
	IOMMU type
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 21 Jan 2019 15:19:33 -0000

21/01/2019 11:29, Stojaczyk, Dariusz:
> > It is only possible to know IOMMU type of a given VFIO container
> > by attempting to initialize it. Since secondary process never
> > attempts to set up VFIO container itself (because they're shared
> > between primary and secondary), it never knows which IOMMU type
> > the container is using, and never sets up the appropriate config
> > structures. This results in inability to perform DMA mappings in
> > secondary process.
> > 
> > Fix this by allowing secondary process to query IOMMU type of
> > primary's default container at device initialization.
> > 
> > Note that this fix is assuming we're only interested in default
> > container.
> > 
> > Bugzilla ID: 174
> > 
> > Fixes: 6bcb7c95fe14 ("vfio: share default container in multi-process")
> > Cc: dariusz.stojaczyk@intel.com
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
> > ---
> 
> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
> 
> Thanks!
> In commit 6bcb7c95fe1 (vfio: share default container in multi-process) we fixed just the container fd and not the rte_vfio mapping APIs because we did not even use those APIs in SPDK.

Applied, thanks