dom0 panic on xen-pae when dom0_mem=4096M
PATCH 1/1 dom0 panic on xen-pae when dom0_mem=4096M
When running on xen-pae, if you attempt to assign 4 GB of RAM to dom0 using "dom0_mem=4096M", a calculation wraps around to 0 and causes dom0 to panic early in the boot.
It appears that this problem was already fixed in the user-space domain builder. The attached patch brings the same fix into xen/arch/x86/domain_build.c.
Please apply to -3.0.3 and -unstable.
Signed-off-by Charles Coffing <[email protected]>
xen/arch/x86/domain_build.c +2 -2
@@ -429,11 +429,11 @@ int construct_dom0(struct domain *d, _p(dsi.v_start), _p(v_end));printk (" ENTRY ADDRESS: %p\n" ,_p (dsi.v_kernentry)); -if ( (v_end - dsi.v_start) > (nr_pages *PAGE_SIZE ) ) +if ( ((v_end - dsi.v_start)>>PAGE_SHIFT ) > nr_pages ) {printk ("Initial guest OS requires too much space\n" "(%luMB is greater than %luMB limit)\n" , - (v_end-dsi.v_start)>>20 , (nr_pages<<PAGE_SHIFT )>>20 ); + (v_end-dsi.v_start)>>20 , nr_pages>>(20 -PAGE_SHIFT ));return -ENOMEM ; }
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel