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-devel

[Xen-devel] [PATCH] [LIBXC] create PowerPC-specific alloc_real_mode_area

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] [LIBXC] create PowerPC-specific alloc_real_mode_area memory op
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Wed, 20 Sep 2006 15:08:39 -0500
Delivery-date: Wed, 20 Sep 2006 13:09:13 -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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Date 1158782630 18000
# Node ID a755393bb7331723bcc1971e4a555830897ed40d
# Parent  b46d3d47063ac51343847ec22321276b72a5e591
[LIBXC] create PowerPC-specific alloc_real_mode_area memory op
It doesn't seem to be worth the complexity to create an xc.arch object, so this
xc method is just prefixed with "arch_".

(The actual implementation of xc_alloc_real_mode_area() was accidentally
committed earlier in 38d6cf70e8f258f7f63d3456301f201a13b25958 .)

Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>

diff -r b46d3d47063a -r a755393bb733 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h     Wed Sep 20 14:23:32 2006 -0500
+++ b/tools/libxc/xenctrl.h     Wed Sep 20 15:03:50 2006 -0500
@@ -421,6 +421,10 @@ int xc_domain_memory_populate_physmap(in
                                       unsigned int address_bits,
                                       xen_pfn_t *extent_start);
 
+int xc_alloc_real_mode_area(int xc_handle,
+                            uint32_t domid,
+                            unsigned int log);
+
 int xc_domain_translate_gpfn_list(int xc_handle,
                                   uint32_t domid,
                                   unsigned long nr_gpfns,
diff -r b46d3d47063a -r a755393bb733 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Wed Sep 20 14:23:32 2006 -0500
+++ b/tools/python/xen/lowlevel/xc/xc.c Wed Sep 20 15:03:50 2006 -0500
@@ -732,6 +732,28 @@ static PyObject *pyxc_domain_memory_incr
     return zero;
 }
 
+#ifdef __powerpc__
+static PyObject *pyxc_arch_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 PyErr_SetFromErrno(xc_error);
+
+    Py_INCREF(zero);
+    return zero;
+}
+#endif
+
 static PyObject *pyxc_domain_ioport_permission(XcObject *self,
                                                PyObject *args,
                                                PyObject *kwds)
@@ -1089,6 +1111,16 @@ static PyMethodDef pyxc_methods[] = {
       " dom [int]: Identifier of domain.\n"
       " mem_kb [long]: .\n"
       "Returns: [int] 0 on success; -1 on error.\n" },
+
+#ifdef __powerpc__
+    { "arch_alloc_real_mode_area", 
+      (PyCFunction)pyxc_arch_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" },
+#endif
 
     { "domain_ioport_permission",
       (PyCFunction)pyxc_domain_ioport_permission,
diff -r b46d3d47063a -r a755393bb733 xen/include/public/domctl.h
--- a/xen/include/public/domctl.h       Wed Sep 20 14:23:32 2006 -0500
+++ b/xen/include/public/domctl.h       Wed Sep 20 15:03:50 2006 -0500
@@ -347,6 +347,13 @@ struct xen_domctl_settimeoffset {
 };
 typedef struct xen_domctl_settimeoffset xen_domctl_settimeoffset_t;
 DEFINE_XEN_GUEST_HANDLE(xen_domctl_settimeoffset_t);
+
+#define XEN_DOMCTL_real_mode_area     26
+struct xen_domctl_real_mode_area {
+    uint32_t log; /* log2 of Real Mode Area size */
+};
+typedef struct xen_domctl_real_mode_area xen_domctl_real_mode_area_t;
+DEFINE_XEN_GUEST_HANDLE(xen_domctl_real_mode_area_t);
 
 struct xen_domctl {
     uint32_t cmd;
@@ -373,6 +380,7 @@ struct xen_domctl {
         struct xen_domctl_hypercall_init    hypercall_init;
         struct xen_domctl_arch_setup        arch_setup;
         struct xen_domctl_settimeoffset     settimeoffset;
+        struct xen_domctl_real_mode_area    real_mode_area;
         uint8_t                             pad[128];
     } u;
 };

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] [LIBXC] create PowerPC-specific alloc_real_mode_area memory op, Hollis Blanchard <=