summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAnnie Li <annie.li@oracle.com>2011-12-12 18:14:42 +0800
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-12-16 11:25:02 -0500
commit6666754b11297526c699f8df63c52d50c24fe946 (patch)
treecd850e009e16c4e1e64d91ab66617ac097c89104 /include
parent9dbc71d53ce4e0260d0a8307838cd9ebddc07a12 (diff)
xen/granttable: Support sub-page grants
- They can't be used to map the page (so can only be used in a GNTTABOP_copy hypercall). - It's possible to grant access with a finer granularity than whole pages. - Xen guarantees that they can be revoked quickly (a normal map grant can only be revoked with the cooperation of the domain which has been granted access). Signed-off-by: Annie Li <annie.li@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'include')
-rw-r--r--include/xen/grant_table.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/xen/grant_table.h b/include/xen/grant_table.h
index fea4954174f..2b492b9637b 100644
--- a/include/xen/grant_table.h
+++ b/include/xen/grant_table.h
@@ -62,6 +62,15 @@ int gnttab_resume(void);
int gnttab_grant_foreign_access(domid_t domid, unsigned long frame,
int readonly);
+int gnttab_grant_foreign_access_subpage(domid_t domid, unsigned long frame,
+ int flags, unsigned page_off,
+ unsigned length);
+
+/*
+ * Are sub-page grants available on this version of Xen? Returns true if they
+ * are, and false if they're not.
+ */
+bool gnttab_subpage_grants_available(void);
/*
* End access through the given grant reference, iff the grant entry is no
@@ -108,6 +117,10 @@ void gnttab_cancel_free_callback(struct gnttab_free_callback *callback);
void gnttab_grant_foreign_access_ref(grant_ref_t ref, domid_t domid,
unsigned long frame, int readonly);
+int gnttab_grant_foreign_access_subpage_ref(grant_ref_t ref, domid_t domid,
+ unsigned long frame, int flags,
+ unsigned page_off,
+ unsigned length);
void gnttab_grant_foreign_transfer_ref(grant_ref_t, domid_t domid,
unsigned long pfn);