[libvirt] [PATCH v6 1/3] conf: Extend <loader/> and introduce <nvram/>

Ján Tomko jtomko at redhat.com
Tue Sep 9 15:17:08 UTC 2014


On 09/01/2014 05:22 PM, Michal Privoznik wrote:
> Up to now, users can configure BIOS via the <loader/> element. With
> the upcoming implementation of UEFI this is not enough as BIOS and
> UEFI are conceptually different. For instance, while BIOS is ROM, UEFI
> is programmable flash (although all writes to code section are
> denied). Therefore we need new attribute @type which will
> differentiate the two. Then, new attribute @readonly is introduced to
> reflect the fact that some images are RO.
> 
> Moreover, the OVMF (which is going to be used mostly), works in two
> modes:
> 1) Code and UEFI variable store is mixed in one file.
> 2) Code and UEFI variable store is separated in two files
> 
> The latter has advantage of updating the UEFI code without losing the
> configuration. However, in order to represent the latter case we need
> yet another XML element: <nvram/>. Currently, it has no additional
> attributes, it's just a bare element containing path to the variable
> store file.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> Acked-by: Laszlo Ersek <lersek at redhat.com>
> ---

ACK

> diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
> index 9586c3b..f09312a 100644
> --- a/src/conf/domain_conf.h
> +++ b/src/conf/domain_conf.h
> @@ -1628,6 +1628,26 @@ struct _virDomainBIOSDef {
>      int rt_delay;
>  };
>  
> +typedef enum {
> +    VIR_DOMAIN_LOADER_TYPE_ROM = 0,
> +    VIR_DOMAIN_LOADER_TYPE_PFLASH,
> +
> +    VIR_DOMAIN_LOADER_TYPE_LAST
> +} virDomainLoader;
> +
> +VIR_ENUM_DECL(virDomainLoader)
> +
> +typedef struct _virDomainLoaderDef virDomainLoaderDef;
> +typedef virDomainLoaderDef *virDomainLoaderDefPtr;
> +struct _virDomainLoaderDef {
> +    char *path;
> +    int readonly; /* enum virTristateBool */

This would look nicer indented to the same column as the comment below :)

> +    virDomainLoader type;
> +    char *nvram;    /* path to non-volatile RAM */
> +};
> +
> +void virDomainLoaderDefFree(virDomainLoaderDefPtr loader);
> +
>  /* Operating system configuration data & machine / arch */
>  typedef struct _virDomainOSDef virDomainOSDef;
>  typedef virDomainOSDef *virDomainOSDefPtr;

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140909/ec10407c/attachment-0001.sig>


More information about the libvir-list mailing list