[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 3/3] xen/x86: add CONFIG item for default dom0 memory size

With being able to specify a dom0_mem value depending on host memory
size make it easy for distros to specify a default dom0 size by adding
a CONFIG_DOM0_MEM item which presets the dom0_mem boot parameter value.

Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
 xen/arch/x86/Kconfig      | 9 +++++++++
 xen/arch/x86/dom0_build.c | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index 5c2d1070b6..a44f523730 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -176,6 +176,15 @@ config PV_SHIM_EXCLUSIVE
          firmware, and will not function correctly in other scenarios.
          If unsure, say N.
+config DOM0_MEM
+       string "Default value for dom0_mem boot parameter"
+       ---help---
+         Sets a default value for dom0_mem, e.g. "min:1G,max:64G,256M+10%".
+         See docs/misc/xen-command-line.markdown for the supported syntax.
+         Leave empty if you are not sure what to specify.
 source "common/Kconfig"
diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c
index 6929b204ef..7e3c215fbd 100644
--- a/xen/arch/x86/dom0_build.c
+++ b/xen/arch/x86/dom0_build.c
@@ -24,7 +24,7 @@ static long __initdata dom0_nrpages;
 static long __initdata dom0_min_nrpages;
 static long __initdata dom0_max_nrpages = LONG_MAX;
-static char __initdata dom0_mem_par[256];
+static char __initdata dom0_mem_par[256] = CONFIG_DOM0_MEM;
  * dom0_mem=[min:<min_amt>,][max:<max_amt>,][<amt>]

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.