From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH 1/6] xen: correct xenheap_bits after "xen: support RAM at addresses 0 and 4096" Date: Thu, 10 Oct 2013 16:14:18 +0100 Message-ID: References: <1381416225-31043-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1381416225-31043-1-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: julien.grall@linaro.org, tim@xen.org, Pranavkumar Sawargaonkar , Anup Patel , stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On 10/10/2013 15:43, "Ian Campbell" wrote: > This is incorrect after commit 1aac966e24e which shuffled the zones up by one. > I've observed failures on arm64 systems with RAM at 0x8,00000000-0x8,7fffffff > since xenheap_bits ends up as 35 instead of 36 (which is the zone with all the > RAM). > > Signed-off-by: Ian Campbell > Reviewed-by: Jan Beulich > Cc: Keir Fraser > Cc: Tim Deegan Acked-by: Keir Fraser > --- > I suppose that MEMZONE_XEN is not really useful when !CONFIG_SEPARATE_XENHEAP > so in principal 1aac966e24e could be make conditional, but in reality > MEMZONE_XEN is at least referenced when !CONFIG_SEPARATE_XENHEAP so at least > some other cleanup would be needed. This fix seems simpler/clearer. > --- > xen/common/page_alloc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c > index fb8187b..4c17fbd 100644 > --- a/xen/common/page_alloc.c > +++ b/xen/common/page_alloc.c > @@ -1364,7 +1364,7 @@ static unsigned int __read_mostly xenheap_bits; > > void __init xenheap_max_mfn(unsigned long mfn) > { > - xenheap_bits = fls(mfn) + PAGE_SHIFT - 1; > + xenheap_bits = fls(mfn) + PAGE_SHIFT; > } > > void init_xenheap_pages(paddr_t ps, paddr_t pe)