aboutsummaryrefslogtreecommitdiffstats
path: root/tools/memshr/memshr.h
diff options
context:
space:
mode:
authorAndres Lagar-Cavilla <andres@lagarcavilla.org>2012-01-26 12:46:26 +0000
committerAndres Lagar-Cavilla <andres@lagarcavilla.org>2012-01-26 12:46:26 +0000
commit447e175bade9a36a638b8aa0a950aa0fb855623a (patch)
treee654b4277c514c7c2b831ae25a81172deeed2871 /tools/memshr/memshr.h
parent5cadc6c3e09dfedba6b65ff728c60d13af7262f8 (diff)
downloadxen-447e175bade9a36a638b8aa0a950aa0fb855623a.tar.gz
xen-447e175bade9a36a638b8aa0a950aa0fb855623a.tar.bz2
xen-447e175bade9a36a638b8aa0a950aa0fb855623a.zip
Update memshr API and tools
This patch is the folded version of API updates, along with the associated tool changes to ensure that the build is always consistent. API updates: - The source domain in the sharing calls is no longer assumed to be dom0. - Previously, the mem sharing code would return an opaque handle to index shared pages (and nominees) in its global hash table. By removing the hash table, the handle becomes a version, to avoid sharing a stale version of a page. Thus, libxc wrappers and tools need to be updated to recall the share functions with the information needed to fetch the page (which they readily have). Tool updates: The only (in-tree, that we know of) consumer of the mem sharing API is the memshr tool. This is updated to use the new API. Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org> Signed-off-by: Adin Scannell <adin@scannell.ca> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Tim Deegan <tim@xen.org>
Diffstat (limited to 'tools/memshr/memshr.h')
-rw-r--r--tools/memshr/memshr.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/memshr/memshr.h b/tools/memshr/memshr.h
index 24dd04c4f3..32c1d815da 100644
--- a/tools/memshr/memshr.h
+++ b/tools/memshr/memshr.h
@@ -25,6 +25,13 @@
typedef uint64_t xen_mfn_t;
+typedef struct share_tuple
+{
+ uint32_t domain;
+ uint64_t frame;
+ uint64_t handle;
+} share_tuple_t;
+
extern void memshr_set_domid(int domid);
extern void memshr_daemon_initialize(void);
extern void memshr_vbd_initialize(void);
@@ -35,9 +42,9 @@ extern int memshr_vbd_issue_ro_request(char *buf,
uint16_t file_id,
uint64_t sec,
int secs,
- uint64_t *hnd);
+ share_tuple_t *hnd);
extern void memshr_vbd_complete_ro_request(
- uint64_t hnd,
+ share_tuple_t hnd,
uint16_t file_id,
uint64_t sec,
int secs);