aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/domain_build.c
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2011-08-22 10:05:27 +0100
committerDavid Vrabel <david.vrabel@citrix.com>2011-08-22 10:05:27 +0100
commitae8f370c14acf1c326a5e0ab8c505414600ff3c0 (patch)
tree1e1b80cb32cc97bb66a934c316a8d359380d7e88 /xen/arch/x86/domain_build.c
parent1db50df4870b5672b3fd5688cb8e6b9c1523f7c2 (diff)
downloadxen-ae8f370c14acf1c326a5e0ab8c505414600ff3c0.tar.gz
xen-ae8f370c14acf1c326a5e0ab8c505414600ff3c0.tar.bz2
xen-ae8f370c14acf1c326a5e0ab8c505414600ff3c0.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>
Diffstat (limited to 'xen/arch/x86/domain_build.c')
-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 d7697e562b..f818f0b876 100644
--- a/xen/arch/x86/domain_build.c
+++ b/xen/arch/x86/domain_build.c
@@ -254,6 +254,8 @@ static unsigned long __init compute_dom0_nr_pages(
}
#endif
+ d->max_pages = min(max_pages, avail);
+
return nr_pages;
}