|
Linux Kernel
3.7.1
|
#include <linux/device.h>#include <linux/notifier.h>#include <linux/mutex.h>#include <linux/export.h>#include <linux/completion.h>#include <linux/init.h>#include <linux/slab.h>#include <xen/interface/xen.h>#include <xen/interface/grant_table.h>#include <xen/interface/io/xenbus.h>#include <xen/interface/io/xs_wire.h>Go to the source code of this file.
Data Structures | |
| struct | xenbus_watch |
| struct | xenbus_device |
| struct | xenbus_device_id |
| struct | xenbus_driver |
| struct | xenbus_transaction |
Macros | |
| #define | DEFINE_XENBUS_DRIVER(var, drvname, methods...) |
| #define | XBT_NIL ((struct xenbus_transaction) { 0 }) |
| #define | XENBUS_IS_ERR_READ(str) |
| #define | XENBUS_EXIST_ERR(err) ((err) == -ENOENT || (err) == -ERANGE) |
Variables | |
| const char * | dir |
| const char const char * | node |
| const char const char const char * | fmt |
| int | xenstored_ready |
| struct xenbus_watch * | watch |
| struct xenbus_watch void(* | callback )(struct xenbus_watch *, const char **, unsigned int) |
| struct xenbus_watch void(*) const char | pathfmt ) |
| struct xenbus_watch void(*) const char in | xenbus_switch_state )(struct xenbus_device *dev, enum xenbus_state new_state) |
| int | err |
| #define DEFINE_XENBUS_DRIVER | ( | var, | |
| drvname, | |||
| methods... | |||
| ) |
| #define XBT_NIL ((struct xenbus_transaction) { 0 }) |
| #define XENBUS_IS_ERR_READ | ( | str | ) |
| __printf | ( | 3 | , |
| 4 | |||
| ) |
| __scanf | ( | 4 | , |
| 5 | |||
| ) |
| int register_xenbus_watch | ( | struct xenbus_watch * | watch | ) |
Definition at line 663 of file xenbus_xs.c.
| int register_xenstore_notifier | ( | struct notifier_block * | nb | ) |
Definition at line 641 of file xenbus_probe.c.
| void unregister_xenbus_watch | ( | struct xenbus_watch * | watch | ) |
Definition at line 692 of file xenbus_xs.c.
| void unregister_xenstore_notifier | ( | struct notifier_block * | nb | ) |
Definition at line 654 of file xenbus_probe.c.
| int xenbus_alloc_evtchn | ( | struct xenbus_device * | dev, |
| int * | port | ||
| ) |
Allocate an event channel for the given xenbus_device, assigning the newly created local port to *port. Return 0 on success, or -errno on error. On error, the device will switch to XenbusStateClosing, and the error will be saved in the store.
Definition at line 381 of file xenbus_client.c.
| int xenbus_bind_evtchn | ( | struct xenbus_device * | dev, |
| int | remote_port, | ||
| int * | port | ||
| ) |
Bind to an existing interdomain event channel in another domain. Returns 0 on success and stores the local port in *port. On error, returns -errno, switches the device to XenbusStateClosing, and saves the error in XenStore.
Definition at line 406 of file xenbus_client.c.
| int xenbus_dev_is_online | ( | struct xenbus_device * | dev | ) |
Definition at line 223 of file xenbus_probe_backend.c.
| void* xenbus_dev_request_and_reply | ( | struct xsd_sockmsg * | msg | ) |
Definition at line 198 of file xenbus_xs.c.
| char** xenbus_directory | ( | struct xenbus_transaction | t, |
| const char * | dir, | ||
| const char * | node, | ||
| unsigned int * | num | ||
| ) |
Definition at line 354 of file xenbus_xs.c.
Definition at line 374 of file xenbus_xs.c.
| int xenbus_free_evtchn | ( | struct xenbus_device * | dev, |
| int | port | ||
| ) |
Free an existing event channel. Returns 0 on success or -errno on error.
Definition at line 431 of file xenbus_client.c.
| int xenbus_frontend_closed | ( | struct xenbus_device * | dev | ) |
Definition at line 239 of file xenbus_client.c.
| const char const char const char const char const char const char int xenbus_gather | ( | struct xenbus_transaction | t, |
| const char * | dir, | ||
| ... | |||
| ) |
Definition at line 555 of file xenbus_xs.c.
| int xenbus_grant_ring | ( | struct xenbus_device * | dev, |
| unsigned long | ring_mfn | ||
| ) |
xenbus_grant_ring : xenbus device : mfn of ring to grant
Grant access to the given to the peer of the given device. Return 0 on success, or -errno on error. On error, the device will switch to XenbusStateClosing, and the error will be saved in the store.
Definition at line 365 of file xenbus_client.c.
| int xenbus_map_ring | ( | struct xenbus_device * | dev, |
| int | gnt_ref, | ||
| grant_handle_t * | handle, | ||
| void * | vaddr | ||
| ) |
xenbus_map_ring : xenbus device : grant reference : pointer to grant handle to be filled : address to be mapped to
Map a page of memory into this domain from another domain's grant table. xenbus_map_ring does not allocate the virtual address space (you must do this yourself!). It only maps in the page to the specified address. Returns 0 on success, and GNTST_* (see xen/include/interface/grant_table.h) or -ENOMEM on error. If an error is returned, device will switch to XenbusStateClosing and the error message will be saved in XenStore.
Definition at line 566 of file xenbus_client.c.
| int xenbus_map_ring_valloc | ( | struct xenbus_device * | dev, |
| int | gnt_ref, | ||
| void ** | vaddr | ||
| ) |
xenbus_map_ring_valloc : xenbus device : grant reference : pointer to address to be filled out by mapping
Based on Rusty Russell's skeleton driver's map_page. Map a page of memory into this domain from another domain's grant table. xenbus_map_ring_valloc allocates a page of virtual address space, maps the page to that address, and sets vaddr to that address. Returns 0 on success, and GNTST_ (see xen/include/interface/grant_table.h) or -ENOMEM on error. If an error is returned, device will switch to XenbusStateClosing and the error message will be saved in XenStore.
Definition at line 461 of file xenbus_client.c.
Definition at line 434 of file xenbus_xs.c.
| void xenbus_probe | ( | struct work_struct * | ) |
Definition at line 660 of file xenbus_probe.c.
| void* xenbus_read | ( | struct xenbus_transaction | t, |
| const char * | dir, | ||
| const char * | node, | ||
| unsigned int * | len | ||
| ) |
Definition at line 392 of file xenbus_xs.c.
| enum xenbus_state xenbus_read_driver_state | ( | const char * | path | ) |
xenbus_read_driver_state : path for driver
Return the state of the driver rooted at the given store path, or XenbusStateUnknown if no state can be read.
Definition at line 721 of file xenbus_client.c.
| int __must_check xenbus_register_backend | ( | struct xenbus_driver * | ) |
Definition at line 235 of file xenbus_probe_backend.c.
| int __must_check xenbus_register_frontend | ( | struct xenbus_driver * | ) |
Definition at line 277 of file xenbus_probe_frontend.c.
Definition at line 451 of file xenbus_xs.c.
Definition at line 69 of file xenbus_client.c.
| int xenbus_transaction_end | ( | struct xenbus_transaction | t, |
| int | abort | ||
| ) |
Definition at line 490 of file xenbus_xs.c.
| int xenbus_transaction_start | ( | struct xenbus_transaction * | t | ) |
Definition at line 469 of file xenbus_xs.c.
| int xenbus_unmap_ring | ( | struct xenbus_device * | dev, |
| grant_handle_t | handle, | ||
| void * | vaddr | ||
| ) |
xenbus_unmap_ring : xenbus device : grant handle : addr to unmap
Unmap a page of memory in this domain that was imported from another domain. Returns 0 on success and returns GNTST_* on error (see xen/include/interface/grant_table.h).
Definition at line 694 of file xenbus_client.c.
| int xenbus_unmap_ring_vfree | ( | struct xenbus_device * | dev, |
| void * | vaddr | ||
| ) |
xenbus_unmap_ring_vfree : xenbus device : addr to unmap
Based on Rusty Russell's skeleton driver's unmap_page. Unmap a page of memory in this domain that was imported from another domain. Use xenbus_unmap_ring_vfree if you mapped in your memory with xenbus_map_ring_valloc (it will free the virtual address space). Returns 0 on success and returns GNTST_* on error (see xen/include/interface/grant_table.h).
Definition at line 600 of file xenbus_client.c.
| void xenbus_unregister_driver | ( | struct xenbus_driver * | drv | ) |
Definition at line 303 of file xenbus_probe.c.
| int xenbus_watch_path | ( | struct xenbus_device * | dev, |
| const char * | path, | ||
| struct xenbus_watch * | watch, | ||
| void(*)(struct xenbus_watch *, const char **, unsigned int) | callback | ||
| ) |
xenbus_watch_path - register a watch : xenbus device : path to watch : watch to register : callback to register
Register a on the given path, using the given xenbus_watch structure for storage, and the given function as the callback. Return 0 on success, or -errno on error. On success, the given will be saved as ->node, and remains the caller's to free. On error, ->node will be NULL, the device will switch to XenbusStateClosing, and the error will be saved in the store.
Definition at line 100 of file xenbus_client.c.
| int xenbus_write | ( | struct xenbus_transaction | t, |
| const char * | dir, | ||
| const char * | node, | ||
| const char * | string | ||
| ) |
Definition at line 411 of file xenbus_xs.c.
Definition at line 744 of file xenbus_xs.c.
Definition at line 736 of file xenbus_xs.c.
Definition at line 764 of file xenbus_xs.c.
| struct xenbus_watch void(* callback)(struct xenbus_watch *, const char **, unsigned int) |
| struct xenbus_watch* watch |
| struct xenbus_watch void(*) const char in xenbus_switch_state)(struct xenbus_device *dev, enum xenbus_state new_state) |
| int xenstored_ready |
Definition at line 638 of file xenbus_probe.c.
1.8.2