Re: [PATCH v2 06/15] conf: Introduce firmware attribute to <os/>

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

 



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>
>  ...
> -&lt;os&gt;
> +&lt;os firmware='uefi'&gt;
>    &lt;type&gt;hvm&lt;/type&gt;
>    &lt;loader readonly='yes' secure='no' type='rom'&gt;/usr/lib/xen/boot/hvmloader&lt;/loader&gt;
>    &lt;nvram template='/usr/share/OVMF/OVMF_VARS.fd'&gt;/var/lib/libvirt/nvram/guest_VARS.fd&lt;/nvram&gt;
> @@ -141,6 +141,26 @@
>  ...</pre>
>  
>      <dl>
> +      <dt><code>firmware</code></dt>
> +      <dd>The <code>firmware</code> attribute allows management
> +        applications to automatically fill <code>&lt;loader/&gt;</code>
> +        and <code>&lt;nvram/&gt;</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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux