mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad@dumpdata.com, Rzeszutek@dumpdata.com, Wilk@dumpdata.com
To: stable@kernel.org, linux-kernel@vger.kernel.org
Cc: Daniel Kiper <dkiper@net-space.pl>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: [PATCH 2/2] xen/setup: Fix for incorrect xen_extra_mem_start initialization under 32-bit
Date: Wed, 25 May 2011 17:37:36 -0400	[thread overview]
Message-ID: <1306359456-3627-5-git-send-email-konrad.wilk@oracle.com> (raw)
In-Reply-To: <1306359456-3627-1-git-send-email-konrad.wilk@oracle.com>

From: Daniel Kiper <dkiper@net-space.pl>

git commit 24bdb0b62cc82120924762ae6bc85afc8c3f2b26 (xen: do not create
the extra e820 region at an addr lower than 4G) does not take into
account that ifdef CONFIG_X86_32 instead of e820_end_of_low_ram_pfn()
find_low_pfn_range() is called (both calls are from arch/x86/kernel/setup.c).
find_low_pfn_range() behaves correctly and does not require change in
xen_extra_mem_start initialization. Additionally, if xen_extra_mem_start
is initialized in the same way as ifdef CONFIG_X86_64 then memory hotplug
support for Xen balloon driver (under development) is broken.

Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 arch/x86/xen/setup.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index fba4a6c..ca6297b 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -227,7 +227,11 @@ char * __init xen_memory_setup(void)
 
 	memcpy(map_raw, map, sizeof(map));
 	e820.nr_map = 0;
+#ifdef CONFIG_X86_32
+	xen_extra_mem_start = mem_end;
+#else
 	xen_extra_mem_start = max((1ULL << 32), mem_end);
+#endif
 	for (i = 0; i < memmap.nr_entries; i++) {
 		unsigned long long end;
 
-- 
1.7.4.1


  parent reply	other threads:[~2011-05-25 21:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-25 21:37 [PATCH] Xen bug-fixes for 2.6.39 (already in 2.6.40) Konrad, Rzeszutek, Wilk
2011-05-25 21:37 ` [PATCH] xen mmu: fix a race window causing leave_mm BUG() Konrad, Rzeszutek, Wilk
2011-05-25 21:37 ` [PATCH] xen/p2m: Create entries in the P2M_MFN trees's to track 1-1 mappings Konrad, Rzeszutek, Wilk
2011-05-25 21:37 ` [PATCH 1/2] xen/setup: Ignore E820_UNUSABLE when setting " Konrad, Rzeszutek, Wilk
2011-05-25 21:37 ` Konrad, Rzeszutek, Wilk [this message]
2011-05-26  7:02 ` [stable] [PATCH] Xen bug-fixes for 2.6.39 (already in 2.6.40) Greg KH
2011-05-26 12:39   ` Konrad Rzeszutek Wilk
2011-05-26 12:44     ` Tian, Kevin
2011-05-26 13:14     ` Daniel Kiper
2011-05-30  9:40     ` Greg KH
2011-05-31 14:26       ` Konrad Rzeszutek Wilk

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=1306359456-3627-5-git-send-email-konrad.wilk@oracle.com \
    --to=konrad@dumpdata.com \
    --cc=Rzeszutek@dumpdata.com \
    --cc=Wilk@dumpdata.com \
    --cc=dkiper@net-space.pl \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@kernel.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

all inboxes | Powered by JetHome®