[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [LIBXC] Add new AP{I function xc_evtchn_bind_unbound_port().



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID f7b7daed94d6f3a4a906a5c1f153b132e3604f22
# Parent  43c8cb5a895cd5ee506d6e848049ab66fee54817
[LIBXC] Add new AP{I function xc_evtchn_bind_unbound_port().
Add a comment clarifying how this function differs from
xc_evtchn_alloc_unbound().
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/libxc/xc_linux.c   |    9 +++++++++
 tools/libxc/xc_solaris.c |    9 +++++++++
 tools/libxc/xenctrl.h    |   16 +++++++++++++---
 3 files changed, 31 insertions(+), 3 deletions(-)

diff -r 43c8cb5a895c -r f7b7daed94d6 tools/libxc/xc_linux.c
--- a/tools/libxc/xc_linux.c    Fri Dec 01 13:57:46 2006 +0000
+++ b/tools/libxc/xc_linux.c    Fri Dec 01 14:25:36 2006 +0000
@@ -250,6 +250,15 @@ int xc_evtchn_notify(int xce_handle, evt
     return ioctl(xce_handle, IOCTL_EVTCHN_NOTIFY, &notify);
 }
 
+evtchn_port_t xc_evtchn_bind_unbound_port(int xce_handle, int domid)
+{
+    struct ioctl_evtchn_bind_unbound_port bind;
+
+    bind.remote_domain = domid;
+
+    return ioctl(xce_handle, IOCTL_EVTCHN_BIND_UNBOUND_PORT, &bind);
+}
+
 evtchn_port_t xc_evtchn_bind_interdomain(int xce_handle, int domid,
     evtchn_port_t remote_port)
 {
diff -r 43c8cb5a895c -r f7b7daed94d6 tools/libxc/xc_solaris.c
--- a/tools/libxc/xc_solaris.c  Fri Dec 01 13:57:46 2006 +0000
+++ b/tools/libxc/xc_solaris.c  Fri Dec 01 14:25:36 2006 +0000
@@ -165,6 +165,15 @@ int xc_evtchn_notify(int xce_handle, evt
     return ioctl(xce_handle, IOCTL_EVTCHN_NOTIFY, &notify);
 }
 
+evtchn_port_t xc_evtchn_bind_unbound_port(int xce_handle, int domid)
+{
+    struct ioctl_evtchn_bind_unbound_port bind;
+
+    bind.remote_domain = domid;
+
+    return ioctl(xce_handle, IOCTL_EVTCHN_BIND_UNBOUND_PORT, &bind);
+}
+
 evtchn_port_t xc_evtchn_bind_interdomain(int xce_handle, int domid,
     evtchn_port_t remote_port)
 {
diff -r 43c8cb5a895c -r f7b7daed94d6 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h     Fri Dec 01 13:57:46 2006 +0000
+++ b/tools/libxc/xenctrl.h     Fri Dec 01 14:25:36 2006 +0000
@@ -382,6 +382,10 @@ int xc_sched_credit_domain_get(int xc_ha
  * This function allocates an unbound port.  Ports are named endpoints used for
  * interdomain communication.  This function is most useful in opening a
  * well-known port within a domain to receive events on.
+ * 
+ * NOTE: If you are allocating a *local* unbound port, you probably want to
+ * use xc_evtchn_bind_unbound_port(). This function is intended for allocating
+ * ports *only* during domain creation.
  *
  * @parm xc_handle a handle to an open hypervisor interface
  * @parm dom the ID of the local domain (the 'allocatee')
@@ -630,6 +634,12 @@ int xc_evtchn_notify(int xce_handle, evt
 int xc_evtchn_notify(int xce_handle, evtchn_port_t port);
 
 /*
+ * Returns a new event port awaiting interdomain connection from the given
+ * domain ID, or -1 on failure, in which case errno will be set appropriately.
+ */
+evtchn_port_t xc_evtchn_bind_unbound_port(int xce_handle, int domid);
+
+/*
  * Returns a new event port bound to the remote port for the given domain ID,
  * or -1 on failure, in which case errno will be set appropriately.
  */
@@ -661,15 +671,15 @@ int xc_evtchn_unmask(int xce_handle, evt
 int xc_evtchn_unmask(int xce_handle, evtchn_port_t port);
 
 int xc_hvm_set_pci_intx_level(
-    int xce_handle, domid_t dom,
+    int xc_handle, domid_t dom,
     uint8_t domain, uint8_t bus, uint8_t device, uint8_t intx,
     unsigned int level);
 int xc_hvm_set_isa_irq_level(
-    int xce_handle, domid_t dom,
+    int xc_handle, domid_t dom,
     uint8_t isa_irq,
     unsigned int level);
 
 int xc_hvm_set_pci_link_route(
-    int xce_handle, domid_t dom, uint8_t link, uint8_t isa_irq);
+    int xc_handle, domid_t dom, uint8_t link, uint8_t isa_irq);
 
 #endif

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.