Skip to content

Commit

Permalink
xen/setup: Fix for incorrect xen_extra_mem_start initialization under…
Browse files Browse the repository at this point in the history
… 32-bit

git commit 24bdb0b (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>
  • Loading branch information
Daniel Kiper authored and Konrad Rzeszutek Wilk committed May 12, 2011
1 parent 15bfc09 commit 0f16d0d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/x86/xen/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 0f16d0d

Please sign in to comment.