[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 7 of 8] Tools: Libxc wrappers to add shared pages to physmap
On Fri, 2011-12-09 at 23:15 +0000, Andres Lagar-Cavilla wrote: > 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 3fc7875c8d98 -r 33935769e257 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; Why not use domid_t in the interface? > + 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; Why not uint64_t in the interface? > + > + return do_domctl(xch, &domctl); > +} > + > int xc_memshr_share(xc_interface *xch, > uint32_t source_domain, > uint64_t source_gfn, > diff -r 3fc7875c8d98 -r 33935769e257 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 |