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

[Xen-changelog] Added domain_ioport_permission to the python module xen.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Added domain_ioport_permission to the python module xen.lowlevel.xc,
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 06 Nov 2005 19:56:06 +0000
Delivery-date: Sun, 06 Nov 2005 23:12:32 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID b67d2d2465aa538e5f30420d0996236768e61cb6
# Parent  15dc55145e5582de59f22ff7af03e32cf26d623a
Added domain_ioport_permission to the python module xen.lowlevel.xc,
wrapping the equivalent libxc call

Signed-off-by: Jody Belka <knew (at) pimb (dot) org>

diff -r 15dc55145e55 -r b67d2d2465aa tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Sun Nov  6 15:39:55 2005
+++ b/tools/python/xen/lowlevel/xc/xc.c Sun Nov  6 15:40:15 2005
@@ -858,6 +858,29 @@
     return zero;
 }
 
+static PyObject *pyxc_domain_ioport_permission(PyObject *self,
+                                               PyObject *args,
+                                               PyObject *kwds)
+{
+    XcObject *xc = (XcObject *)self;
+    uint32_t dom;
+    int first_port, nr_ports, allow_access, ret;
+
+    static char *kwd_list[] = { "dom", "first_port", "nr_ports", 
"allow_access", NULL };
+
+    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiii", kwd_list, 
+                                      &dom, &first_port, &nr_ports, 
&allow_access) )
+        return NULL;
+
+    ret = xc_domain_ioport_permission(
+        xc->xc_handle, dom, first_port, nr_ports, allow_access);
+    if ( ret != 0 )
+        return PyErr_SetFromErrno(xc_error);
+
+    Py_INCREF(zero);
+    return zero;
+}
+
 static PyMethodDef pyxc_methods[] = {
     { "handle",
       (PyCFunction)pyxc_handle,
@@ -1127,6 +1150,16 @@
       " mem_kb [long]: .\n"
       "Returns: [int] 0 on success; -1 on error.\n" },
 
+    { "domain_ioport_permission",
+      (PyCFunction)pyxc_domain_ioport_permission,
+      METH_VARARGS | METH_KEYWORDS, "\n"
+      "Allow a domain access to a range of IO ports\n"
+      " dom          [int]: Identifier of domain to be allowed access.\n"
+      " first_port   [int]: First IO port\n"
+      " nr_ports     [int]: Number of IO ports\n"
+      " allow_access [int]: Non-zero means enable access; else disable 
access\n\n"
+      "Returns: [int] 0 on success; -1 on error.\n" },
+
     { NULL, NULL, 0, NULL }
 };
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Added domain_ioport_permission to the python module xen.lowlevel.xc,, Xen patchbot -unstable <=