diff options
author | Annie Li <annie.li@oracle.com> | 2011-12-12 18:15:07 +0800 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-12-16 11:25:39 -0500 |
commit | 9438ce9dbbf512fd717051284f568d5cb35e5cf1 (patch) | |
tree | 53c2abe7dccbf557586cb04319a0f9c6eed3a317 /include/xen | |
parent | 6666754b11297526c699f8df63c52d50c24fe946 (diff) | |
download | op-kernel-dev-9438ce9dbbf512fd717051284f568d5cb35e5cf1.zip op-kernel-dev-9438ce9dbbf512fd717051284f568d5cb35e5cf1.tar.gz |
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')
-rw-r--r-- | include/xen/grant_table.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/xen/grant_table.h b/include/xen/grant_table.h index 2b492b9..f1e17b7 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); |