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

[XenPPC] [xenppc-unstable] [ppc] domain building fixes for linux kexec m

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [xenppc-unstable] [ppc] domain building fixes for linux kexec model
From: Xen patchbot-xenppc-unstable <patchbot-xenppc-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 26 Jul 2006 18:40:45 +0000
Delivery-date: Wed, 26 Jul 2006 11:45:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Reply-to: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID 3ae6752e777677200bdc7e7630716fe3823daff7
# Parent  3adb8d61d667d977e967c7e757ef0775ef4c283d
[ppc] domain building fixes for linux kexec model
The following updates are included:
  - No stack allocation is necessary
  - Some buggy kernels require r13 to be zeroed
  - the DTB must be loaded from a fixed address, we are using
    "/root/DomU.dtb" until we have the tools build the DTB on their
    own.
  - Though we give the PFN of the store and console pages to the new
    domain we must make sure the MFN is given to the tools.

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 tools/libxc/xc_ppc_linux_build.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff -r 3adb8d61d667 -r 3ae6752e7776 tools/libxc/xc_ppc_linux_build.c
--- a/tools/libxc/xc_ppc_linux_build.c  Wed Jul 26 13:51:44 2006 -0400
+++ b/tools/libxc/xc_ppc_linux_build.c  Wed Jul 26 14:24:09 2006 -0400
@@ -106,10 +106,13 @@ static int init_boot_vcpu(
     memset(&ctxt.user_regs, 0x55, sizeof(ctxt.user_regs));
     ctxt.user_regs.pc = dsi->v_kernentry;
     ctxt.user_regs.msr = 0;
-    ctxt.user_regs.gprs[1] = 32<<20; /* XXX arbitrary stack address */
+    ctxt.user_regs.gprs[1] = 0; /* Linux uses its own stack */
     ctxt.user_regs.gprs[3] = dtb;
     ctxt.user_regs.gprs[4] = kaddr;
     ctxt.user_regs.gprs[5] = 0;
+    /* There is a buggy kernel that does not zero the "local_paca", so
+     * we must make sure this register is 0 */
+    ctxt.user_regs.gprs[13] = 0;
 
     VERBOSE(printf("xc_vcpu_setvcpucontext:\n"
                  "  pc 0x%"PRIx64", msr 0x016%"PRIx64"\n"
@@ -343,6 +346,8 @@ static int get_page_array(int xc_handle,
     return 0;
 }
 
+
+
 int xc_linux_build(int xc_handle,
                    uint32_t domid,
                    const char *image_name,
@@ -385,13 +390,14 @@ int xc_linux_build(int xc_handle,
     /* XXX install initrd addr/len into device tree */
 
     dtb_addr = (16 << 20);
-    if (load_dtb(xc_handle, domid, "DomU.dtb", dtb_addr, &dsi, page_array)) {
+    if (load_dtb(xc_handle, domid, "/root/DomU.dtb", dtb_addr, &dsi, 
page_array)) {
         dtb_addr = 0;
     }
 
     si_addr = create_start_info(&si, store_evtchn, console_evtchn);
-    *console_mfn = si.console_mfn;
-    *store_mfn = si.store_mfn;
+    *console_mfn = page_array[si.console_mfn];
+    *store_mfn = page_array[si.store_mfn];
+    
     if (install_image(xc_handle, domid, page_array, &si, si_addr,
                 sizeof(start_info_t))) {
         rc = -1;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [xenppc-unstable] [ppc] domain building fixes for linux kexec model, Xen patchbot-xenppc-unstable <=