[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 5 of 7] Tools: libxc side for setting up the mem sharing ring
tools/libxc/xc_memshr.c | 25 +++++++++++++++++++++++++ tools/libxc/xenctrl.h | 5 +++++ 2 files changed, 30 insertions(+), 0 deletions(-) This ring is used to report failed allocations in the unshare path. Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx> diff -r 07f131352fc0 -r d3d824ae525c tools/libxc/xc_memshr.c --- a/tools/libxc/xc_memshr.c +++ b/tools/libxc/xc_memshr.c @@ -42,6 +42,31 @@ int xc_memshr_control(xc_interface *xch, 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 07f131352fc0 -r d3d824ae525c tools/libxc/xenctrl.h --- a/tools/libxc/xenctrl.h +++ b/tools/libxc/xenctrl.h @@ -1915,6 +1915,11 @@ int xc_mem_access_resume(xc_interface *x 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-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |