aboutsummaryrefslogtreecommitdiffstats
path: root/include/xen/grant_table.h
diff options
context:
space:
mode:
authorAnnie Li <annie.li@oracle.com>2011-12-12 05:15:07 -0500
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-12-16 11:25:39 -0500
commit9438ce9dbbf512fd717051284f568d5cb35e5cf1 (patch)
tree53c2abe7dccbf557586cb04319a0f9c6eed3a317 /include/xen/grant_table.h
parent6666754b11297526c699f8df63c52d50c24fe946 (diff)
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,
65int gnttab_grant_foreign_access_subpage(domid_t domid, unsigned long frame, 65int gnttab_grant_foreign_access_subpage(domid_t domid, unsigned long frame,
66 int flags, unsigned page_off, 66 int flags, unsigned page_off,
67 unsigned length); 67 unsigned length);
68int gnttab_grant_foreign_access_trans(domid_t domid, int flags,
69 domid_t trans_domid,
70 grant_ref_t trans_gref);
68 71
69/* 72/*
70 * Are sub-page grants available on this version of Xen? Returns true if they 73 * 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,
73bool gnttab_subpage_grants_available(void); 76bool gnttab_subpage_grants_available(void);
74 77
75/* 78/*
79 * Are transitive grants available on this version of Xen? Returns true if they
80 * are, and false if they're not.
81 */
82bool gnttab_trans_grants_available(void);
83
84/*
76 * End access through the given grant reference, iff the grant entry is no 85 * End access through the given grant reference, iff the grant entry is no
77 * longer in use. Return 1 if the grant entry was freed, 0 if it is still in 86 * longer in use. Return 1 if the grant entry was freed, 0 if it is still in
78 * use. 87 * use.
@@ -121,6 +130,9 @@ int gnttab_grant_foreign_access_subpage_ref(grant_ref_t ref, domid_t domid,
121 unsigned long frame, int flags, 130 unsigned long frame, int flags,
122 unsigned page_off, 131 unsigned page_off,
123 unsigned length); 132 unsigned length);
133int gnttab_grant_foreign_access_trans_ref(grant_ref_t ref, domid_t domid,
134 int flags, domid_t trans_domid,
135 grant_ref_t trans_gref);
124 136
125void gnttab_grant_foreign_transfer_ref(grant_ref_t, domid_t domid, 137void gnttab_grant_foreign_transfer_ref(grant_ref_t, domid_t domid,
126 unsigned long pfn); 138 unsigned long pfn);