x86: don't limit dom0's maximum reservation by the available memory
authorDavid Vrabel <david.vrabel@citrix.com>
Wed, 24 Aug 2011 08:33:10 +0000 (09:33 +0100)
committerDavid Vrabel <david.vrabel@citrix.com>
Wed, 24 Aug 2011 08:33:10 +0000 (09:33 +0100)
Set dom0's initial maximum reservation using the max value supplied in
the dom0_mem command line option without limiting it by the available
memory.

This allows dom0 to make use of any hotplugged memory without having
to also adjust the maximum reservation.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Jan Beulich <jbeulich@novell.com>
xen/arch/x86/domain_build.c

index f818f0b87661c289f46ee2c6d5b4ed57517e944f..a2cebb7c214cb94be716712e5dceabefe4ef6554 100644 (file)
@@ -254,7 +254,7 @@ static unsigned long __init compute_dom0_nr_pages(
     }
 #endif
 
-    d->max_pages = min(max_pages, avail);
+    d->max_pages = min_t(unsigned long, max_pages, UINT_MAX);
 
     return nr_pages;
 }