From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 73D2C374F for ; Tue, 5 Sep 2017 06:14:11 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Sep 2017 21:14:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,478,1498546800"; d="scan'208";a="147484042" Received: from debian-zgviawfucg.sh.intel.com (HELO debian-ZGViaWFuCg) ([10.67.104.160]) by fmsmga005.fm.intel.com with ESMTP; 04 Sep 2017 21:14:08 -0700 Date: Tue, 5 Sep 2017 12:14:36 +0800 From: Tiwei Bie To: Maxime Coquelin Cc: dev@dpdk.org, yliu@fridaylinux.org, jfreiman@redhat.com, mst@redhat.com, vkaplans@redhat.com, jasowang@redhat.com Message-ID: <20170905041435.GA31895@debian-ZGViaWFuCg> References: <20170831095023.21037-1-maxime.coquelin@redhat.com> <20170831095023.21037-13-maxime.coquelin@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170831095023.21037-13-maxime.coquelin@redhat.com> User-Agent: Mutt/1.7.2 (2016-11-26) Subject: Re: [dpdk-dev] [PATCH 12/21] vhost: introduce guest IOVA to backend VA helper X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Sep 2017 04:14:11 -0000 On Thu, Aug 31, 2017 at 11:50:14AM +0200, Maxime Coquelin wrote: > This patch introduces vhost_iova_to_vva() function to translate > guest's IO virtual addresses to backend's virtual addresses. > > When IOMMU is enabled, the IOTLB cache is queried to get the > translation. If missing from the IOTLB cache, an IOTLB_MISS request > is sent to Qemu, and IOTLB cache is queried again on IOTLB event > notification. > > When IOMMU is disabled, the passed address is a guest's physical > address, so the legacy rte_vhost_gpa_to_vva() API is used. > > Signed-off-by: Maxime Coquelin > --- > lib/librte_vhost/vhost.c | 27 +++++++++++++++++++++++++++ > lib/librte_vhost/vhost.h | 3 +++ > 2 files changed, 30 insertions(+) > > diff --git a/lib/librte_vhost/vhost.c b/lib/librte_vhost/vhost.c > index bae98b02d..0e8c0386a 100644 > --- a/lib/librte_vhost/vhost.c > +++ b/lib/librte_vhost/vhost.c > @@ -48,9 +48,11 @@ > #include > #include > #include > +#include This header isn't needed. Best regards, Tiwei Bie