From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6E575A0547; Mon, 21 Jun 2021 05:58:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF8D240040; Mon, 21 Jun 2021 05:58:01 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 2E49D4003F for ; Mon, 21 Jun 2021 05:57:59 +0200 (CEST) IronPort-SDR: N4LeDAQX1cUKTBl60ELEc2S2uWQMZVX+eUQ5BDYsTW0vIoL6o0/sqNr9OXkG3m/Nxp/8y575hG 8hDSZvrnmcog== X-IronPort-AV: E=McAfee;i="6200,9189,10021"; a="270617310" X-IronPort-AV: E=Sophos;i="5.83,288,1616482800"; d="scan'208";a="270617310" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jun 2021 20:57:58 -0700 IronPort-SDR: s0GFhOYNVqJsJQ2e/67JvGLeT3hlzTkolbKtgQzYJHuqK1Ap0zKVHo2JaL367Na2uWzIP06LMF wyStwCcPSBuw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,288,1616482800"; d="scan'208";a="422804234" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga002.jf.intel.com with ESMTP; 20 Jun 2021 20:57:58 -0700 Received: from shsmsx602.ccr.corp.intel.com (10.109.6.142) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Sun, 20 Jun 2021 20:57:57 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by SHSMSX602.ccr.corp.intel.com (10.109.6.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Mon, 21 Jun 2021 11:57:55 +0800 Received: from shsmsx606.ccr.corp.intel.com ([10.109.6.216]) by SHSMSX606.ccr.corp.intel.com ([10.109.6.216]) with mapi id 15.01.2242.008; Mon, 21 Jun 2021 11:57:55 +0800 From: "Hu, Jiayu" To: Maxime Coquelin , "Ding, Xuan" , "Xia, Chenbo" CC: "dev@dpdk.org" , "Pai G, Sunil" , "Richardson, Bruce" , "Van Haaren, Harry" , "Liu, Yong" Thread-Topic: [PATCH v3] vhost: enable IOMMU for async vhost Thread-Index: AQHXWFTU3vIMZkCvbU+ge7DYUQaKSKsZhCAAgARVcmA= Date: Mon, 21 Jun 2021 03:57:55 +0000 Message-ID: <8ece50c8f9094b20b9ab221dafad3f40@intel.com> References: <20210531150629.35020-1-xuan.ding@intel.com> <20210603173023.10487-1-xuan.ding@intel.com> <302392cf-6643-a290-1050-27b0a592e74e@redhat.com> In-Reply-To: <302392cf-6643-a290-1050-27b0a592e74e@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3] vhost: enable IOMMU for async vhost X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" SGkgTWF4aW1lLA0KDQo+IC0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQo+IEZyb206IE1heGlt ZSBDb3F1ZWxpbiA8bWF4aW1lLmNvcXVlbGluQHJlZGhhdC5jb20+DQo+IFNlbnQ6IFNhdHVyZGF5 LCBKdW5lIDE5L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