aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2011-08-22 10:16:15 +0100
committerDavid Vrabel <david.vrabel@citrix.com>2011-08-22 10:16:15 +0100
commitb7797d5854da9f382841d1d758f69c59b6b7616f (patch)
tree7d66a844dae0e057b0bf252939345d0a65937bdd
parent90a3c688f30c92cc943c2ac3307933eb9b4c5c52 (diff)
downloadxen-b7797d5854da9f382841d1d758f69c59b6b7616f.tar.gz
xen-b7797d5854da9f382841d1d758f69c59b6b7616f.tar.bz2
xen-b7797d5854da9f382841d1d758f69c59b6b7616f.zip
x86: use 'dom0_mem' to limit the number of pages for dom0
Use the 'dom0_mem' command line option to set the maximum number of pages for dom0. dom0 can use then use the XENMEM_maximum_reservation memory op to automatically find this limit and reduce the size of any page tables etc. Signed-off-by: David Vrabel <david.vrabel@citrix.com> xen-unstable changeset: 23779:c56dd5eb0fa2 xen-unstable date: Mon Aug 22 10:05:27 2011 +0100
-rw-r--r--xen/arch/x86/domain_build.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c
index 63adfa7d24..00cb3830d8 100644
--- a/xen/arch/x86/domain_build.c
+++ b/xen/arch/x86/domain_build.c
@@ -253,6 +253,8 @@ static unsigned long __init compute_dom0_nr_pages(
}
#endif
+ d->max_pages = min(max_pages, avail);
+
return nr_pages;
}