|  |  | 
  
    |  |  | 
 
  |   |  | 
  
    |  |  | 
  
    |  |  | 
  
    |   xen-ia64-devel
Re: [Xen-ia64-devel] [Patch] Reseve memory of domain0 (fix dom0 boot	pan 
| 
Hi Takebe.
On Wed, Apr 26, 2006 at 12:25:42AM +0900, Akio Takebe wrote:
Content-Description: Mail message body
> Our patch fix domain0 boot panic on large memory system. 
> (e.g. amount of installed memory is 16GB) 
> Memory of domain0 is not reserved now. 
> Our patch can make this memory reserved. 
Why does the region need reservation?
dom0/initrd images are copied by construct_dom0().
The dom0/initrd regions must not be used before contruct_dom0(),
but they can be used after construct_dom0().
> And we clean up initrd_start of domain0.
diff -r de0c04ed4ab7 xen/arch/ia64/xen/dom_fw.c
--- a/xen/arch/ia64/xen/dom_fw.c        Fri Apr 21 10:40:17 2006 -0600
+++ b/xen/arch/ia64/xen/dom_fw.c        Tue Apr 25 23:23:38 2006 +0900
@@ -896,8 +896,7 @@ dom_fw_init (struct domain *d, const cha
        bp->console_info.orig_y = 24;
        bp->fpswa = 0;
        if (d == dom0) {
-               bp->initrd_start = (dom0_start+dom0_size) -
-                 (PAGE_ALIGN(ia64_boot_param->initrd_size) + 4*1024*1024);
+               bp->initrd_start = ia64_boot_param->initrd_start;
                bp->initrd_size = ia64_boot_param->initrd_size;
        }
        else {
The above change is wrong. Please backout or fix somehow.
With P=M model it works but it isn't right. It breaks the P2M/VP patches.
Please see construct_dom0().
int construct_dom0()
...
        pstart_info = PAGE_ALIGN(pkern_end);
        if(initrd_start && initrd_len){
            unsigned long offset;
            pinitrd_start= (dom0_start + dom0_size) -
                           (PAGE_ALIGN(initrd_len) + 4*1024*1024);
            if (pinitrd_start <= pstart_info)
                panic("%s:enough memory is not assigned to dom0", __func__);
            for (offset = 0; offset < initrd_len; offset += PAGE_SIZE) {
                struct page_info *p;
                p = assign_new_domain_page(d, pinitrd_start + offset);
                if (p == NULL)
                    panic("%s: can't allocate page for initrd image", __func__);
                if (initrd_len < offset + PAGE_SIZE)
                    memcpy(page_to_virt(p), (void*)(initrd_start + offset),
                           initrd_len - offset);
                else
                    copy_page(page_to_virt(p), (void*)(initrd_start + offset));
            }
        }
-- 
yamahata
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
 | 
 
| <Prev in Thread] | Current Thread | [Next in Thread> |  | 
Re: [Xen-ia64-devel] [Patch] Reseve memory of domain0 (fix dom0 boot	panic),
Isaku Yamahata <=
 |  |  | 
  
    |  |  |