[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] tools: libxl: write selected BIOS to xenstore.



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1303315986 -3600
# Node ID a3db6b91f32d977c7b516b4f7ceba4fcd6d9d2a8
# Parent  45fd2a6f7c35c689ca22c395337acebda6c4dfcd
tools: libxl: write selected BIOS to xenstore.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
---


diff -r 45fd2a6f7c35 -r a3db6b91f32d tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c    Wed Apr 20 17:13:00 2011 +0100
+++ b/tools/libxl/libxl_dm.c    Wed Apr 20 17:13:06 2011 +0100
@@ -69,6 +69,16 @@
     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 @@
         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 @@
         }
     }
     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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.