From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: Claim mode and HVM PoD interact badly Date: Fri, 10 Jan 2014 15:19:10 +0000 Message-ID: <20140110151910.GD30581@zion.uk.xensource.com> References: <20140110115638.GG29180@zion.uk.xensource.com> <1389355182.19142.38.camel@kazak.uk.xensource.com> <20140110145807.GB19124@phenom.dumpdata.com> <1389366985.19142.64.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1389366985.19142.64.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: George Dunlap , Ian Jackson , xen-devel@lists.xen.org, Wei Liu List-Id: xen-devel@lists.xenproject.org On Fri, Jan 10, 2014 at 03:16:25PM +0000, Ian Campbell wrote: [...] > > diff --git a/tools/libxc/xc_hvm_build_x86.c b/tools/libxc/xc_hvm_build_x86.c > > index 77bd365..65e9577 100644 > > --- a/tools/libxc/xc_hvm_build_x86.c > > +++ b/tools/libxc/xc_hvm_build_x86.c > > @@ -335,7 +335,12 @@ static int setup_guest(xc_interface *xch, > > > > /* try to claim pages for early warning of insufficient memory available */ > > if ( claim_enabled ) { > > - rc = xc_domain_claim_pages(xch, dom, nr_pages - cur_pages); > > + unsigned long nr = nr_pages - cur_pages; > > + > > + if ( pod_mode ) > > + nr = target_pages - 0x20; > > 0x20? > 128K VGA hole. :-) Wei. > > + > > + rc = xc_domain_claim_pages(xch, dom, nr); > > if ( rc != 0 ) > > { > > PERROR("Could not allocate memory for HVM guest as we cannot claim memory!"); >