direct-io.hg

changeset 11747:7f6ae888fb7a

[XEN] Fix booting with dom0_mem specifying 4GB or more.
Signed-off-by: Charles Coffing <ccoffing@novell.com>
author kfraser@localhost.localdomain
date Thu Oct 12 14:27:20 2006 +0100 (2006-10-12)
parents d13809a631b0
children af1aa35265eb
files xen/arch/x86/domain_build.c
line diff
     1.1 --- a/xen/arch/x86/domain_build.c	Thu Oct 12 14:25:51 2006 +0100
     1.2 +++ b/xen/arch/x86/domain_build.c	Thu Oct 12 14:27:20 2006 +0100
     1.3 @@ -401,11 +401,11 @@ int construct_dom0(struct domain *d,
     1.4             _p(dsi.v_start), _p(v_end));
     1.5      printk(" 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          printk("Initial guest OS requires too much space\n"
    1.11                 "(%luMB is greater than %luMB limit)\n",
    1.12 -               (v_end-dsi.v_start)>>20, (nr_pages<<PAGE_SHIFT)>>20);
    1.13 +               (v_end-dsi.v_start)>>20, nr_pages>>(20-PAGE_SHIFT));
    1.14          return -ENOMEM;
    1.15      }
    1.16