xen/arm: warn if dom0_mem is not specified
PATCH v2 1/1 xen/arm: warn if dom0_mem is not specified
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, loadly warn the user when dom0_mem is unspecified and wait 3 secs. Then use 512M.
Signed-off-by Stefano Stabellini <[email protected]>
--- xen/arch/arm/domain_build.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-)
xen/arch/arm/domain_build.c +17 -5
@@ -1,4 +1,5 @@#include <xen/config.h> +#include <xen/delay.h> #include <xen/init.h> #include <xen/compile.h> #include <xen/lib.h>
@@ -31,14 +32,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,7 +2123,21 @@ int construct_dom0(struct domain *d)BUG_ON (d->vcpu[0 ] ==NULL );BUG_ON (v->is_initialised); -printk ("*** LOADING DOMAIN 0 ***\n" ); +if ( dom0_mem >0 ) +printk ("*** LOADING DOMAIN 0 ***\n" ); +else + { +int i; +printk ("*** PLEASE SPECIFY dom0_mem PARAMETER - USING 512M FOR NOW ***\n" ); +for (i =0 ; i <3 ; i++) + { +printk ("%d..." , i+1 ); +mdelay (1000 ); + } +printk ("\n" ); + dom0_mem =MB (512 ); + } +iommu_hwdom_init (d);
Signature · 7 lines
1.9.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Hi Stefano,
Quoted 9 lines · Stefano Stabellini
The default
dom0_memis 128M which is not sufficient to boot a Ubuntu based Dom0. It is not clear what a better default value could be.Instead, loadly warn the user when
dom0_memis unspecified and wait 3 secs. Then use 512M.Signed-off-by Stefano Stabellini <[email protected]>--- xen/arch/arm/domain_build.c | 22 +++++++++++++++++-----
Please update the documentation in docs/misc/xen-commandline.markdown.
Cheers,
Quoted 52 lines
1 file changed, 17 insertions(+), 5 deletions(-)xen/arch/arm/domain_build.c +17
-5@@ -1,4 +1,5 @@#include <xen/config.h> +#include <xen/delay.h> #include <xen/init.h> #include <xen/compile.h> #include <xen/lib.h> @@ -31,14 +32,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,7 +2123,21 @@ int construct_dom0(struct domain *d)BUG_ON (d->vcpu[0 ] ==NULL );BUG_ON (v->is_initialised); -printk ("*** LOADING DOMAIN 0 ***\n" ); +if ( dom0_mem >0 ) +printk ("*** LOADING DOMAIN 0 ***\n" ); +else + { +int i; +printk ("*** PLEASE SPECIFY dom0_mem PARAMETER - USING 512M FOR NOW ***\n" ); +for (i =0 ; i <3 ; i++) + { +printk ("%d..." , i+1 ); +mdelay (1000 ); + } +printk ("\n" ); + dom0_mem =MB (512 ); + } +iommu_hwdom_init (d);
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel