xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: xen-devel@lists.xen.org
Cc: Keir Fraser <keir@xen.org>,
	Ian Campbell <ian.campbell@citrix.com>,
	anup.patel@linaro.org, stefano.stabellini@eu.citrix.com,
	julien.grall@linaro.org, tim@xen.org
Subject: [PATCH 1/5] xen: correct xenheap_bits after "xen: support RAM at addresses 0 and 4096"
Date: Mon, 7 Oct 2013 12:38:12 +0100	[thread overview]
Message-ID: <1381145896-25890-1-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1381145870.21562.93.camel@kazak.uk.xensource.com>

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 <ian.campbell@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>
Cc: Tim Deegan <tim@xen.org>
---
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)
-- 
1.7.10.4

  reply	other threads:[~2013-10-07 11:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-07 11:37 [PATCH 0/5] xen: arm: fixups for systems with RAM above 4GB Ian Campbell
2013-10-07 11:38 ` Ian Campbell [this message]
2013-10-07 11:38 ` [PATCH 2/5] xen: arm: Enable 40 bit addressing in VTCR for arm64 Ian Campbell
2013-10-21 15:23   ` Julien Grall
2013-10-07 11:38 ` [PATCH 3/5] xen: arm: map entire memory banks on arm64 Ian Campbell
2013-10-07 11:38 ` [PATCH 4/5] xen: arm: make sure pagetable mask macros have appropriate size Ian Campbell
2013-10-21 15:29   ` Julien Grall
2013-10-21 15:53     ` Julien Grall
2013-10-22 10:18       ` Ian Campbell
2013-10-07 11:38 ` [PATCH 5/5] xen: arm: correctly round down MFN to 1GB boundary make sure pagetable mask macros as physaddr size Ian Campbell
2013-10-07 11:43 ` [PATCH 0/5] xen: arm: fixups for systems with RAM above 4GB Ian Campbell
2013-10-10  8:40   ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1381145896-25890-1-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=anup.patel@linaro.org \
    --cc=julien.grall@linaro.org \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).