From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v2 8/8] xen: arm: allocate more than one bank for 1:1 domain 0 if needed Date: Wed, 18 Jun 2014 10:36:47 +0100 Message-ID: <1403084207.11778.5.camel@kazak.uk.xensource.com> References: <1402504640.16332.50.camel@kazak.uk.xensource.com> <1402504804-29173-8-git-send-email-ian.campbell@citrix.com> <53A081CC.2090808@linaro.org> <1403080054.25771.43.camel@kazak.uk.xensource.com> <53A15785.1040401@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53A15785.1040401@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, 2014-06-18 at 10:10 +0100, Julien Grall wrote: > > On 18/06/14 09:27, Ian Campbell wrote: > > On Tue, 2014-06-17 at 18:58 +0100, Julien Grall wrote: > >> Hi Ian, > >> > >> On 06/11/2014 05:40 PM, Ian Campbell wrote: > >>> + /* > >>> + * First try and allocate the largest thing we can as low as > >>> + * possible to be bank 0. > >>> + */ > >>> + while ( order > min_low_order ) > >>> + { > >>> + for ( bits = order ; bits < (lowmem ? 32 : PADDR_BITS); bits++ ) > >>> + { > >>> + pg = alloc_domheap_pages(d, order, MEMF_bits(bits)); > >>> + if ( pg != NULL ) > >>> + goto got_bank0; > >>> + } > >>> + order--; > >>> + } > >>> + > >>> + panic("Unable to allocate first memory bank"); > >> > >> I gave a try to this patch in stand-alone on the versatile express and I > >> hit this panic. > >> > >> Xen is trying to allocate 128Mb for the first bank. It was working > >> without this patch. > > > > What is your dom0_mem and how much ram does the system have? > > I use the default value from Xen i.e 128MB. The platform has 1GB of RAM > (see below Xen log with early printk enabled). Thanks, how strange. Perhaps I got min_low_order wrong, or that loop is knackered in some way. I'll check.