|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 1 of 8] Tools: Do not assume sharing target is dom0 in libxc wrappers
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;
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 |