From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel De Graaf Subject: Re: [PATCH 1/5] xen/netback: Use xenballooned pages for comms Date: Mon, 24 Oct 2011 17:47:40 -0400 Message-ID: <4EA5DCFC.1020400@tycho.nsa.gov> References: <1318969583-23902-1-git-send-email-dgdegra@tycho.nsa.gov> <1318969583-23902-2-git-send-email-dgdegra@tycho.nsa.gov> <1319015064.3385.80.camel@zakaz.uk.xensource.com> <4E9EE659.8090600@tycho.nsa.gov> <20111024214044.GJ2441@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20111024214044.GJ2441@phenom.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Konrad Rzeszutek Wilk Cc: "xen-devel@lists.xensource.com" , Ian Campbell , David Vrabel List-Id: xen-devel@lists.xenproject.org On 10/24/2011 05:40 PM, Konrad Rzeszutek Wilk wrote: >> (Will move to commit message). In PV guests, it is sufficient to only >> reserve kernel address space for grant mappings because Xen modifies the >> mappings directly. HVM guests require that Xen modify the GFN-to-MFN >> mapping, so the pages being remapped must already be allocated. Pages > > By allocated you mean the populate_physmap hypercall must happen before > the grant operations are done? > > (When I see allocated I think alloc_page, which I believe is _not_ what > you were saying). The pages must be valid kernel pages (with GFNs) which are actually obtained with alloc_page if the balloon doesn't have any sitting around for us. They must also *not* be populated in the physmap, which is why we grab them from the balloon and not from alloc_page directly. > >> obtained from alloc_xenballooned_pages have valid GFNs not currently >> mapped to an MFN, so are available to be used in grant mappings. >> >