From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AB29911745; Mon, 26 Sep 2016 20:17:31 +0000 (UTC) Received: from [10.36.4.83] (vpn1-4-83.ams2.redhat.com [10.36.4.83]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8QKHTr7007387 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 26 Sep 2016 16:17:30 -0400 To: Yuanhan Liu , dev@dpdk.org 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> From: Maxime Coquelin Message-ID: Date: Mon, 26 Sep 2016 22:17:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1474604007-5221-3-git-send-email-yuanhan.liu@linux.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 26 Sep 2016 20:17:31 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v2 2/7] vhost: get guest/host physical address mappings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 20:17:32 -0000 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