From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 8/8] xen: arm: allocate more than one bank for 1:1 domain 0 if needed Date: Wed, 11 Jun 2014 23:47:39 +0100 Message-ID: <5398DC8B.5020706@linaro.org> References: <1402504640.16332.50.camel@kazak.uk.xensource.com> <1402504804-29173-8-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1402504804-29173-8-git-send-email-ian.campbell@citrix.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 , xen-devel@lists.xen.org Cc: tim@xen.org, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org Hi Ian, On 11/06/14 17:40, Ian Campbell wrote: > + bank->start = start; > + bank->size = size; > + kinfo->mem.nr_banks++; > + return true; > + } > + > + panic("Failed add pages to DOM0 memory bank"); This can happen when there is no more bank, right? How likely will Xen fill the 8 banks? Shall we just continue with only the current number of bank? > +} > + > +/* > + * This is all pretty horrible. > + * > + * Requirements: > + * > + * 1. The dom0 kernel should be loaded within the first 128MB of RAM. This > + * is necessary at least for Linux zImage kernels, which are all we > + * support today. > + * 2. We want to put the dom0 kernel, ramdisk and DTB in the same > + * bank. Partly this is just easier for us to deal with, but also > + * the ramdisk and DTB must be placed within a certain proximity of > + * the kernel within RAM. > + * 3. For 32-bit dom0 we want to place as much of the RAM as we > + * reasonably can below 4GB, so that it can be used by non-LPAE > + * enabled kernels. > + * 4. For 32-bit dom0 the kernel must be located below 4GB. > + * 5. We want to have a few largers banks rather than many smaller ones. > + * > + * For the first two requirements we need to make sure that the lowest > + * bank is sufficiently large. > + * > + * For convenience we also sort the banks by physical address. IIRC, some kernel version (< 3.15) is assuming that the memory bank are ordered. Regards, -- Julien Grall