integer_param("dom0_max_vcpus", opt_dom0_max_vcpus);
static u64 __initdata dom0_mem;
+static bool __initdata dom0_mem_set;
static int __init parse_dom0_mem(const char *s)
{
+ dom0_mem_set = true;
+
dom0_mem = parse_size_and_unit(s, &s);
return *s ? -EINVAL : 0;
BUG_ON(d->domain_id != 0);
printk("*** LOADING DOMAIN 0 ***\n");
+
+ if ( !dom0_mem_set && CONFIG_DOM0_MEM[0] )
+ parse_dom0_mem(CONFIG_DOM0_MEM);
+
if ( dom0_mem <= 0 )
{
warning_add("PLEASE SPECIFY dom0_mem PARAMETER - USING 512M FOR NOW\n");
static struct memsize __initdata dom0_size;
static struct memsize __initdata dom0_min_size;
static struct memsize __initdata dom0_max_size = { .nr_pages = LONG_MAX };
+static bool __initdata dom0_mem_set;
static bool __init memsize_gt_zero(const struct memsize *sz)
{
{
int ret;
+ dom0_mem_set = true;
+
/* xen-shim uses shim_mem parameter instead of dom0_mem */
if ( pv_shim )
{
unsigned long avail = 0, nr_pages, min_pages, max_pages;
bool need_paging;
+ if ( !dom0_mem_set && CONFIG_DOM0_MEM[0] )
+ parse_dom0_mem(CONFIG_DOM0_MEM);
+
for_each_node_mask ( node, dom0_nodes )
avail += avail_domheap_pages_region(node, 0, 0) +
initial_images_nrpages(node);
This is used to work around broken bootloaders. This should
be set to 'N' under normal conditions.
+
+config DOM0_MEM
+ string "Default value for dom0_mem boot parameter"
+ default ""
+ ---help---
+ Sets a default value for dom0_mem, e.g. "512M".
+ The specified string will be used for the dom0_mem parameter in
+ case it was not specified on the command line.
+
+ See docs/misc/xen-command-line.markdown for the supported syntax.
+
+ Leave empty if you are not sure what to specify.
+
endmenu