Attilio Rao
2012-Feb-29 13:00 UTC
[PATCH] [PATCH v4] Add the bios option to specify the bios to load
Signed-off-by: Attilio Rao <attilio.rao@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> --- Differences with previous revision: - Improvements to the manpage: * s/operated/made * s/compatbile/compatible * New paragraph for rombios, provided by Ian * s/force/request * redundant line removal in UEFI explanatory * Wrap of lines at 80 cols diff -r adcd6ab160fa -r 3c10ba854d37 docs/man/xl.cfg.pod.5 --- a/docs/man/xl.cfg.pod.5 Thu Feb 23 10:29:27 2012 +0000 +++ b/docs/man/xl.cfg.pod.5 Wed Feb 29 13:00:06 2012 +0000 @@ -430,6 +430,33 @@ accept the defaults for these options wh =over 4 +=item B<bios="STRING"> + +Select the virtual firmware that is exposed to the guest. +By default, a guess is made based on the device model, but sometimes +it may be useful to request a different one, like UEFI. + +=over 4 + +=item B<rombios> + +Loads ROMBIOS, a 16-bit x86 compatible BIOS. This is used by default +when device_model_version=qemu-xen-traditional. This is the only BIOS +option supported when device_model_version=qemu-xen-traditional. This is +the BIOS used by all previous Xen versions. + +=item B<seabios> + +Loads SeaBIOS, a 16-bit x86 compatible BIOS. This is used by default +with device_model_version=qemu-xen. + +=item B<ovmf> + +Loads OVMF, a standard UEFI firmware by Tianocore project. +Requires device_model_version=qemu-xen. + +=back + =item B<pae=BOOLEAN> Hide or expose the IA32 Physical Address Extensions. These extensions diff -r adcd6ab160fa -r 3c10ba854d37 tools/libxl/libxl_create.c --- a/tools/libxl/libxl_create.c Thu Feb 23 10:29:27 2012 +0000 +++ b/tools/libxl/libxl_create.c Wed Feb 29 13:00:06 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 = 0; b_info->u.hvm.pae = 1; b_info->u.hvm.apic = 1; b_info->u.hvm.acpi = 1; diff -r adcd6ab160fa -r 3c10ba854d37 tools/libxl/libxl_dm.c --- a/tools/libxl/libxl_dm.c Thu Feb 23 10:29:27 2012 +0000 +++ b/tools/libxl/libxl_dm.c Wed Feb 29 13:00:06 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 libxl_bios_type_to_string(info->u.hvm.bios); switch (info->device_model_version) { case 1: return "rombios"; case 2: return "seabios"; diff -r adcd6ab160fa -r 3c10ba854d37 tools/libxl/libxl_types.idl --- a/tools/libxl/libxl_types.idl Thu Feb 23 10:29:27 2012 +0000 +++ b/tools/libxl/libxl_types.idl Wed Feb 29 13:00:06 2012 +0000 @@ -99,6 +99,12 @@ libxl_timer_mode = Enumeration("timer_mo (3, "one_missed_tick_pending"), ]) +libxl_bios_type = Enumeration("bios_type", [ + (1, "rombios"), + (2, "seabios"), + (3, "ovmf"), + ]) + # # Complex libxl types # @@ -228,6 +234,7 @@ libxl_domain_build_info = Struct("domain ("u", KeyedUnion(None, libxl_domain_type, "type", [("hvm", Struct(None, [("firmware", string), + ("bios", libxl_bios_type), ("pae", bool), ("apic", bool), ("acpi", bool), diff -r adcd6ab160fa -r 3c10ba854d37 tools/libxl/xl_cmdimpl.c --- a/tools/libxl/xl_cmdimpl.c Thu Feb 23 10:29:27 2012 +0000 +++ b/tools/libxl/xl_cmdimpl.c Wed Feb 29 13:00:06 2012 +0000 @@ -704,6 +704,12 @@ static void parse_config_data(const char xlu_cfg_replace_string (config, "firmware_override", &b_info->u.hvm.firmware, 0); + if (!xlu_cfg_get_string(config, "bios", &buf, 0) && + libxl_bios_type_from_string(buf, &b_info->u.hvm.bios)) { + fprintf(stderr, "ERROR: invalid value \"%s\" for \"bios\"\n", + buf); + exit (1); + } if (!xlu_cfg_get_long (config, "pae", &l, 0)) b_info->u.hvm.pae = l; if (!xlu_cfg_get_long (config, "apic", &l, 0))
Ian Jackson
2012-Feb-29 16:25 UTC
Re: [PATCH] [PATCH v4] Add the bios option to specify the bios to load
Attilio Rao writes ("[Xen-devel] [PATCH] [PATCH v4] Add the bios option to specify the bios to load"):> Signed-off-by: Attilio Rao <attilio.rao@citrix.com> > Acked-by: Ian Campbell <ian.campbell@citrix.com>Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Ian Campbell
2012-Feb-29 17:43 UTC
Re: [PATCH] [PATCH v4] Add the bios option to specify the bios to load
On Wed, 2012-02-29 at 16:25 +0000, Ian Jackson wrote:> Attilio Rao writes ("[Xen-devel] [PATCH] [PATCH v4] Add the bios option to specify the bios to load"): > > Signed-off-by: Attilio Rao <attilio.rao@citrix.com> > > Acked-by: Ian Campbell <ian.campbell@citrix.com> > > Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>There was a conflict between this and my "libxl: improved handling for default values in API" series. I''m rebasing now and will repost (probably in the morning at this point). Ian.
Ian Campbell
2012-Mar-01 10:58 UTC
Re: [PATCH] [PATCH v4] Add the bios option to specify the bios to load
On Wed, 2012-02-29 at 17:43 +0000, Ian Campbell wrote:> On Wed, 2012-02-29 at 16:25 +0000, Ian Jackson wrote: > > Attilio Rao writes ("[Xen-devel] [PATCH] [PATCH v4] Add the bios option to specify the bios to load"): > > > Signed-off-by: Attilio Rao <attilio.rao@citrix.com> > > > Acked-by: Ian Campbell <ian.campbell@citrix.com> > > > > Committed-by: Ian Jackson <ian.jackson@eu.citrix.com> > > There was a conflict between this and my "libxl: improved handling for > default values in API" series. I''m rebasing now and will repost > (probably in the morning at this point).See thread starting at <patchbomb.1330599009@cosworth.uk.xensource.com> Ian.
Ian Jackson
2012-Mar-01 11:20 UTC
Re: [PATCH] [PATCH v4] Add the bios option to specify the bios to load
Ian Campbell writes ("Re: [Xen-devel] [PATCH] [PATCH v4] Add the bios option to specify the bios to load"):> There was a conflict between this and my "libxl: improved handling for > default values in API" series. I''m rebasing now and will repost > (probably in the morning at this point).Oops, sorry. Ian.
Ian Campbell
2012-Mar-01 11:29 UTC
Re: [PATCH] [PATCH v4] Add the bios option to specify the bios to load
On Thu, 2012-03-01 at 11:20 +0000, Ian Jackson wrote:> Ian Campbell writes ("Re: [Xen-devel] [PATCH] [PATCH v4] Add the bios option to specify the bios to load"): > > There was a conflict between this and my "libxl: improved handling for > > default values in API" series. I''m rebasing now and will repost > > (probably in the morning at this point). > > Oops, sorry.No problem, I expected it. Ian.
Seemingly Similar Threads
- [PATCH] libxl: Add qxl vga interface support for upstream qemu
- [PATCH v2] libxl: spice usbredirection support for upstream qemu
- [PATCH v3] libxl: spice usbredirection support for upstream qemu
- Can not boot the OVMF
- [PATCH v3] libxl: support for "rtc_timeoffset" and "localtime"