On Thu, Mar 07, 2019 at 10:29:16AM +0100, Michal Privoznik wrote: > The idea is that using this attribute users enable libvirt to > automagically select firmware image for their domain. For > instance: > > <os firmware='efi'> > <type arch='x86_64' machine='pc-q35-4.0'>hvm</type> > <loader secure='no'/> Ah, now I see why you need <loader> without a path specified. We need to be able to set the secure attribute. > </os> > > <os firmware='bios'> > <type arch='x86_64' machine='pc-q35-4.0'>hvm</type> > </os> > > (The automagic of selecting firmware image will be described in > later commits.) > > Accepted values are 'bios' and 'efi' to let libvirt select > corresponding type of firmware. > > I know it is a good sign to introduce xml2xml test case when > changing XML config parser but that will have to come later. > Firmware auto selection is not enabled for any driver just yet so > any xml2xml test would fail right away. > > Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> > --- > docs/formatdomain.html.in | 22 +++++++++- > docs/schemas/domaincommon.rng | 8 ++++ > src/conf/domain_conf.c | 75 ++++++++++++++++++++++++++++------- > src/conf/domain_conf.h | 12 ++++++ > src/libvirt_private.syms | 2 + > 5 files changed, 103 insertions(+), 16 deletions(-) > > diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in > index eb00c01d96..fedca0eedc 100644 > --- a/docs/formatdomain.html.in > +++ b/docs/formatdomain.html.in > @@ -128,7 +128,7 @@ > > <pre> > ... > -<os> > +<os firmware='uefi'> > <type>hvm</type> > <loader readonly='yes' secure='no' type='rom'>/usr/lib/xen/boot/hvmloader</loader> > <nvram template='/usr/share/OVMF/OVMF_VARS.fd'>/var/lib/libvirt/nvram/guest_VARS.fd</nvram> > @@ -141,6 +141,26 @@ > ...</pre> > > <dl> > + <dt><code>firmware</code></dt> > + <dd>The <code>firmware</code> attribute allows management > + applications to automatically fill <code><loader/></code> > + and <code><nvram/></code> elements and possibly enable > + some features required by selected firmware. Accepted values are > + <code>bios</code> and <code>efi</code>.<br/> NB, this firmware attribute is something we'll want in the VMWare driver too. So the text from this point downwards should be explicitly noted as being specific to QEMU. Or maybe this text about search locations should just be in the drvqemu.html.in file, and linked from here ? > + The selection process scans for files describing installed > + firmware images in specified location and uses the most specific > + one which fulfils domain requirements. The locations in order of > + preference (from generic to most specific one) are: > + <ul> > + <li><code>/usr/share/qemu/firmware</code></li> > + <li><code>/etc/qemu/firmware</code></li> > + <li><code>$XDG_CONFIG_HOME/qemu/firmware</code></li> > + </ul> > + For more information refer to firmware metadata specification as > + described in <code>docs/interop/firmware.json</code> in QEMU > + repository. Regular users do not need to bother. > + <span class="since">Since 5.2.0 (QEMU and KVM only)</span> > + </dd> > <dt><code>type</code></dt> > <dd>The content of the <code>type</code> element specifies the > type of operating system to be booted in the virtual machine. Reviewed-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list