ia64/xen-unstable

changeset 12747:f7b7daed94d6

[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@xensource.com>
author kfraser@localhost.localdomain
date Fri Dec 01 14:25:36 2006 +0000 (2006-12-01)
parents 43c8cb5a895c
children 995841d99780
files tools/libxc/xc_linux.c tools/libxc/xc_solaris.c tools/libxc/xenctrl.h
line diff
     1.1 --- a/tools/libxc/xc_linux.c	Fri Dec 01 13:57:46 2006 +0000
     1.2 +++ b/tools/libxc/xc_linux.c	Fri Dec 01 14:25:36 2006 +0000
     1.3 @@ -250,6 +250,15 @@ int xc_evtchn_notify(int xce_handle, evt
     1.4      return ioctl(xce_handle, IOCTL_EVTCHN_NOTIFY, &notify);
     1.5  }
     1.6  
     1.7 +evtchn_port_t xc_evtchn_bind_unbound_port(int xce_handle, int domid)
     1.8 +{
     1.9 +    struct ioctl_evtchn_bind_unbound_port bind;
    1.10 +
    1.11 +    bind.remote_domain = domid;
    1.12 +
    1.13 +    return ioctl(xce_handle, IOCTL_EVTCHN_BIND_UNBOUND_PORT, &bind);
    1.14 +}
    1.15 +
    1.16  evtchn_port_t xc_evtchn_bind_interdomain(int xce_handle, int domid,
    1.17      evtchn_port_t remote_port)
    1.18  {
     2.1 --- a/tools/libxc/xc_solaris.c	Fri Dec 01 13:57:46 2006 +0000
     2.2 +++ b/tools/libxc/xc_solaris.c	Fri Dec 01 14:25:36 2006 +0000
     2.3 @@ -165,6 +165,15 @@ int xc_evtchn_notify(int xce_handle, evt
     2.4      return ioctl(xce_handle, IOCTL_EVTCHN_NOTIFY, &notify);
     2.5  }
     2.6  
     2.7 +evtchn_port_t xc_evtchn_bind_unbound_port(int xce_handle, int domid)
     2.8 +{
     2.9 +    struct ioctl_evtchn_bind_unbound_port bind;
    2.10 +
    2.11 +    bind.remote_domain = domid;
    2.12 +
    2.13 +    return ioctl(xce_handle, IOCTL_EVTCHN_BIND_UNBOUND_PORT, &bind);
    2.14 +}
    2.15 +
    2.16  evtchn_port_t xc_evtchn_bind_interdomain(int xce_handle, int domid,
    2.17      evtchn_port_t remote_port)
    2.18  {
     3.1 --- a/tools/libxc/xenctrl.h	Fri Dec 01 13:57:46 2006 +0000
     3.2 +++ b/tools/libxc/xenctrl.h	Fri Dec 01 14:25:36 2006 +0000
     3.3 @@ -382,6 +382,10 @@ int xc_sched_credit_domain_get(int xc_ha
     3.4   * This function allocates an unbound port.  Ports are named endpoints used for
     3.5   * interdomain communication.  This function is most useful in opening a
     3.6   * well-known port within a domain to receive events on.
     3.7 + * 
     3.8 + * NOTE: If you are allocating a *local* unbound port, you probably want to
     3.9 + * use xc_evtchn_bind_unbound_port(). This function is intended for allocating
    3.10 + * ports *only* during domain creation.
    3.11   *
    3.12   * @parm xc_handle a handle to an open hypervisor interface
    3.13   * @parm dom the ID of the local domain (the 'allocatee')
    3.14 @@ -630,6 +634,12 @@ int xc_evtchn_fd(int xce_handle);
    3.15  int xc_evtchn_notify(int xce_handle, evtchn_port_t port);
    3.16  
    3.17  /*
    3.18 + * Returns a new event port awaiting interdomain connection from the given
    3.19 + * domain ID, or -1 on failure, in which case errno will be set appropriately.
    3.20 + */
    3.21 +evtchn_port_t xc_evtchn_bind_unbound_port(int xce_handle, int domid);
    3.22 +
    3.23 +/*
    3.24   * Returns a new event port bound to the remote port for the given domain ID,
    3.25   * or -1 on failure, in which case errno will be set appropriately.
    3.26   */
    3.27 @@ -661,15 +671,15 @@ evtchn_port_t xc_evtchn_pending(int xce_
    3.28  int xc_evtchn_unmask(int xce_handle, evtchn_port_t port);
    3.29  
    3.30  int xc_hvm_set_pci_intx_level(
    3.31 -    int xce_handle, domid_t dom,
    3.32 +    int xc_handle, domid_t dom,
    3.33      uint8_t domain, uint8_t bus, uint8_t device, uint8_t intx,
    3.34      unsigned int level);
    3.35  int xc_hvm_set_isa_irq_level(
    3.36 -    int xce_handle, domid_t dom,
    3.37 +    int xc_handle, domid_t dom,
    3.38      uint8_t isa_irq,
    3.39      unsigned int level);
    3.40  
    3.41  int xc_hvm_set_pci_link_route(
    3.42 -    int xce_handle, domid_t dom, uint8_t link, uint8_t isa_irq);
    3.43 +    int xc_handle, domid_t dom, uint8_t link, uint8_t isa_irq);
    3.44  
    3.45  #endif