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] [XEND][POWERPC] Sync tools/python/xen/lowleve

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [xenppc-unstable] [XEND][POWERPC] Sync tools/python/xen/lowlevel/xc/xc.c with xen-unstable.hg
From: Xen patchbot-xenppc-unstable <patchbot-xenppc-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 21 Jan 2007 13:30:17 +0000
Delivery-date: Sun, 21 Jan 2007 05:55:37 -0800
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 ed5ee9dde0bd18e4f0f4c4a055317ab2fb63197e
# Parent  5498644b55501c25a8f56b21396e823a299020f9
[XEND][POWERPC] Sync tools/python/xen/lowlevel/xc/xc.c with xen-unstable.hg

Signed-off-by: Ryan Harper <ryanh@xxxxxxxxxx>
Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 tools/python/xen/lowlevel/xc/xc.c |  163 +++++++++++++-------------------------
 1 files changed, 57 insertions(+), 106 deletions(-)

diff -r 5498644b5550 -r ed5ee9dde0bd tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Sun Jan 21 08:17:02 2007 -0500
+++ b/tools/python/xen/lowlevel/xc/xc.c Sun Jan 21 08:17:46 2007 -0500
@@ -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

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [xenppc-unstable] [XEND][POWERPC] Sync tools/python/xen/lowlevel/xc/xc.c with xen-unstable.hg, Xen patchbot-xenppc-unstable <=