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

Hi, Isaku

>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().
Yes, dom0/inird images are copied by construct_dom0().
But the region is clean up by init_virtual_frametable() 
before construct_dom0 is called.
So the region need reservation.

I have the following error message at that time.
        (XEN) Boot processor id 0x0/0xc418
        (XEN) SMP mode deactivated.
        (XEN) num_online_cpus=1, max_cpus=0
        (XEN) Brought up 1 CPUs
        (XEN) Total of 1 processors activated (0.26 BogoMIPS).
        (XEN) About to call sort_main_extable()
        (XEN) Maximum number of domains: 63; 18 RID bits per domain
        (XEN) About to call domain_create()
        (XEN) ### domain f0000000041356b8: rid=40000-80000 mp_rid=1000
        (XEN) arch_domain_create: domain=f0000000041356b8
        (XEN) About to call construct_dom0()
        (XEN) *** LOADING DOMAIN 0 ***
        (XEN) 
        (XEN) ****************************************
        (XEN) Panic on CPU 0:
        (XEN) Could not set up DOM0 guest OS
        (XEN) ****************************************
        (XEN) 
        (XEN) Reboot in five seconds...
        (XEN) machine_restart called: spinning....


>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().
I attach a patch which fix the above bug.
Am I correct?

Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>

diff -r adb151aaf3f8 xen/arch/ia64/xen/dom_fw.c
--- a/xen/arch/ia64/xen/dom_fw.c        Wed Apr 26 20:55:42 2006 -0600
+++ b/xen/arch/ia64/xen/dom_fw.c        Wed May  3 14:29:26 2006 +0900
@@ -1019,7 +1019,8 @@ dom_fw_init (struct domain *d, const cha
        if (d == dom0) {
                // XXX CONFIG_XEN_IA64_DOM0_VP
                // initrd_start address is hard coded in start_kernel()
-               bp->initrd_start = ia64_boot_param->initrd_start;
+               bp->initrd_start = (dom0_start+dom0_size) -
+                 (PAGE_ALIGN(ia64_boot_param->initrd_size) + 4*1024*1024);
                bp->initrd_size = ia64_boot_param->initrd_size;
        }
        else {
diff -r adb151aaf3f8 xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c      Wed Apr 26 20:55:42 2006 -0600
+++ b/xen/arch/ia64/xen/xensetup.c      Wed May  3 14:29:26 2006 +0900
@@ -415,8 +415,7 @@ printk("About to call domain_create()\n"
     printk("About to call construct_dom0()\n");
     dom0_memory_start = (unsigned long) __va(initial_images_start);
     dom0_memory_size = ia64_boot_param->domain_size;
-    dom0_initrd_start = (unsigned long) __va(initial_images_start +
-                            PAGE_ALIGN(ia64_boot_param->domain_size));
+    dom0_initrd_start = (unsigned long) __va(ia64_boot_param->initrd_start);
     dom0_initrd_size = ia64_boot_param->initrd_size;
  
     if ( construct_dom0(dom0, dom0_memory_start, dom0_memory_size,

Best Regards,

Akio Takebe

Attachment: fix_initrd_start.patch
Description: Binary data

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel