FreeBSD xen subsystem code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/bus.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/module.h>
#include <sys/sbuf.h>
#include <sys/sysctl.h>
#include <sys/syslog.h>
#include <sys/systm.h>
#include <sys/sx.h>
#include <sys/taskqueue.h>
#include <machine/stdarg.h>
#include <xen/xen-os.h>
#include <xen/gnttab.h>
#include <xen/xenbus/xenbusvar.h>
#include <xen/xenbus/xenbusb.h>
Go to the source code of this file.
Functions | |
__FBSDID ("$FreeBSD$") | |
static int | xenbusb_back_probe (device_t dev) |
Probe for the existence of the XenBus back bus. More... | |
static int | xenbusb_back_attach (device_t dev) |
Attach the XenBus back bus. More... | |
static int | xenbusb_back_enumerate_type (device_t dev, const char *type) |
Enumerate all devices of the given type on this bus. More... | |
static int | xenbusb_back_get_otherend_node (device_t dev, struct xenbus_device_ivars *ivars) |
Determine and store the XenStore path for the other end of a split device whose local end is represented by ivars. More... | |
static void | xenbusb_back_otherend_changed (device_t bus, device_t child, enum xenbus_state peer_state) |
Backend XenBus method implementing responses to peer state changes. More... | |
static void | xenbusb_back_localend_changed (device_t bus, device_t child, const char *path) |
Backend XenBus method implementing responses to local XenStore changes. More... | |
DEFINE_CLASS_0 (xenbusb_back, xenbusb_back_driver, xenbusb_back_methods, sizeof(struct xenbusb_softc)) | |
DRIVER_MODULE (xenbusb_back, xenstore, xenbusb_back_driver, xenbusb_back_devclass, 0, 0) | |
Variables | |
static device_method_t | xenbusb_back_methods [] |
devclass_t | xenbusb_back_devclass |
XenBus management of the NewBus bus containing the backend instances of Xen split devices.
Definition in file xenbusb_back.c.
|
static |
Attach the XenBus back bus.
dev | NewBus device_t for this XenBus back bus instance. |
Definition at line 86 of file xenbusb_back.c.
References xenbusb_softc::xbs_flags, xenbusb_softc::xbs_lock, and xenbusb_attach().
|
static |
Enumerate all devices of the given type on this bus.
dev | NewBus device_t for this XenBus backend bus instance. |
type | String indicating the device sub-tree (e.g. "vfb", "vif") to enumerate. |
Devices that are found are entered into the NewBus hierarchy via xenbusb_add_device(). xenbusb_add_device() ignores duplicate detects and ignores duplicate devices, so it can be called unconditionally for any device found in the XenStore.
The backend XenStore hierarchy has the following format:
backend/<device type>/<frontend vm id>/<device id>
Definition at line 132 of file xenbusb_back.c.
References xenbusb_softc::xbs_node, and xenbusb_add_device().
|
static |
Determine and store the XenStore path for the other end of a split device whose local end is represented by ivars.
dev | NewBus device_t for this XenBus backend bus instance. |
ivars | Instance variables from the XenBus child device for which to perform this function. |
If successful, the xd_otherend_path field of the child's instance variables will be updated.
Definition at line 193 of file xenbusb_back.c.
References xenbus_device_ivars::xd_node, xenbus_device_ivars::xd_otherend_id, xenbus_device_ivars::xd_otherend_path, and xenbus_device_ivars::xd_otherend_path_len.
|
static |
Backend XenBus method implementing responses to local XenStore changes.
bus | The XenBus bus parent of child. |
child | The XenBus child whose peer stat has changed. \param_path The tree relative sub-path to the modified node. The empty string indicates the root of the tree was destroyed. |
Definition at line 254 of file xenbusb_back.c.
References xenbus_dev_is_online(), and xenbusb_localend_changed().
|
static |
Backend XenBus method implementing responses to peer state changes.
bus | The XenBus bus parent of child. |
child | The XenBus child whose peer stat has changed. |
state | The current state of the peer. |
Definition at line 224 of file xenbusb_back.c.
References xenbus_dev_is_online(), and xenbusb_otherend_changed().
|
static |
Probe for the existence of the XenBus back bus.
dev | NewBus device_t for this XenBus back bus instance. |
Definition at line 70 of file xenbusb_back.c.
devclass_t xenbusb_back_devclass |
Definition at line 315 of file xenbusb_back.c.
|
static |
Definition at line 286 of file xenbusb_back.c.