]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xen/arm: warn if dom0_mem is not specified
authorStefano Stabellini <sstabellini@kernel.org>
Tue, 28 Feb 2017 18:56:14 +0000 (10:56 -0800)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 28 Feb 2017 18:57:02 +0000 (10:57 -0800)
The default dom0_mem is 128M which is not sufficient to boot a Ubuntu
based Dom0. It is not clear what a better default value could be.

Instead, loudly warn the user when dom0_mem is unspecified and wait 3
secs. Then use 512M.

Update the docs to specify that dom0_mem is required on ARM. (The
current xen-command-line document does not actually reflect the current
behavior of dom0_mem on ARM correctly.)

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
docs/misc/xen-command-line.markdown
xen/arch/arm/domain_build.c

index 3acbb337878d4ce2b6bdf4c5ce2acf2fe62fec83..deeedf98099620b63dd69de9d684addcfde200cf 100644 (file)
@@ -603,7 +603,13 @@ For example, with `dom0_max_vcpus=4-8`:
 >      8    |  8
 >     10    |  8
 
-### dom0\_mem
+### dom0\_mem (ARM)
+> `= <size>`
+
+Set the amount of memory for the initial domain (dom0). It must be
+greater than zero. This parameter is required.
+
+### dom0\_mem (x86)
 > `= List of ( min:<size> | max:<size> | <size> )`
 
 Set the amount of memory for the initial domain (dom0). If a size is
index 048eb3987d2c388fd5b52ba44b3025a2d31b208b..de59e5fd0e388f19fbc4f4a101640407dec7b977 100644 (file)
@@ -12,6 +12,7 @@
 #include <xen/guest_access.h>
 #include <xen/iocap.h>
 #include <xen/acpi.h>
+#include <xen/warning.h>
 #include <acpi/actables.h>
 #include <asm/device.h>
 #include <asm/setup.h>
@@ -30,14 +31,11 @@ integer_param("dom0_max_vcpus", opt_dom0_max_vcpus);
 
 int dom0_11_mapping = 1;
 
-#define DOM0_MEM_DEFAULT 0x8000000 /* 128 MiB */
-static u64 __initdata dom0_mem = DOM0_MEM_DEFAULT;
+static u64 __initdata dom0_mem;
 
 static void __init parse_dom0_mem(const char *s)
 {
     dom0_mem = parse_size_and_unit(s, &s);
-    if ( dom0_mem == 0 )
-        dom0_mem = DOM0_MEM_DEFAULT;
 }
 custom_param("dom0_mem", parse_dom0_mem);
 
@@ -2125,6 +2123,12 @@ int construct_dom0(struct domain *d)
     BUG_ON(v->is_initialised);
 
     printk("*** LOADING DOMAIN 0 ***\n");
+    if ( dom0_mem <= 0 )
+    {
+        warning_add("PLEASE SPECIFY dom0_mem PARAMETER - USING 512M FOR NOW\n");
+        dom0_mem = MB(512);
+    }
+
 
     iommu_hwdom_init(d);