From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 5C5785589; Mon, 21 Jan 2019 11:30:03 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jan 2019 02:30:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,502,1539673200"; d="scan'208";a="268704845" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga004.jf.intel.com with ESMTP; 21 Jan 2019 02:30:02 -0800 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 21 Jan 2019 02:30:02 -0800 Received: from HASMSX110.ger.corp.intel.com (10.184.198.28) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 21 Jan 2019 02:30:02 -0800 Received: from hasmsx105.ger.corp.intel.com ([169.254.1.136]) by HASMSX110.ger.corp.intel.com ([169.254.6.213]) with mapi id 14.03.0415.000; Mon, 21 Jan 2019 12:29:58 +0200 From: "Stojaczyk, Dariusz" To: "Burakov, Anatoly" , "dev@dpdk.org" CC: "Wang, Xiao W" , "Zhang, Qi Z" , "qingfu.cqf@alibaba-inc.com" , "thomas@monjalon.net" , "stable@dpdk.org" Thread-Topic: [PATCH v2] vfio: allow secondary process to query IOMMU type Thread-Index: AQHUrxgTHhyI0FB6E0a4L7rdm3tSfKW0+uug Date: Mon, 21 Jan 2019 10:29:57 +0000 Message-ID: References: <2101fda2f9030723c662419ec9b4a33d2dc7aded.1547807046.git.anatoly.burakov@intel.com> In-Reply-To: <2101fda2f9030723c662419ec9b4a33d2dc7aded.1547807046.git.anatoly.burakov@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.237.142.8] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jan 2019 10:30:05 -0000 > -----Original Message----- > From: Burakov, Anatoly > Sent: Friday, January 18, 2019 11:25 AM > Subject: [PATCH v2] vfio: allow secondary process to query IOMMU type >=20 > 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. >=20 > Fix this by allowing secondary process to query IOMMU type of > primary's default container at device initialization. >=20 > Note that this fix is assuming we're only interested in default > container. >=20 > Bugzilla ID: 174 >=20 > Fixes: 6bcb7c95fe14 ("vfio: share default container in multi-process") > Cc: dariusz.stojaczyk@intel.com > Cc: stable@dpdk.org >=20 > Signed-off-by: Anatoly Burakov > --- Reviewed-by: Darek Stojaczyk Thanks! In commit 6bcb7c95fe1 (vfio: share default container in multi-process) we f= ixed just the container fd and not the rte_vfio mapping APIs because we did= not even use those APIs in SPDK.