public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Fix for xen guest with mem > 3.7G
@ 2008-09-13 19:16 Roberto De Ioris
  2008-09-13 21:09 ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 8+ messages in thread
From: Roberto De Ioris @ 2008-09-13 19:16 UTC (permalink / raw)
  To: jeremy, linux-kernel; +Cc: Mirko Iannella

Xen domU kernel 2.6.26 and 2.6.27-rc cannot allocate
more than 3.7GB of ram on my PAE systems (compiled
with gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)).

I have found the problem is in function xen_memory_setup (in
arch/x86/xen/setup.c).

It set max_pfn as 'unsigned long' but add_memory_region()
takes 'unsigned long long'.

I do not know if it is a compiler problem but this is the simple fix
(works on my systems):

--- setup.c.orig	2008-09-13 21:12:56.000000000 +0200
+++ setup.c	2008-09-13 20:35:29.000000000 +0200
@@ -36,7 +36,7 @@
 
 char * __init xen_memory_setup(void)
 {
-	unsigned long max_pfn = xen_start_info->nr_pages;
+	unsigned long long max_pfn = xen_start_info->nr_pages;
 
 	e820.nr_map = 0;
 	add_memory_region(0, LOWMEMSIZE(), E820_RAM);



-- 
Roberto De Ioris
http://unbit.it
JID: roberto@jabber.unbit.it


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-09-15  6:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-13 19:16 Fix for xen guest with mem > 3.7G Roberto De Ioris
2008-09-13 21:09 ` Jeremy Fitzhardinge
2008-09-14 13:21   ` Ingo Molnar
2008-09-14 14:42     ` [PATCH] xen: " Jeremy Fitzhardinge
2008-09-14 14:47       ` Ingo Molnar
2008-09-14 21:43       ` Roberto De Ioris
2008-09-15  6:09         ` Jeremy Fitzhardinge
2008-09-15  6:20           ` Roberto De Ioris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox