[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1 of 8] Tools: Do not assume sharing target is dom0 in libxc wrappers
On Fri, 2011-12-09 at 23:15 +0000, Andres Lagar-Cavilla wrote: > tools/libxc/xc_memshr.c | 3 ++- > tools/libxc/xenctrl.h | 1 + > 2 files changed, 3 insertions(+), 1 deletions(-) > > > The libxc wrapper that shares two pages always assumed one > of the pages was mapped by dom0. Expand the API to specify > both sharing domains. > > Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx> > > diff -r 835be7c121b7 -r 6f58de995103 tools/libxc/xc_memshr.c > --- a/tools/libxc/xc_memshr.c > +++ b/tools/libxc/xc_memshr.c > @@ -87,6 +87,7 @@ int xc_memshr_nominate_gref(xc_interface > } > > int xc_memshr_share(xc_interface *xch, > + uint32_t source_domain, > uint64_t source_handle, > uint64_t client_handle) > { > @@ -95,7 +96,7 @@ int xc_memshr_share(xc_interface *xch, > > domctl.cmd = XEN_DOMCTL_mem_sharing_op; > domctl.interface_version = XEN_DOMCTL_INTERFACE_VERSION; > - domctl.domain = 0; > + domctl.domain = (domid_t) source_domain; domid_t is fair game in xenctrl.h, why not just use it? There is an existing caller of this function in tools/memshr/interface.c so this change will break the build. I suspect your 3/8 patch fixes this but you must update the users at the same time, at least with the minimal "no semantic change" patch, e.g. pass source_domain as 0, such that everything still works at each step. The changelog says "specify both sharing domains" yet you only add the source domain here, where is the tgt domain? > op = &(domctl.u.mem_sharing_op); > op->op = XEN_DOMCTL_MEM_EVENT_OP_SHARING_SHARE; > op->u.share.source_handle = source_handle; > diff -r 835be7c121b7 -r 6f58de995103 tools/libxc/xenctrl.h > --- a/tools/libxc/xenctrl.h > +++ b/tools/libxc/xenctrl.h > @@ -1892,6 +1892,7 @@ int xc_memshr_nominate_gref(xc_interface > grant_ref_t gref, > uint64_t *handle); > int xc_memshr_share(xc_interface *xch, > + uint32_t source_domain, > uint64_t source_handle, > uint64_t client_handle); > int xc_memshr_domain_resume(xc_interface *xch, _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |