[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 2 of 5] Tools: Libxc wrappers to add shared pages to physmap
tools/libxc/xc_memshr.c | 23 +++++++++++++++++++++++ tools/libxc/xenctrl.h | 6 ++++++ 2 files changed, 29 insertions(+), 0 deletions(-) Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx> diff -r b8be3a08e628 -r 14f08673af6a tools/libxc/xc_memshr.c --- a/tools/libxc/xc_memshr.c +++ b/tools/libxc/xc_memshr.c @@ -86,6 +86,29 @@ int xc_memshr_nominate_gref(xc_interface return ret; } +int xc_memshr_add_to_physmap(xc_interface *xch, + uint32_t source_domain, + uint64_t source_gfn, + uint64_t source_handle, + uint32_t client_domain, + uint64_t client_gfn) +{ + DECLARE_DOMCTL; + struct xen_domctl_mem_sharing_op *op; + + domctl.cmd = XEN_DOMCTL_mem_sharing_op; + domctl.interface_version = XEN_DOMCTL_INTERFACE_VERSION; + domctl.domain = (domid_t) source_domain; + op = &(domctl.u.mem_sharing_op); + op->op = XEN_DOMCTL_MEM_EVENT_OP_SHARING_ADD_PHYSMAP; + op->u.share.source_gfn = source_gfn; + op->u.share.source_handle = source_handle; + op->u.share.client_gfn = client_gfn; + op->u.share.client_domain = (uint64_t) client_domain; + + return do_domctl(xch, &domctl); +} + int xc_memshr_share(xc_interface *xch, uint32_t source_domain, uint64_t source_gfn, diff -r b8be3a08e628 -r 14f08673af6a tools/libxc/xenctrl.h --- a/tools/libxc/xenctrl.h +++ b/tools/libxc/xenctrl.h @@ -1895,6 +1895,12 @@ int xc_memshr_nominate_gref(xc_interface uint32_t domid, grant_ref_t gref, uint64_t *handle); +int xc_memshr_add_to_physmap(xc_interface *xch, + uint32_t source_domain, + uint64_t source_gfn, + uint64_t source_handle, + uint32_t client_domain, + uint64_t client_gfn); int xc_memshr_share(xc_interface *xch, uint32_t source_domain, uint64_t source_gfn, _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |