From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tiwei Bie Subject: Re: [PATCH 12/21] vhost: introduce guest IOVA to backend VA helper Date: Tue, 5 Sep 2017 12:14:36 +0800 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 Cc: dev@dpdk.org, yliu@fridaylinux.org, jfreiman@redhat.com, mst@redhat.com, vkaplans@redhat.com, jasowang@redhat.com To: Maxime Coquelin 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) Content-Disposition: inline In-Reply-To: <20170831095023.21037-13-maxime.coquelin@redhat.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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