[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Tools: libxc side for setting up the mem sharing ring
# HG changeset patch # User Tim Deegan <tim@xxxxxxx> # Date 1331224805 0 # Node ID 07913faff6847f29d8d0d98608fcabf97d12fb73 # Parent 42b977df17be6137cfa5e306ac2f84afafe97e73 Tools: libxc side for setting up the mem sharing ring This ring is used to report failed allocations in the unshare path. Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Committed-by: Tim Deegan <tim@xxxxxxx> --- diff -r 42b977df17be -r 07913faff684 tools/libxc/xc_memshr.c --- a/tools/libxc/xc_memshr.c Thu Mar 08 16:40:05 2012 +0000 +++ b/tools/libxc/xc_memshr.c Thu Mar 08 16:40:05 2012 +0000 @@ -42,6 +42,31 @@ return do_domctl(xch, &domctl); } +int xc_memshr_ring_enable(xc_interface *xch, + domid_t domid, + uint32_t *port) +{ + if ( !port ) + { + errno = EINVAL; + return -1; + } + + return xc_mem_event_control(xch, domid, + XEN_DOMCTL_MEM_EVENT_OP_SHARING_ENABLE, + XEN_DOMCTL_MEM_EVENT_OP_SHARING, + port); +} + +int xc_memshr_ring_disable(xc_interface *xch, + domid_t domid) +{ + return xc_mem_event_control(xch, domid, + XEN_DOMCTL_MEM_EVENT_OP_SHARING_DISABLE, + XEN_DOMCTL_MEM_EVENT_OP_SHARING, + NULL); +} + static int xc_memshr_memop(xc_interface *xch, domid_t domid, xen_mem_sharing_op_t *mso) { diff -r 42b977df17be -r 07913faff684 tools/libxc/xenctrl.h --- a/tools/libxc/xenctrl.h Thu Mar 08 16:40:05 2012 +0000 +++ b/tools/libxc/xenctrl.h Thu Mar 08 16:40:05 2012 +0000 @@ -1917,6 +1917,11 @@ int xc_memshr_control(xc_interface *xch, domid_t domid, int enable); +int xc_memshr_ring_enable(xc_interface *xch, + domid_t domid, + uint32_t *port); +int xc_memshr_ring_disable(xc_interface *xch, + domid_t domid); int xc_memshr_nominate_gfn(xc_interface *xch, domid_t domid, unsigned long gfn, _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |