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-ppc-devel

Re: [XenPPC] [xenppc-unstable] [POWERPC][TOOLS] flatdevtree requires us

To: "Dan E. Poff" <poff@xxxxxxxxxx>
Subject: Re: [XenPPC] [xenppc-unstable] [POWERPC][TOOLS] flatdevtree requires us to reserve the ramdisk
From: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Date: Sat, 16 Sep 2006 09:51:31 -0400
Cc: xen-ppc-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sat, 16 Sep 2006 06:51:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <E1GOaPJ-0000kb-8h@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
References: <E1GOaPJ-0000kb-8h@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
The changeset below solve the ramdisk freeing error we see on DomUs.
This issue hit Dan consistently so we adjusted his Dom1 script to allocate more memory which allowed his linux to be usable. Dan, please pull/rebuild and change your memory back to 64 MiB and see if this solves the big problem you were having and please post results (hopefully closing the bug) in bugzilla.

Thanks

Here is the message I'm speaking of in case you forgot it.

Bad page state in process 'swapper'
page:c0000000007de000 flags:0x0000100000080000 mapping: 0000000000000000 mapcount:0 count:0
Trying to fix it up, but a reboot is needed
Backtrace:
Call Trace:
[C00000000089BBA0] [C00000000000F844] .show_stack+0x54/0x1f0 (unreliable)
[C00000000089BC50] [C000000000094B90] .bad_page+0x70/0xd0
[C00000000089BCD0] [C00000000009577C] .free_hot_cold_page+0x1fc/0x210
[C00000000089BD70] [C0000000000332BC] .free_initrd_mem+0x10c/0x150
[C00000000089BE10] [C000000000558900] .free_initrd+0x70/0x130
[C00000000089BEB0] [C0000000000092D8] .init+0x168/0x430
[C00000000089BF90] [C000000000028F54] .kernel_thread+0x4c/0x68

-JX

On Sep 16, 2006, at 9:40 AM, Xen patchbot-xenppc-unstable wrote:

# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID 7a20fed8be73857abe33d308ed27099efbff4a3c
# Parent  1d9c135673e4db41789d730d843c9e5f8de3a4eb
[POWERPC][TOOLS] flatdevtree requires us to reserve the ramdisk

The following patch solves the DomU:
  Freeing initrd memory: 3137k freed
  Bad page state in process 'swapper'

error message that was cause by not reserving the memory in the
flattened device tree.

We have to pre-reserve these entries when we create the tree in
FlatDeviceTree.py and fix it later because there appears to be no way
to add a reservation in libxc.

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 tools/libxc/powerpc64/xc_linux_build.c  |    8 +++++++-
 tools/python/xen/xend/FlatDeviceTree.py |    8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff -r 1d9c135673e4 -r 7a20fed8be73 tools/libxc/powerpc64/ xc_linux_build.c --- a/tools/libxc/powerpc64/xc_linux_build.c Fri Sep 15 18:20:55 2006 -0400 +++ b/tools/libxc/powerpc64/xc_linux_build.c Sat Sep 16 09:34:26 2006 -0400
@@ -208,6 +208,12 @@ static int load_devtree(
         return rc;
     }

+    rc = ft_set_rsvmap(devtree, 1, initrd_base, initrd_len);
+    if (rc < 0) {
+        DPRINTF("couldn't set initrd reservation\n");
+        return ~0UL;
+    }
+
     /* start-info (XXX being removed soon) */
     rc = ft_set_prop(&devtree, xen, "start-info",
             start_info, sizeof(start_info));
@@ -379,7 +385,7 @@ static unsigned long create_start_info(v

     rc = ft_set_rsvmap(devtree, 0, si_addr, 4*PAGE_SIZE);
     if (rc < 0) {
-        DPRINTF("couldn't set first reservation\n");
+        DPRINTF("couldn't set start_info reservation\n");
         return ~0UL;
     }

diff -r 1d9c135673e4 -r 7a20fed8be73 tools/python/xen/xend/ FlatDeviceTree.py --- a/tools/python/xen/xend/FlatDeviceTree.py Fri Sep 15 18:20:55 2006 -0400 +++ b/tools/python/xen/xend/FlatDeviceTree.py Sat Sep 16 09:34:26 2006 -0400
@@ -271,8 +271,14 @@ def build(imghandler):
     the host's device tree.'''
     root = Tree()

-    # 4 pages: start_info, console, store, shared_info
+ # 1st reseravtion entry used for start_info, console, store, shared_info
     root.reserve(0x3ffc000, 0x4000)
+
+ # 2nd reservation enrty used for initrd, later on when we load the
+    # initrd we may fill this in with zeroes which signifies the end
+ # of the reservation map. So as to avoid adding a zero map now we
+    # put some bogus yet sensible numbers here.
+    root.reserve(0x1000000, 0x1000)

     root.addprop('device_type', 'chrp-but-not-really\0')
     root.addprop('#size-cells', 2)

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


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