enabling the invariant TSC feature flag in cpuid results when TSC is
not emulated.
+=item B<driver_domain=BOOLEAN>
+
+Specify that this domain is a driver domain. This enables certain
+features needed in order to run a driver domain.
+
=back
=head2 Devices
A domain writable path. Available for arbitrary domain use.
+### Paths private to the toolstack
+
+#### ~/device-model/$DOMID/state [w]
+
+Contains the status of the device models running on the domain.
+
+#### ~/libxl/$DOMID/qdisk-backend-pid [w]
+
+Contains the PIDs of the device models running on the domain.
+
## Virtual Machine Paths
The /vm/$UUID namespace is used by toolstacks to store various
*/
#define LIBXL_HAVE_CREATEINFO_PVH 1
+/*
+ * LIBXL_HAVE_DRIVER_DOMAIN_CREATION 1
+ *
+ * If this is defined, libxl_domain_create_info contains a driver_domain
+ * field that can be used to tell libxl that the domain that is going
+ * to be created is a driver domain, so the necessary actions are taken.
+ */
+#define LIBXL_HAVE_DRIVER_DOMAIN_CREATION 1
+
/* Functions annotated with LIBXL_EXTERNAL_CALLERS_ONLY may not be
* called from within libxl itself. Callers outside libxl, who
* do not #include libxl_internal.h, are fine. */
}
libxl_defbool_setdefault(&c_info->run_hotplug_scripts, true);
+ libxl_defbool_setdefault(&c_info->driver_domain, false);
return 0;
}
libxl__xs_mkdir(gc, t,
libxl__sprintf(gc, "%s/data", dom_path),
rwperm, ARRAY_SIZE(rwperm));
+
+ if (libxl_defbool_val(info->driver_domain)) {
+ /*
+ * Create a local "libxl" directory for each guest, since we might want
+ * to use libxl from inside the guest
+ */
+ libxl__xs_mkdir(gc, t, GCSPRINTF("%s/libxl", dom_path), rwperm,
+ ARRAY_SIZE(rwperm));
+ /*
+ * Create a local "device-model" directory for each guest, since we
+ * might want to use Qemu from inside the guest
+ */
+ libxl__xs_mkdir(gc, t, GCSPRINTF("%s/device-model", dom_path), rwperm,
+ ARRAY_SIZE(rwperm));
+ }
+
if (info->type == LIBXL_DOMAIN_TYPE_HVM)
libxl__xs_mkdir(gc, t,
libxl__sprintf(gc, "%s/hvmloader/generation-id-address", dom_path),
("poolid", uint32),
("run_hotplug_scripts",libxl_defbool),
("pvh", libxl_defbool),
+ ("driver_domain",libxl_defbool),
], dir=DIR_IN)
libxl_domain_restore_params = Struct("domain_restore_params", [
if (!xlu_cfg_get_long(config, "max_event_channels", &l, 0))
b_info->event_channels = l;
+ xlu_cfg_get_defbool(config, "driver_domain", &c_info->driver_domain, 0);
+
switch(b_info->type) {
case LIBXL_DOMAIN_TYPE_HVM:
if (!xlu_cfg_get_string (config, "kernel", &buf, 0))