ia64/xen-unstable
changeset 7343:1fd8bd359118
Fix PAE overflow in xc_linux_build.
Signed-off-by: srparish@us.ibm.com
Signed-off-by: srparish@us.ibm.com
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Wed Oct 12 09:31:53 2005 +0100 (2005-10-12) |
parents | 0fd84f168103 |
children | 801ffcaa450b |
files | tools/libxc/xc_linux_build.c |
line diff
1.1 --- a/tools/libxc/xc_linux_build.c Wed Oct 12 09:29:52 2005 +0100 1.2 +++ b/tools/libxc/xc_linux_build.c Wed Oct 12 09:31:53 2005 +0100 1.3 @@ -500,11 +500,11 @@ static int setup_guest(int xc_handle, 1.4 _p(dsi.v_start), _p(v_end)); 1.5 printf(" ENTRY ADDRESS: %p\n", _p(dsi.v_kernentry)); 1.6 1.7 - if ( (v_end - dsi.v_start) > (nr_pages * PAGE_SIZE) ) 1.8 + if ( ((v_end - dsi.v_start)>>PAGE_SHIFT) > nr_pages ) 1.9 { 1.10 - PERROR("Initial guest OS requires too much space\n" 1.11 + printf("Initial guest OS requires too much space\n" 1.12 "(%luMB is greater than %luMB limit)\n", 1.13 - (v_end-dsi.v_start)>>20, (nr_pages<<PAGE_SHIFT)>>20); 1.14 + (v_end-dsi.v_start)>>20, nr_pages>>(20-PAGE_SHIFT)); 1.15 goto error_out; 1.16 } 1.17