# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1303133817 -3600
# Node ID 9f86b6a9e01723f9ed642b5f188655ae49d0936e
# Parent 6c83af82be35420c606d494678eef6fdafcd6c5b
tools: libxl: write selected BIOS to xenstore.
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
diff -r 6c83af82be35 -r 9f86b6a9e017 tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c Mon Apr 18 14:35:19 2011 +0100
+++ b/tools/libxl/libxl_dm.c Mon Apr 18 14:36:57 2011 +0100
@@ -69,6 +69,16 @@ const char *libxl__domain_device_model(l
return dm;
}
+static char *libxl__domain_bios(libxl__gc *gc,
+ libxl_device_model_info *info)
+{
+ switch (info->device_model_version) {
+ case 1: return libxl__strdup(gc, "rombios");
+ case 2: return libxl__strdup(gc, "rombios");
+ default:return NULL;
+ }
+}
+
static char ** libxl__build_device_model_args_old(libxl__gc *gc,
const char *dm,
libxl_device_model_info
*info,
@@ -753,6 +763,11 @@ int libxl__create_device_model(libxl__gc
goto out;
}
+ path = libxl__sprintf(gc, "/local/domain/%d/hvmloader", info->domid);
+ xs_mkdir(ctx->xsh, XBT_NULL, path);
+ libxl__xs_write(gc, XBT_NULL, libxl__sprintf(gc, "%s/bios", path),
+ libxl__domain_bios(gc, info));
+
path = libxl__sprintf(gc, "/local/domain/0/device-model/%d", info->domid);
xs_mkdir(ctx->xsh, XBT_NULL, path);
libxl__xs_write(gc, XBT_NULL, libxl__sprintf(gc, "%s/disable_pf", path),
"%d", !info->xen_platform_pci);
@@ -875,6 +890,7 @@ int libxl__destroy_device_model(libxl__g
}
}
xs_rm(ctx->xsh, XBT_NULL, libxl__sprintf(gc,
"/local/domain/0/device-model/%d", domid));
+ xs_rm(ctx->xsh, XBT_NULL, libxl__sprintf(gc, "/local/domain/%d/hvmloader",
domid));
out:
return ret;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|