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] [PATCH 4 of 4] [PATCH] Sync tools/python/xen/lowlevel/xc/xc.c w

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [PATCH 4 of 4] [PATCH] Sync tools/python/xen/lowlevel/xc/xc.c with xen-unstable.hg
From: Ryan Harper <ryanh@xxxxxxxxxx>
Date: Fri, 19 Jan 2007 15:48:26 -0500
Delivery-date: Fri, 19 Jan 2007 13:48:11 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1169243302@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>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
1 files changed, 57 insertions(+), 106 deletions(-)
tools/python/xen/lowlevel/xc/xc.c |  163 ++++++++++++-------------------------


# HG changeset patch
# User Ryan Harper <ryanh@xxxxxxxxxx>
# Date 1169241710 21600
# Node ID 2d2cb7d7bd5daa7e4b5ccbc76b2c51163f30f647
# Parent  00c682cf4b4397a4ed25b7b21fefc429f4196d0d
[PATCH] Sync tools/python/xen/lowlevel/xc/xc.c with xen-unstable.hg

Signed-off-by: Ryan Harper <ryanh@xxxxxxxxxx>

diff -r 00c682cf4b43 -r 2d2cb7d7bd5d tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Fri Jan 19 15:21:50 2007 -0600
+++ b/tools/python/xen/lowlevel/xc/xc.c Fri Jan 19 15:21:50 2007 -0600
@@ -360,7 +360,6 @@ static PyObject *pyxc_linux_build(XcObje
     unsigned int mem_mb;
     unsigned long store_mfn = 0;
     unsigned long console_mfn = 0;
-    int unused;
 
     static char *kwd_list[] = { "domid", "store_evtchn", "memsize",
                                 "console_evtchn", "image",
@@ -368,12 +367,12 @@ static PyObject *pyxc_linux_build(XcObje
                                 "ramdisk", "cmdline", "flags",
                                 "features", NULL };
 
-    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiiis|ssis#", kwd_list,
+    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiiis|ssis", kwd_list,
                                       &dom, &store_evtchn, &mem_mb,
                                       &console_evtchn, &image,
                                       /* optional */
                                       &ramdisk, &cmdline, &flags,
-                                      &features, &unused) )
+                                      &features) )
         return NULL;
 
     if ( xc_linux_build(self->xc_handle, dom, mem_mb, image,
@@ -442,6 +441,47 @@ static PyObject *pyxc_hvm_build(XcObject
     return Py_BuildValue("{s:i}", "store_mfn", store_mfn);
 }
 
+#ifdef __powerpc__
+static PyObject *pyxc_prose_build(XcObject *self,
+                                  PyObject *args,
+                                  PyObject *kwds)
+{
+    uint32_t dom;
+    char *image, *ramdisk = NULL, *cmdline = "", *features = NULL;
+    int flags = 0;
+    int store_evtchn, console_evtchn;
+    unsigned int mem_mb;
+    unsigned long store_mfn = 0;
+    unsigned long console_mfn = 0;
+
+    static char *kwd_list[] = { "dom", "store_evtchn",
+                                "console_evtchn", "image", "memsize",
+                                /* optional */
+                                "ramdisk", "cmdline", "flags",
+                                "features", NULL };
+
+    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiis|ssis", kwd_list,
+                                      &dom, &store_evtchn,
+                                      &console_evtchn, &image, &mem_mb,
+                                      /* optional */
+                                      &ramdisk, &cmdline, &flags,
+                                      &features) )
+        return NULL;
+
+    if ( xc_prose_build(self->xc_handle, dom, mem_mb, image,
+                        ramdisk, cmdline, features, flags,
+                        store_evtchn, &store_mfn,
+                        console_evtchn, &console_mfn) != 0 ) {
+        if (!errno)
+             errno = EINVAL;
+        return pyxc_error_to_exception();
+    }
+    return Py_BuildValue("{s:i,s:i}", 
+                         "store_mfn", store_mfn,
+                         "console_mfn", console_mfn);
+}
+#endif /* powerpc */
+
 static PyObject *pyxc_evtchn_alloc_unbound(XcObject *self,
                                            PyObject *args,
                                            PyObject *kwds)
@@ -915,68 +955,6 @@ static PyObject *dom_op(XcObject *self, 
     Py_INCREF(zero);
     return zero;
 }
-
-#ifdef __powerpc__
-static PyObject *pyxc_alloc_real_mode_area(XcObject *self,
-                                           PyObject *args,
-                                           PyObject *kwds)
-{
-    uint32_t dom;
-    unsigned int log;
-
-    static char *kwd_list[] = { "dom", "log", NULL };
-
-    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "ii", kwd_list, 
-                                      &dom, &log) )
-        return NULL;
-
-    if ( xc_alloc_real_mode_area(self->xc_handle, dom, log) )
-        return pyxc_error_to_exception();
-
-    Py_INCREF(zero);
-    return zero;
-}
-
-static PyObject *pyxc_prose_build(XcObject *self,
-                                  PyObject *args,
-                                  PyObject *kwds)
-{
-    uint32_t dom;
-    char *image, *ramdisk = NULL, *cmdline = "", *features = NULL;
-    int flags = 0;
-    int store_evtchn, console_evtchn;
-    unsigned int mem_mb;
-    unsigned long store_mfn = 0;
-    unsigned long console_mfn = 0;
-    int unused;
-
-    static char *kwd_list[] = { "dom", "store_evtchn",
-                                "console_evtchn", "image", "memsize",
-                                /* optional */
-                                "ramdisk", "cmdline", "flags",
-                                "features", NULL };
-
-    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiiis|ssis#", kwd_list,
-                                      &dom, &store_evtchn, &mem_mb,
-                                      &console_evtchn, &image,
-                                      /* optional */
-                                      &ramdisk, &cmdline, &flags,
-                                      &features, &unused) )
-        return NULL;
-
-    if ( xc_prose_build(self->xc_handle, dom, mem_mb, image,
-                        ramdisk, cmdline, features, flags,
-                        store_evtchn, &store_mfn,
-                        console_evtchn, &console_mfn) != 0 ) {
-        if (!errno)
-             errno = EINVAL;
-        return pyxc_error_to_exception();
-    }
-    return Py_BuildValue("{s:i,s:i}", 
-                         "store_mfn", store_mfn,
-                         "console_mfn", console_mfn);
-}
-#endif /* powerpc */
 
 static PyMethodDef pyxc_methods[] = {
     { "handle",
@@ -1104,18 +1082,6 @@ static PyMethodDef pyxc_methods[] = {
       " vcpus   [int, 1]:   Number of Virtual CPUS in domain.\n\n"
       "Returns: [int] 0 on success; -1 on error.\n" },
 
-    { "prose_build", 
-      (PyCFunction)pyxc_prose_build, 
-      METH_VARARGS | METH_KEYWORDS, "\n"
-      "Build a new Linux guest OS.\n"
-      " dom     [int]:      Identifier of domain to build into.\n"
-      " image   [str]:      Name of kernel image file. May be gzipped.\n"
-      " ramdisk [str, n/a]: Name of ramdisk file, if any.\n"
-      " cmdline [str, n/a]: Kernel parameters, if any.\n\n"
-      " vcpus   [int, 1]:   Number of Virtual CPUS in domain.\n\n"
-      "Returns: [int] 0 on success; -1 on error.\n" },
-
-
     { "hvm_build", 
       (PyCFunction)pyxc_hvm_build, 
       METH_VARARGS | METH_KEYWORDS, "\n"
@@ -1124,6 +1090,20 @@ static PyMethodDef pyxc_methods[] = {
       " image   [str]:      Name of HVM loader image file.\n"
       " vcpus   [int, 1]:   Number of Virtual CPUS in domain.\n\n"
       "Returns: [int] 0 on success; -1 on error.\n" },
+
+#ifdef __powerpc__
+    { "prose_build", 
+      (PyCFunction)pyxc_prose_build, 
+      METH_VARARGS | METH_KEYWORDS, "\n"
+      "Build a new Linux guest OS.\n"
+      " dom     [int]:      Identifier of domain to build into.\n"
+      " image   [str]:      Name of kernel image file. May be gzipped.\n"
+      " mem_mb  [int]:      Amount of memory to allocate to domain.\n"
+      " ramdisk [str, n/a]: Name of ramdisk file, if any.\n"
+      " cmdline [str, n/a]: Kernel parameters, if any.\n\n"
+      " vcpus   [int, 1]:   Number of Virtual CPUS in domain.\n\n"
+      "Returns: [int] 0 on success; -1 on error.\n" },
+#endif /* __powerpc */
 
     { "sched_id_get",
       (PyCFunction)pyxc_sched_id_get,
@@ -1253,14 +1233,6 @@ static PyMethodDef pyxc_methods[] = {
       " mem_kb [long]: .\n"
       "Returns: [int] 0 on success; -1 on error.\n" },
 
-    { "alloc_real_mode_area", 
-      (PyCFunction)pyxc_alloc_real_mode_area, 
-      METH_VARARGS | METH_KEYWORDS, "\n"
-      "Allocate a domain's real mode area.\n"
-      " dom [int]: Identifier of domain.\n"
-      " log [int]: Specifies the area's size.\n"
-      "Returns: [int] 0 on success; -1 on error.\n" },
-
     { "domain_ioport_permission",
       (PyCFunction)pyxc_domain_ioport_permission,
       METH_VARARGS | METH_KEYWORDS, "\n"
@@ -1302,27 +1274,6 @@ static PyMethodDef pyxc_methods[] = {
       "Set a domain's time offset to Dom0's localtime\n"
       " dom        [int]: Domain whose time offset is being set.\n"
       "Returns: [int] 0 on success; -1 on error.\n" },
-
-#ifdef __powerpc__
-    { "arch_alloc_real_mode_area", 
-      (PyCFunction)pyxc_alloc_real_mode_area, 
-      METH_VARARGS | METH_KEYWORDS, "\n"
-      "Allocate a domain's real mode area.\n"
-      " dom [int]: Identifier of domain.\n"
-      " log [int]: Specifies the area's size.\n"
-      "Returns: [int] 0 on success; -1 on error.\n" },
-
-    { "arch_prose_build", 
-      (PyCFunction)pyxc_prose_build, 
-      METH_VARARGS | METH_KEYWORDS, "\n"
-      "Build a new Linux guest OS.\n"
-      " dom     [int]:      Identifier of domain to build into.\n"
-      " image   [str]:      Name of kernel image file. May be gzipped.\n"
-      " ramdisk [str, n/a]: Name of ramdisk file, if any.\n"
-      " cmdline [str, n/a]: Kernel parameters, if any.\n\n"
-      " vcpus   [int, 1]:   Number of Virtual CPUS in domain.\n\n"
-      "Returns: [int] 0 on success; -1 on error.\n" },
-#endif /* __powerpc */
 
     { NULL, NULL, 0, NULL }
 };

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