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 2/4] ioports: libxc support

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 2/4] ioports: libxc support
From: lists-xen@xxxxxxxx
Date: Sun, 6 Nov 2005 02:44:36 +0100
Delivery-date: Sun, 06 Nov 2005 01:44:31 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20051106014026.GN5268@xxxxxxxx>
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>
References: <20051106014026.GN5268@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6+20040523i
2/4

-- 
Jody Belka
knew (at) pimb (dot) org
# HG changeset patch
# User jmb@xxxxxxxxxxxxxxxxxxxxx
# Node ID d8d62e726d8d217dde4fbc33962d9c4be115befc
# Parent  9e1a127dc366ec3359471feffb7e12a46bd16687
Added xc_domain_ioport_permission to libxc, which wraps the dom0 op

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

diff -r 9e1a127dc366 -r d8d62e726d8d tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c   Sun Nov  6 01:13:42 2005
+++ b/tools/libxc/xc_domain.c   Sun Nov  6 01:14:43 2005
@@ -364,6 +364,23 @@
     return rc;
 }
 
+int xc_domain_ioport_permission(int xc_handle,
+                                uint32_t domid,
+                                uint16_t first_port,
+                                uint16_t nr_ports,
+                                uint16_t allow_access)
+{
+    dom0_op_t op;
+
+    op.cmd = DOM0_IOPORT_PERMISSION;
+    op.u.ioport_permission.domain = (domid_t)domid;
+    op.u.ioport_permission.first_port = first_port;
+    op.u.ioport_permission.nr_ports = nr_ports;
+    op.u.ioport_permission.allow_access = allow_access;
+
+    return do_dom0_op(xc_handle, &op);
+}
+
 /*
  * Local variables:
  * mode: C
diff -r 9e1a127dc366 -r d8d62e726d8d tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h     Sun Nov  6 01:13:42 2005
+++ b/tools/libxc/xenctrl.h     Sun Nov  6 01:14:43 2005
@@ -371,6 +371,12 @@
                                           unsigned int extent_order,
                                          unsigned long *extent_start);
 
+int xc_domain_ioport_permission(int xc_handle,
+                                uint32_t domid,
+                                uint16_t first_port,
+                                uint16_t nr_ports,
+                                uint16_t allow_access);
+
 unsigned long xc_make_page_below_4G(int xc_handle, uint32_t domid, 
                                    unsigned long mfn);
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel