WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

Re: [Xen-ia64-devel] [Patch] Reseve memory of domain0 (fix dom0 boot pan

To: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [Patch] Reseve memory of domain0 (fix dom0 boot panic)
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Mon, 1 May 2006 20:13:11 +0900
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 01 May 2006 04:13:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <77C6687C83E9AAtakebe_akio@xxxxxxxxxxxxxx>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <77C6687C83E9AAtakebe_akio@xxxxxxxxxxxxxx>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
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