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

[Xen-devel] [PATCH] [LIBXC] add architecture-specific parameter to xc_li

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] [LIBXC] add architecture-specific parameter to xc_linux_build()
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Tue, 08 Aug 2006 15:28:24 -0500
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, xen-ppc-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 08 Aug 2006 13:28:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
(I'm not attached to the name "arch_args" in this patch.)

Keir, this patch applies on top of the xc.c whitespace patch I just
sent, and also on top of the contents of xenppc-unstable-merge.hg
(because we've moved xc_ppc_linux_build.c into its own directory). We
also have a couple important fixes in there anyways, so now would be a
good time to pull. :)

 .hgignore                                |    8
 a/tools/libxc/xc_ppc_linux_build.c       |  408 -------------------------------
 b/tools/libxc/powerpc64/Makefile         |    1
 b/tools/libxc/powerpc64/xc_linux_build.c |  408 +++++++++++++++++++++++++++++++
 tools/libxc/xc_ppc_linux_build.c         |   40 +--
 xen/arch/powerpc/Makefile                |    3
 xen/arch/powerpc/boot_of.c               |    8
 xen/arch/powerpc/dom0_ops.c              |   43 ++-
 xen/arch/powerpc/domain.c                |   29 +-
 xen/arch/powerpc/of_handler/devtree.c    |    2
 xen/arch/powerpc/powerpc64/ppc970.c      |    7
 xen/arch/powerpc/usercopy.c              |    4
 xen/include/asm-powerpc/processor.h      |    1
 13 files changed, 502 insertions(+), 460 deletions(-)

# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Date 1155068244 18000
# Node ID e74340460b8cac614ac71d540ca78eb11a0e917f
# Parent  375fb1f773c5ec053d63315e4d942e7d3aeb0cda
[LIBXC] add architecture-specific parameter to xc_linux_build()
On PowerPC, we will pass down the flattened device tree from Python this way.
Other architectures currently leave this unused. Should more than one
parameter be needed in the future, the address of an architecture-specific
structure can be passed instead (i.e. we won't need to add more parameters to
the prototype).
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>

diff -r 375fb1f773c5 -r e74340460b8c tools/libxc/powerpc64/xc_linux_build.c
--- a/tools/libxc/powerpc64/xc_linux_build.c    Tue Aug 08 15:11:25 2006 -0500
+++ b/tools/libxc/powerpc64/xc_linux_build.c    Tue Aug 08 15:17:24 2006 -0500
@@ -352,7 +352,8 @@ int xc_linux_build(int xc_handle,
                    unsigned int store_evtchn,
                    unsigned long *store_mfn,
                    unsigned int console_evtchn,
-                   unsigned long *console_mfn)
+                   unsigned long *console_mfn,
+                   void *devtree)
 {
     struct domain_setup_info dsi;
     xen_pfn_t *page_array = NULL;
diff -r 375fb1f773c5 -r e74340460b8c tools/libxc/xc_linux_build.c
--- a/tools/libxc/xc_linux_build.c      Tue Aug 08 15:11:25 2006 -0500
+++ b/tools/libxc/xc_linux_build.c      Tue Aug 08 15:17:24 2006 -0500
@@ -1337,7 +1337,8 @@ int xc_linux_build(int xc_handle,
                    unsigned int store_evtchn,
                    unsigned long *store_mfn,
                    unsigned int console_evtchn,
-                   unsigned long *console_mfn)
+                   unsigned long *console_mfn,
+                   void *unused)
 {
     char *image = NULL;
     unsigned long image_size;
diff -r 375fb1f773c5 -r e74340460b8c tools/libxc/xenguest.h
--- a/tools/libxc/xenguest.h    Tue Aug 08 15:11:25 2006 -0500
+++ b/tools/libxc/xenguest.h    Tue Aug 08 15:17:24 2006 -0500
@@ -55,7 +55,8 @@ int xc_linux_restore(int xc_handle, int 
  * @parm store_evtchn the store event channel for this domain to use
  * @parm store_mfn returned with the mfn of the store page
  * @parm console_evtchn the console event channel for this domain to use
- * @parm conole_mfn returned with the mfn of the console page
+ * @parm console_mfn returned with the mfn of the console page
+ * @parm arch_args architecture-specific data
  * @return 0 on success, -1 on failure
  */
 int xc_linux_build(int xc_handle,
@@ -68,7 +69,8 @@ int xc_linux_build(int xc_handle,
                    unsigned int store_evtchn,
                    unsigned long *store_mfn,
                    unsigned int console_evtchn,
-                   unsigned long *console_mfn);
+                   unsigned long *console_mfn,
+                   void *arch_args);
 
 /**
  * This function will create a domain for a paravirtualized Linux
diff -r 375fb1f773c5 -r e74340460b8c tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Tue Aug 08 15:11:25 2006 -0500
+++ b/tools/python/xen/lowlevel/xc/xc.c Tue Aug 08 15:17:24 2006 -0500
@@ -331,25 +331,26 @@ static PyObject *pyxc_linux_build(XcObje
     int store_evtchn, console_evtchn;
     unsigned long store_mfn = 0;
     unsigned long console_mfn = 0;
+    void *arch_args = NULL;
 
     static char *kwd_list[] = { "dom", "store_evtchn",
                                 "console_evtchn", "image",
                                 /* optional */
                                 "ramdisk", "cmdline", "flags",
-                                "features", "arch", NULL };
-
-    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiis|ssis", kwd_list,
+                                "features", "arch_args", NULL };
+
+    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiis|ssiss", kwd_list,
                                       &dom, &store_evtchn,
                                       &console_evtchn, &image,
                                       /* optional */
                                       &ramdisk, &cmdline, &flags,
-                                      &features) )
+                                      &features, &arch_args) )
         return NULL;
 
     if ( xc_linux_build(self->xc_handle, dom, image,
                         ramdisk, cmdline, features, flags,
                         store_evtchn, &store_mfn,
-                        console_evtchn, &console_mfn) != 0 ) {
+                        console_evtchn, &console_mfn, arch_args) != 0 ) {
         if (!errno)
              errno = EINVAL;
         return PyErr_SetFromErrno(xc_error);


-- 
Hollis Blanchard
IBM Linux Technology Center


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