From: David Vrabel Date: Mon, 22 Aug 2011 09:05:27 +0000 (+0100) Subject: x86: use 'dom0_mem' to limit the number of pages for dom0 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~9953 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ae8f370c14acf1c326a5e0ab8c505414600ff3c0;p=xen.git 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 --- 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; }