From: Maxime Coquelin Subject: Re: [PATCH v2 2/7] vhost: get guest/host physical address mappings Date: Mon, 26 Sep 2016 22:17:29 +0200 Message-ID: References: <1471939839-29778-1-git-send-email-yuanhan.liu@linux.intel.com> <1474604007-5221-1-git-send-email-yuanhan.liu@linux.intel.com> <1474604007-5221-3-git-send-email-yuanhan.liu@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit To: Yuanhan Liu , dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 342682B8C for ; Mon, 26 Sep 2016 22:17:32 +0200 (CEST) In-Reply-To: <1474604007-5221-3-git-send-email-yuanhan.liu@linux.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 09/23/2016 06:13 AM, Yuanhan Liu wrote: > So that we can convert a guest physical address to host physical > address, which will be used in later Tx zero copy implementation. > > MAP_POPULATE is set while mmaping guest memory regions, to make > sure the page tables are setup and then rte_mem_virt2phy() could > yield proper physical address. > > Signed-off-by: Yuanhan Liu > --- > > v2: - use MAP_POPULATE option to make sure the page table will > be already setup while getting the phys address > > - do a simple merge if the last 2 pages are continuous > > - dump guest pages only in debug mode > --- > lib/librte_vhost/vhost.h | 30 +++++++++++++ > lib/librte_vhost/vhost_user.c | 100 +++++++++++++++++++++++++++++++++++++++++- > 2 files changed, 128 insertions(+), 2 deletions(-) Reviewed-by: Maxime Coquelin Thanks, Maxime