diff --git a/xen/common/device-tree/bootfdt.c b/xen/common/device-tree/bootfdt.c index 9ce7699833..70d79cfc06 100644 --- a/xen/common/device-tree/bootfdt.c +++ b/xen/common/device-tree/bootfdt.c @@ -471,6 +471,12 @@ static int __init process_domain_node(const void *fdt, int node, /* No "xen,static-mem" present. */ return 0; + if ( !IS_ENABLED(CONFIG_STATIC_MEMORY) ) + { + printk("CONFIG_STATIC_MEMORY must be enabled for parsing xen,static-mem\n"); + return -EINVAL; + } + return device_tree_get_meminfo(fdt, node, "xen,static-mem", address_cells, size_cells, bootinfo_get_reserved_mem(), MEMBANK_STATIC_DOMAIN);