summaryrefslogtreecommitdiff
path: root/include/xen/grant_table.h
diff options
context:
space:
mode:
authorAnnie Li <annie.li@oracle.com>2011-12-12 14:15:07 +0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-12-16 20:25:39 +0400
commit9438ce9dbbf512fd717051284f568d5cb35e5cf1 (patch)
tree53c2abe7dccbf557586cb04319a0f9c6eed3a317 /include/xen/grant_table.h
parent6666754b11297526c699f8df63c52d50c24fe946 (diff)
downloadlinux-9438ce9dbbf512fd717051284f568d5cb35e5cf1.tar.xz
xen/granttable: Support transitive grants
These allow a domain A which has been granted access on a page of domain B's memory to issue domain C with a copy-grant on the same page. This is useful e.g. for forwarding packets between domains. Signed-off-by: Annie Li <annie.li@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'include/xen/grant_table.h')
-rw-r--r--include/xen/grant_table.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/xen/grant_table.h b/include/xen/grant_table.h
index 2b492b9637b3..f1e17b70588b 100644
--- a/include/xen/grant_table.h
+++ b/include/xen/grant_table.h
@@ -65,6 +65,9 @@ int gnttab_grant_foreign_access(domid_t domid, unsigned long frame,
int gnttab_grant_foreign_access_subpage(domid_t domid, unsigned long frame,
int flags, unsigned page_off,
unsigned length);
+int gnttab_grant_foreign_access_trans(domid_t domid, int flags,
+ domid_t trans_domid,
+ grant_ref_t trans_gref);
/*
* Are sub-page grants available on this version of Xen? Returns true if they
@@ -73,6 +76,12 @@ int gnttab_grant_foreign_access_subpage(domid_t domid, unsigned long frame,
bool gnttab_subpage_grants_available(void);
/*
+ * Are transitive grants available on this version of Xen? Returns true if they
+ * are, and false if they're not.
+ */
+bool gnttab_trans_grants_available(void);
+
+/*
* End access through the given grant reference, iff the grant entry is no
* longer in use. Return 1 if the grant entry was freed, 0 if it is still in
* use.
@@ -121,6 +130,9 @@ int gnttab_grant_foreign_access_subpage_ref(grant_ref_t ref, domid_t domid,
unsigned long frame, int flags,
unsigned page_off,
unsigned length);
+int gnttab_grant_foreign_access_trans_ref(grant_ref_t ref, domid_t domid,
+ int flags, domid_t trans_domid,
+ grant_ref_t trans_gref);
void gnttab_grant_foreign_transfer_ref(grant_ref_t, domid_t domid,
unsigned long pfn);