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

[Xen-devel] [PATCH 2 of 2] Add the ability to specify the option "bios_override" in the guest



configuration file.
An example is given by:
bios_override="ovmf-x64"

which forces BIOS to be the OVMF UEFI for 64 bits architectures.

Signed-off-by: Attilio Rao <attilio.rao@xxxxxxxxxx>

diff -r 032fea10f8d1 -r 520ba1527b7a tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c        Wed Feb 22 18:54:03 2012 +0000
+++ b/tools/libxl/libxl_create.c        Wed Feb 22 18:56:22 2012 +0000
@@ -89,6 +89,7 @@ int libxl_init_build_info(libxl_ctx *ctx
     case LIBXL_DOMAIN_TYPE_HVM:
         b_info->video_memkb = 8 * 1024;
         b_info->u.hvm.firmware = NULL;
+        b_info->u.hvm.bios = NULL;
         b_info->u.hvm.pae = 1;
         b_info->u.hvm.apic = 1;
         b_info->u.hvm.acpi = 1;
diff -r 032fea10f8d1 -r 520ba1527b7a tools/libxl/libxl_dm.c
--- a/tools/libxl/libxl_dm.c    Wed Feb 22 18:54:03 2012 +0000
+++ b/tools/libxl/libxl_dm.c    Wed Feb 22 18:56:22 2012 +0000
@@ -66,6 +66,8 @@ const char *libxl__domain_device_model(l
 static const char *libxl__domain_bios(libxl__gc *gc,
                                 const libxl_domain_build_info *info)
 {
+    if (info->u.hvm.bios)
+       return info->u.hvm.bios;
     switch (info->device_model_version) {
     case 1: return "rombios";
     case 2: return "seabios";
diff -r 032fea10f8d1 -r 520ba1527b7a tools/libxl/libxl_types.idl
--- a/tools/libxl/libxl_types.idl       Wed Feb 22 18:54:03 2012 +0000
+++ b/tools/libxl/libxl_types.idl       Wed Feb 22 18:56:22 2012 +0000
@@ -228,6 +228,7 @@ libxl_domain_build_info = Struct("domain
 
     ("u", KeyedUnion(None, libxl_domain_type, "type",
                 [("hvm", Struct(None, [("firmware", string),
+                                       ("bios", string),
                                        ("pae", bool),
                                        ("apic", bool),
                                        ("acpi", bool),
diff -r 032fea10f8d1 -r 520ba1527b7a tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Wed Feb 22 18:54:03 2012 +0000
+++ b/tools/libxl/xl_cmdimpl.c  Wed Feb 22 18:56:22 2012 +0000
@@ -704,6 +704,8 @@ static void parse_config_data(const char
 
         xlu_cfg_replace_string (config, "firmware_override",
                                 &b_info->u.hvm.firmware, 0);
+        xlu_cfg_replace_string (config, "bios_override",
+                                &b_info->u.hvm.bios, 0);
         if (!xlu_cfg_get_long (config, "pae", &l, 0))
             b_info->u.hvm.pae = l;
         if (!xlu_cfg_get_long (config, "apic", &l, 0))

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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