diff options
Diffstat (limited to 'include/xen/xenbus.h')
-rw-r--r-- | include/xen/xenbus.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/include/xen/xenbus.h b/include/xen/xenbus.h index b0f1c9e5d687..289c0b5f08fe 100644 --- a/include/xen/xenbus.h +++ b/include/xen/xenbus.h | |||
@@ -46,6 +46,10 @@ | |||
46 | #include <xen/interface/io/xenbus.h> | 46 | #include <xen/interface/io/xenbus.h> |
47 | #include <xen/interface/io/xs_wire.h> | 47 | #include <xen/interface/io/xs_wire.h> |
48 | 48 | ||
49 | #define XENBUS_MAX_RING_PAGE_ORDER 4 | ||
50 | #define XENBUS_MAX_RING_PAGES (1U << XENBUS_MAX_RING_PAGE_ORDER) | ||
51 | #define INVALID_GRANT_HANDLE (~0U) | ||
52 | |||
49 | /* Register callback to watch this node. */ | 53 | /* Register callback to watch this node. */ |
50 | struct xenbus_watch | 54 | struct xenbus_watch |
51 | { | 55 | { |
@@ -199,15 +203,19 @@ int xenbus_watch_pathfmt(struct xenbus_device *dev, struct xenbus_watch *watch, | |||
199 | const char *pathfmt, ...); | 203 | const char *pathfmt, ...); |
200 | 204 | ||
201 | int xenbus_switch_state(struct xenbus_device *dev, enum xenbus_state new_state); | 205 | int xenbus_switch_state(struct xenbus_device *dev, enum xenbus_state new_state); |
202 | int xenbus_grant_ring(struct xenbus_device *dev, unsigned long ring_mfn); | 206 | int xenbus_grant_ring(struct xenbus_device *dev, void *vaddr, |
203 | int xenbus_map_ring_valloc(struct xenbus_device *dev, | 207 | unsigned int nr_pages, grant_ref_t *grefs); |
204 | int gnt_ref, void **vaddr); | 208 | int xenbus_map_ring_valloc(struct xenbus_device *dev, grant_ref_t *gnt_refs, |
205 | int xenbus_map_ring(struct xenbus_device *dev, int gnt_ref, | 209 | unsigned int nr_grefs, void **vaddr); |
206 | grant_handle_t *handle, void *vaddr); | 210 | int xenbus_map_ring(struct xenbus_device *dev, |
211 | grant_ref_t *gnt_refs, unsigned int nr_grefs, | ||
212 | grant_handle_t *handles, unsigned long *vaddrs, | ||
213 | bool *leaked); | ||
207 | 214 | ||
208 | int xenbus_unmap_ring_vfree(struct xenbus_device *dev, void *vaddr); | 215 | int xenbus_unmap_ring_vfree(struct xenbus_device *dev, void *vaddr); |
209 | int xenbus_unmap_ring(struct xenbus_device *dev, | 216 | int xenbus_unmap_ring(struct xenbus_device *dev, |
210 | grant_handle_t handle, void *vaddr); | 217 | grant_handle_t *handles, unsigned int nr_handles, |
218 | unsigned long *vaddrs); | ||
211 | 219 | ||
212 | int xenbus_alloc_evtchn(struct xenbus_device *dev, int *port); | 220 | int xenbus_alloc_evtchn(struct xenbus_device *dev, int *port); |
213 | int xenbus_free_evtchn(struct xenbus_device *dev, int port); | 221 | int xenbus_free_evtchn(struct xenbus_device *dev, int port); |