All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andres Lagar-Cavilla <andres@lagarcavilla.org>
To: xen-devel@lists.xensource.com
Cc: ian.jackson@citrix.com, andres@gridcentric.ca, tim@xen.org,
	ian.campbell@citrix.com, adin@gridcentric.ca
Subject: [PATCH 1 of 8] Tools: Do not assume sharing target is dom0 in libxc wrappers
Date: Fri, 09 Dec 2011 18:15:51 -0500	[thread overview]
Message-ID: <6f58de995103b7bf4153.1323472551@xdev.gridcentric.ca> (raw)
In-Reply-To: <patchbomb.1323472550@xdev.gridcentric.ca>

 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@lagarcavilla.org>

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,

  reply	other threads:[~2011-12-09 23:15 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-09 23:15 [PATCH 0 of 8] Tools: Memory sharing interface updates Andres Lagar-Cavilla
2011-12-09 23:15 ` Andres Lagar-Cavilla [this message]
2011-12-12  9:50   ` [PATCH 1 of 8] Tools: Do not assume sharing target is dom0 in libxc wrappers Ian Campbell
2011-12-09 23:15 ` [PATCH 2 of 8] Tools: Update libxc mem sharing interface Andres Lagar-Cavilla
2011-12-12  9:56   ` Ian Campbell
2011-12-09 23:15 ` [PATCH 3 of 8] Tools: Update memshr tool to use new sharing API Andres Lagar-Cavilla
2011-12-12 10:13   ` Ian Campbell
2011-12-13  4:18     ` Andres Lagar-Cavilla
2011-12-12 12:14   ` Ian Jackson
2011-12-09 23:15 ` [PATCH 4 of 8] Tools: Add a sharing command to xl for information about shared pages Andres Lagar-Cavilla
2011-12-12 10:26   ` Ian Campbell
2011-12-09 23:15 ` [PATCH 5 of 8] Tools: Expose to libxc the total number of shared frames and space saved Andres Lagar-Cavilla
2011-12-12 10:39   ` Ian Campbell
2011-12-13  3:43     ` Andres Lagar-Cavilla
2011-12-13 17:08       ` Adin Scannell
2011-12-14 10:47         ` Ian Campbell
2011-12-09 23:15 ` [PATCH 6 of 8] Tools: Allow libxl/xl to expose " Andres Lagar-Cavilla
2011-12-12 10:43   ` Ian Campbell
2011-12-13 17:13     ` Adin Scannell
2011-12-09 23:15 ` [PATCH 7 of 8] Tools: Libxc wrappers to add shared pages to physmap Andres Lagar-Cavilla
2011-12-12 10:48   ` Ian Campbell
2011-12-12 10:50   ` Ian Campbell
2011-12-09 23:15 ` [PATCH 8 of 8] Tools: Libxc wrapper for the new sharing audit domctl Andres Lagar-Cavilla
2011-12-12 10:52   ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6f58de995103b7bf4153.1323472551@xdev.gridcentric.ca \
    --to=andres@lagarcavilla.org \
    --cc=adin@gridcentric.ca \
    --cc=andres@gridcentric.ca \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.