# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID ed5ee9dde0bd18e4f0f4c4a055317ab2fb63197e
# Parent  5498644b55501c25a8f56b21396e823a299020f9
[XEND][POWERPC] Sync tools/python/xen/lowlevel/xc/xc.c with xen-unstable.hg

Signed-off-by: Ryan Harper <[EMAIL PROTECTED]>
Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---
 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@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel

Reply via email to