Message ID | 20211011075942.38180-1-xuan.ding@intel.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 505CDA034F; Mon, 11 Oct 2021 10:09:22 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D8D3B410DB; Mon, 11 Oct 2021 10:09:21 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 366A640E0F for <dev@dpdk.org>; Mon, 11 Oct 2021 10:09:19 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10133"; a="227111452" X-IronPort-AV: E=Sophos;i="5.85,364,1624345200"; d="scan'208";a="227111452" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2021 01:09:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,364,1624345200"; d="scan'208";a="490375538" Received: from dpdk-xuanding-dev2.sh.intel.com ([10.67.119.250]) by orsmga008.jf.intel.com with ESMTP; 11 Oct 2021 01:09:13 -0700 From: Xuan Ding <xuan.ding@intel.com> To: dev@dpdk.org, anatoly.burakov@intel.com, maxime.coquelin@redhat.com, chenbo.xia@intel.com Cc: jiayu.hu@intel.com, cheng1.jiang@intel.com, bruce.richardson@intel.com, sunil.pai.g@intel.com, yinan.wang@intel.com, yvonnex.yang@intel.com, Xuan Ding <xuan.ding@intel.com> Date: Mon, 11 Oct 2021 07:59:40 +0000 Message-Id: <20211011075942.38180-1-xuan.ding@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210901053044.109901-1-xuan.ding@intel.com> References: <20210901053044.109901-1-xuan.ding@intel.com> Subject: [dpdk-dev] [PATCH v7 0/2] Support IOMMU for DMA device X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
Support IOMMU for DMA device
|
|
Message
Ding, Xuan
Oct. 11, 2021, 7:59 a.m. UTC
This series supports DMA device to use vfio in async vhost. The first patch extends the capability of current vfio dma mapping API to allow partial unmapping for adjacent memory if the platform does not support partial unmapping. The second patch involves the IOMMU programming for guest memory in async vhost. v7: * Fix an operator error. v6: * Fix a potential memory leak. v5: * Fix issue of a pointer be freed early. v4: * Fix a format issue. v3: * Move the async_map_status flag to virtio_net structure to avoid ABI breaking. v2: * Add rte_errno filtering for some devices bound in the kernel driver. * Add a flag to check the status of region mapping. * Fix one typo. Xuan Ding (2): vfio: allow partially unmapping adjacent memory vhost: enable IOMMU for async vhost lib/eal/linux/eal_vfio.c | 338 ++++++++++++++++++++++++++------------- lib/vhost/vhost.h | 4 + lib/vhost/vhost_user.c | 116 +++++++++++++- 3 files changed, 346 insertions(+), 112 deletions(-)
Comments
On 10/11/21 09:59, Xuan Ding wrote: > This series supports DMA device to use vfio in async vhost. > > The first patch extends the capability of current vfio dma mapping > API to allow partial unmapping for adjacent memory if the platform > does not support partial unmapping. The second patch involves the > IOMMU programming for guest memory in async vhost. > > v7: > * Fix an operator error. > > v6: > * Fix a potential memory leak. > > v5: > * Fix issue of a pointer be freed early. > > v4: > * Fix a format issue. > > v3: > * Move the async_map_status flag to virtio_net structure to avoid > ABI breaking. > > v2: > * Add rte_errno filtering for some devices bound in the kernel driver. > * Add a flag to check the status of region mapping. > * Fix one typo. > > Xuan Ding (2): > vfio: allow partially unmapping adjacent memory > vhost: enable IOMMU for async vhost > > lib/eal/linux/eal_vfio.c | 338 ++++++++++++++++++++++++++------------- > lib/vhost/vhost.h | 4 + > lib/vhost/vhost_user.c | 116 +++++++++++++- > 3 files changed, 346 insertions(+), 112 deletions(-) > Applied to dpdk-next-virtio/main. Thanks, Maxime