aboutsummaryrefslogtreecommitdiffstats
path: root/include/xen/grant_table.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/xen/grant_table.h')
-rw-r--r--include/xen/grant_table.h37
1 files changed, 32 insertions, 5 deletions
diff --git a/include/xen/grant_table.h b/include/xen/grant_table.h
index 11e2dfce42f8..15f8a00ff003 100644
--- a/include/xen/grant_table.h
+++ b/include/xen/grant_table.h
@@ -62,6 +62,24 @@ int gnttab_resume(void);
62 62
63int gnttab_grant_foreign_access(domid_t domid, unsigned long frame, 63int gnttab_grant_foreign_access(domid_t domid, unsigned long frame,
64 int readonly); 64 int readonly);
65int gnttab_grant_foreign_access_subpage(domid_t domid, unsigned long frame,
66 int flags, unsigned page_off,
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);
71
72/*
73 * Are sub-page grants available on this version of Xen? Returns true if they
74 * are, and false if they're not.
75 */
76bool gnttab_subpage_grants_available(void);
77
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);
65 83
66/* 84/*
67 * 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
@@ -108,6 +126,13 @@ void gnttab_cancel_free_callback(struct gnttab_free_callback *callback);
108 126
109void gnttab_grant_foreign_access_ref(grant_ref_t ref, domid_t domid, 127void gnttab_grant_foreign_access_ref(grant_ref_t ref, domid_t domid,
110 unsigned long frame, int readonly); 128 unsigned long frame, int readonly);
129int gnttab_grant_foreign_access_subpage_ref(grant_ref_t ref, domid_t domid,
130 unsigned long frame, int flags,
131 unsigned page_off,
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);
111 136
112void gnttab_grant_foreign_transfer_ref(grant_ref_t, domid_t domid, 137void gnttab_grant_foreign_transfer_ref(grant_ref_t, domid_t domid,
113 unsigned long pfn); 138 unsigned long pfn);
@@ -145,9 +170,11 @@ gnttab_set_unmap_op(struct gnttab_unmap_grant_ref *unmap, phys_addr_t addr,
145 170
146int arch_gnttab_map_shared(unsigned long *frames, unsigned long nr_gframes, 171int arch_gnttab_map_shared(unsigned long *frames, unsigned long nr_gframes,
147 unsigned long max_nr_gframes, 172 unsigned long max_nr_gframes,
148 struct grant_entry **__shared); 173 void **__shared);
149void arch_gnttab_unmap_shared(struct grant_entry *shared, 174int arch_gnttab_map_status(uint64_t *frames, unsigned long nr_gframes,
150 unsigned long nr_gframes); 175 unsigned long max_nr_gframes,
176 grant_status_t **__shared);
177void arch_gnttab_unmap(void *shared, unsigned long nr_gframes);
151 178
152extern unsigned long xen_hvm_resume_frames; 179extern unsigned long xen_hvm_resume_frames;
153unsigned int gnttab_max_grant_frames(void); 180unsigned int gnttab_max_grant_frames(void);
@@ -155,9 +182,9 @@ unsigned int gnttab_max_grant_frames(void);
155#define gnttab_map_vaddr(map) ((void *)(map.host_virt_addr)) 182#define gnttab_map_vaddr(map) ((void *)(map.host_virt_addr))
156 183
157int gnttab_map_refs(struct gnttab_map_grant_ref *map_ops, 184int gnttab_map_refs(struct gnttab_map_grant_ref *map_ops,
158 struct gnttab_map_grant_ref *kmap_ops, 185 struct gnttab_map_grant_ref *kmap_ops,
159 struct page **pages, unsigned int count); 186 struct page **pages, unsigned int count);
160int gnttab_unmap_refs(struct gnttab_unmap_grant_ref *unmap_ops, 187int gnttab_unmap_refs(struct gnttab_unmap_grant_ref *unmap_ops,
161 struct page **pages, unsigned int count); 188 struct page **pages, unsigned int count, bool clear_pte);
162 189
163#endif /* __ASM_GNTTAB_H__ */ 190#endif /* __ASM_GNTTAB_H__ */