aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xenctrlosdep.h
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2010-12-03 09:36:47 +0000
committerIan Campbell <ian.campbell@citrix.com>2010-12-03 09:36:47 +0000
commitc89c726db972722d1e1ef3fd4913a05234c9cc47 (patch)
tree96e46313dfb8b746fbaafc28ac851ebc002c6538 /tools/libxc/xenctrlosdep.h
parent0ccceacd058c82f9cd747dff5efa92eebaded2fc (diff)
downloadxen-c89c726db972722d1e1ef3fd4913a05234c9cc47.tar.gz
xen-c89c726db972722d1e1ef3fd4913a05234c9cc47.tar.bz2
xen-c89c726db972722d1e1ef3fd4913a05234c9cc47.zip
libxc: add abitility to dynamically load osdep.
Add a dummy backend which always returns ENOSYS. Mainly as a compile time testbed rather than because it is a useful backend. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools/libxc/xenctrlosdep.h')
-rw-r--r--tools/libxc/xenctrlosdep.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/libxc/xenctrlosdep.h b/tools/libxc/xenctrlosdep.h
index a2680b220c..efdc3b37de 100644
--- a/tools/libxc/xenctrlosdep.h
+++ b/tools/libxc/xenctrlosdep.h
@@ -23,6 +23,18 @@
* This interface defines the interactions between the Xen control
* libraries and the OS facilities used to communicate with the
* hypervisor.
+ *
+ * It is possible to override the default (native) implementation by
+ * setting the XENCTRL_OSDEP environment variable to point to a
+ * plugin library. Userspace can use this facility to intercept
+ * hypervisor operations. This can be used e.g. to implement a
+ * userspace simulator for Xen hypercalls.
+ *
+ * The plugin must contain a data structure:
+ * xc_osdep_info_t xc_osdep_info;
+ *
+ * xc_osdep_init:
+ * Must return a suitable struct xc_osdep_ops pointer or NULL on failure.
*/
#ifndef XC_OSDEP_H
@@ -125,6 +137,9 @@ struct xc_osdep_info
/* True if this interface backs onto a fake Xen. */
int fake;
+
+ /* For internal use by loader. */
+ void *dl_handle;
};
typedef struct xc_osdep_info xc_osdep_info_t;