[libvirt] [PATCH 0/4] NVRAM store file format

The first patch is in fact unrelated, but trivial. The interesting work is done in the rest of the patches. Michal Privoznik (4): formatdomaincaps: Correctly format API reference conf: Allow UEFI NVRAM format selection qemu: Adapt to NVRAM store file format change domaincaps: Expose NVRAM store file format capabilities docs/formatdomain.html.in | 8 +++-- docs/formatdomaincaps.html.in | 20 +++++++++-- docs/schemas/domaincaps.rng | 13 +++++++ docs/schemas/domaincommon.rng | 8 +++++ src/conf/domain_capabilities.c | 17 +++++++++ src/conf/domain_capabilities.h | 1 + src/conf/domain_conf.c | 40 +++++++++++++++++----- src/conf/domain_conf.h | 10 ++++++ src/libvirt_private.syms | 2 ++ src/qemu/qemu_capabilities.c | 7 ++-- src/qemu/qemu_command.c | 6 ++-- tests/domaincapsschemadata/domaincaps-full.xml | 6 ++++ .../domaincaps-qemu_1.6.50-1.xml | 6 ++++ tests/domaincapstest.c | 1 + .../qemuxml2argv-bios-nvram-qcow2.args | 10 ++++++ .../qemuxml2argv-bios-nvram-qcow2.xml | 40 ++++++++++++++++++++++ tests/qemuxml2argvtest.c | 2 ++ .../qemuxml2xmlout-bios-nvram.xml | 40 ++++++++++++++++++++++ tests/qemuxml2xmltest.c | 2 +- 19 files changed, 220 insertions(+), 19 deletions(-) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-bios-nvram-qcow2.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-bios-nvram-qcow2.xml create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram.xml -- 2.0.5

Well, since the link to the virConnectGetDomainCapabilities API is in <pre/> section we must take special care about the spaces around the link. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- docs/formatdomaincaps.html.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in index 7beb5a4..850109f 100644 --- a/docs/formatdomaincaps.html.in +++ b/docs/formatdomaincaps.html.in @@ -44,9 +44,7 @@ 1.2.7</span>):</p> <pre> - <a href="/html/libvirt-libvirt-domain.html#virConnectGetDomainCapabilities"> - <code>virConnectGetDomainCapabilities</code> - </a> +<a href="/html/libvirt-libvirt-domain.html#virConnectGetDomainCapabilities">virConnectGetDomainCapabilities</a> </pre> <p>The root element that emulator capability XML document starts with has -- 2.0.5

On 01/13/15 14:41, Michal Privoznik wrote:
Well, since the link to the virConnectGetDomainCapabilities API is in <pre/> section we must take special care about the spaces around the link.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- docs/formatdomaincaps.html.in | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in index 7beb5a4..850109f 100644 --- a/docs/formatdomaincaps.html.in +++ b/docs/formatdomaincaps.html.in @@ -44,9 +44,7 @@ 1.2.7</span>):</p>
<pre> - <a href="/html/libvirt-libvirt-domain.html#virConnectGetDomainCapabilities"> - <code>virConnectGetDomainCapabilities</code> - </a> +<a href="/html/libvirt-libvirt-domain.html#virConnectGetDomainCapabilities">virConnectGetDomainCapabilities</a> </pre>
<p>The root element that emulator capability XML document starts with has
If it renders okay, I don't mind! :) Acked-by: Laszlo Ersek <lersek@redhat.com>

https://bugzilla.redhat.com/show_bug.cgi?id=1180955 Up till now, there was only one format for NVRAM store file. However, it's possible to convert the file to qcow2 (which supports interesting features, like snapshotting, for instance). Therefore, we want to allow format selection over the NVRAM store file. By default, the format is raw, but users can choose qcow2. In the domain XML this is expressed as @format attribute to <nvram/> element. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- docs/formatdomain.html.in | 8 +++-- docs/schemas/domaincommon.rng | 8 +++++ src/conf/domain_conf.c | 40 +++++++++++++++++----- src/conf/domain_conf.h | 10 ++++++ src/libvirt_private.syms | 2 ++ .../qemuxml2xmlout-bios-nvram.xml | 40 ++++++++++++++++++++++ tests/qemuxml2xmltest.c | 2 +- 7 files changed, 98 insertions(+), 12 deletions(-) create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram.xml diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 0c3343e..167114a 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -103,7 +103,7 @@ <os> <type>hvm</type> <loader readonly='yes' type='rom'>/usr/lib/xen/boot/hvmloader</loader> - <nvram template='/usr/share/OVMF/OVMF_VARS.fd'>/var/lib/libvirt/nvram/guest_VARS.fd</nvram> + <nvram template='/usr/share/OVMF/OVMF_VARS.fd' format='raw'>/var/lib/libvirt/nvram/guest_VARS.fd</nvram> <boot dev='hd'/> <boot dev='cdrom'/> <bootmenu enable='yes' timeout='3000'/> @@ -150,7 +150,11 @@ from the config file. Note, that for transient domains if the NVRAM file has been created by libvirt it is left behind and it is management application's responsibility to save and remove file (if needed to be - persistent). <span class="since">Since 1.2.8</span></dd> + persistent). <span class="since">Since 1.2.8</span> + Then, <span class="since">Since 1.2.12</span> it's possible to choose + the NVRAM file format: <code>raw</code> for raw NVRAM file (the + default) or <code>qcow2</code> if the file is converted to qcow2 + format.</dd> <dt><code>boot</code></dt> <dd>The <code>dev</code> attribute takes one of the values "fd", "hd", "cdrom" or "network" and is used to specify the next boot device diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 85b3709..0afd02a 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -269,6 +269,14 @@ </attribute> </optional> <optional> + <attribute name="format"> + <choice> + <value>raw</value> + <value>qcow2</value> + </choice> + </attribute> + </optional> + <optional> <ref name="absFilePath"/> </optional> </element> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3cbb93d..d3b6378 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -794,6 +794,11 @@ VIR_ENUM_IMPL(virDomainLoader, "rom", "pflash") +VIR_ENUM_IMPL(virDomainLoaderNVRAMFormat, + VIR_DOMAIN_LOADER_NVRAM_FORMAT_LAST, + "raw", + "qcow2") + /* Internal mapping: subset of block job types that can be present in * <mirror> XML (remaining types are not two-phase). */ VIR_ENUM_DECL(virDomainBlockJob) @@ -12617,16 +12622,18 @@ virDomainDefMaybeAddHostdevSCSIcontroller(virDomainDefPtr def) } static int -virDomainLoaderDefParseXML(xmlNodePtr node, +virDomainLoaderDefParseXML(xmlNodePtr loader_node, + xmlNodePtr nvram_node, virDomainLoaderDefPtr loader) { int ret = -1; char *readonly_str = NULL; char *type_str = NULL; + char *format_str = NULL; - readonly_str = virXMLPropString(node, "readonly"); - type_str = virXMLPropString(node, "type"); - loader->path = (char *) xmlNodeGetContent(node); + readonly_str = virXMLPropString(loader_node, "readonly"); + type_str = virXMLPropString(loader_node, "type"); + loader->path = (char *) xmlNodeGetContent(loader_node); if (readonly_str && (loader->readonly = virTristateBoolTypeFromString(readonly_str)) <= 0) { @@ -12645,10 +12652,24 @@ virDomainLoaderDefParseXML(xmlNodePtr node, loader->type = type; } + if (nvram_node) { + loader->nvram = (char *)xmlNodeGetContent(nvram_node); + loader->templt = virXMLPropString(nvram_node, "template"); + format_str = virXMLPropString(nvram_node, "format"); + + if (format_str && + (loader->nvramFormat = virDomainLoaderNVRAMFormatTypeFromString(format_str)) < 0) { + virReportError(VIR_ERR_XML_DETAIL, + _("unknown format value: %s"), format_str); + goto cleanup; + } + } + ret = 0; cleanup: VIR_FREE(readonly_str); VIR_FREE(type_str); + VIR_FREE(format_str); return ret; } @@ -13735,7 +13756,7 @@ virDomainDefParseXML(xmlDocPtr xml, if (STREQ(def->os.type, "xen") || STREQ(def->os.type, "hvm") || STREQ(def->os.type, "uml")) { - xmlNodePtr loader_node; + xmlNodePtr loader_node, nvram_node; def->os.kernel = virXPathString("string(./os/kernel[1])", ctxt); def->os.initrd = virXPathString("string(./os/initrd[1])", ctxt); @@ -13746,11 +13767,10 @@ virDomainDefParseXML(xmlDocPtr xml, if (VIR_ALLOC(def->os.loader) < 0) goto error; - if (virDomainLoaderDefParseXML(loader_node, def->os.loader) < 0) - goto error; + nvram_node = virXPathNode("./os/nvram[1]", ctxt); - def->os.loader->nvram = virXPathString("string(./os/nvram[1])", ctxt); - def->os.loader->templt = virXPathString("string(./os/nvram[1]/@template)", ctxt); + if (virDomainLoaderDefParseXML(loader_node, nvram_node, def->os.loader) < 0) + goto error; } } @@ -19288,6 +19308,8 @@ virDomainLoaderDefFormat(virBufferPtr buf, if (loader->nvram || loader->templt) { virBufferAddLit(buf, "<nvram"); virBufferEscapeString(buf, " template='%s'", loader->templt); + virBufferAsprintf(buf, " format='%s'", + virDomainLoaderNVRAMFormatTypeToString(loader->nvramFormat)); if (loader->nvram) virBufferEscapeString(buf, ">%s</nvram>\n", loader->nvram); else diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index ac1f4f8..428afcc 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1729,6 +1729,15 @@ typedef enum { VIR_ENUM_DECL(virDomainLoader) +typedef enum { + VIR_DOMAIN_LOADER_NVRAM_FORMAT_RAW = 0, + VIR_DOMAIN_LOADER_NVRAM_FORMAT_QCOW2, + + VIR_DOMAIN_LOADER_NVRAM_FORMAT_LAST +} virDomainLoaderNVRAMFormat; + +VIR_ENUM_DECL(virDomainLoaderNVRAMFormat) + typedef struct _virDomainLoaderDef virDomainLoaderDef; typedef virDomainLoaderDef *virDomainLoaderDefPtr; struct _virDomainLoaderDef { @@ -1737,6 +1746,7 @@ struct _virDomainLoaderDef { virDomainLoader type; char *nvram; /* path to non-volatile RAM */ char *templt; /* user override of path to master nvram */ + virDomainLoaderNVRAMFormat nvramFormat; }; void virDomainLoaderDefFree(virDomainLoaderDefPtr loader); diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index fb5d003..2dd73db 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -316,6 +316,8 @@ virDomainLifecycleTypeToString; virDomainListFree; virDomainLiveConfigHelperMethod; virDomainLoaderDefFree; +virDomainLoaderNVRAMFormatTypeFromString; +virDomainLoaderNVRAMFormatTypeToString; virDomainLoaderTypeFromString; virDomainLoaderTypeToString; virDomainLockFailureTypeFromString; diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram.xml new file mode 100644 index 0000000..f622e1c --- /dev/null +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram.xml @@ -0,0 +1,40 @@ +<domain type='qemu'> + <name>test-bios</name> + <uuid>362d1fc1-df7d-193e-5c18-49a71bd1da66</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader> + <nvram format='raw'>/usr/share/OVMF/OVMF_VARS.fd</nvram> + <boot dev='hd'/> + <bootmenu enable='yes'/> + </os> + <features> + <acpi/> + </features> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>restart</on_crash> + <devices> + <emulator>/usr/bin/qemu</emulator> + <disk type='block' device='disk'> + <source dev='/dev/HostVG/QEMUGuest1'/> + <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </disk> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <serial type='pty'> + <target port='0'/> + </serial> + <console type='pty'> + <target type='serial' port='0'/> + </console> + <input type='tablet' bus='usb'/> + <memballoon model='virtio'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 1166534..5238b09 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -404,7 +404,7 @@ mymain(void) DO_TEST_DIFFERENT("numatune-memnode"); DO_TEST("numatune-memnode-no-memory"); - DO_TEST("bios-nvram"); + DO_TEST_DIFFERENT("bios-nvram"); DO_TEST("tap-vhost"); DO_TEST("shmem"); -- 2.0.5

comments below On 01/13/15 14:41, Michal Privoznik wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1180955
Up till now, there was only one format for NVRAM store file. However, it's possible to convert the file to qcow2 (which supports interesting features, like snapshotting, for instance). Therefore, we want to allow format selection over the NVRAM store file. By default, the format is raw, but users can choose qcow2. In the domain XML this is expressed as @format attribute to <nvram/> element.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- docs/formatdomain.html.in | 8 +++-- docs/schemas/domaincommon.rng | 8 +++++ src/conf/domain_conf.c | 40 +++++++++++++++++----- src/conf/domain_conf.h | 10 ++++++ src/libvirt_private.syms | 2 ++ .../qemuxml2xmlout-bios-nvram.xml | 40 ++++++++++++++++++++++ tests/qemuxml2xmltest.c | 2 +- 7 files changed, 98 insertions(+), 12 deletions(-) create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram.xml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 0c3343e..167114a 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -103,7 +103,7 @@ <os> <type>hvm</type> <loader readonly='yes' type='rom'>/usr/lib/xen/boot/hvmloader</loader> - <nvram template='/usr/share/OVMF/OVMF_VARS.fd'>/var/lib/libvirt/nvram/guest_VARS.fd</nvram> + <nvram template='/usr/share/OVMF/OVMF_VARS.fd' format='raw'>/var/lib/libvirt/nvram/guest_VARS.fd</nvram> <boot dev='hd'/> <boot dev='cdrom'/> <bootmenu enable='yes' timeout='3000'/> @@ -150,7 +150,11 @@ from the config file. Note, that for transient domains if the NVRAM file has been created by libvirt it is left behind and it is management application's responsibility to save and remove file (if needed to be - persistent). <span class="since">Since 1.2.8</span></dd> + persistent). <span class="since">Since 1.2.8</span> + Then, <span class="since">Since 1.2.12</span> it's possible to choose
You're mid-sentence; I think it should be "since", not "Since". Alternatively, drop "Then, ".
+ the NVRAM file format: <code>raw</code> for raw NVRAM file (the + default) or <code>qcow2</code> if the file is converted to qcow2 + format.</dd>
s/is converted to/has/. We shouldn't imply any activity wrt. to the conversion.
<dt><code>boot</code></dt> <dd>The <code>dev</code> attribute takes one of the values "fd", "hd", "cdrom" or "network" and is used to specify the next boot device diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 85b3709..0afd02a 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -269,6 +269,14 @@ </attribute> </optional> <optional> + <attribute name="format"> + <choice> + <value>raw</value> + <value>qcow2</value> + </choice> + </attribute> + </optional> + <optional> <ref name="absFilePath"/> </optional> </element>
Okay, since we seem to be past the specification part, some points to consider: - the format specified for <nvram> affects the nvram template the same way (which is given, if it is given, in another attribute of <nvram>). I think no extra code should be necessary here, but maybe the docs should mention it somewhere. (Just an idea to consider.) The "instantiation from the template" logic doesn't care, so that's fine. - Don't forget the unified (non-split) case, when you have no <nvram> element at all, but you have a *read-write* pflash *loader*. (Containing both executable code & the varstore.) You need a format specification for the loader too. (On the qemu level, it's (almost) just another pflash drive, so it has a format, and some users might want to use a unified OVMF.fd, without separate nvram, template etc.) This use case is only important for: <loader readonly='no' type='pflash'>.../OVMF.fd</loader>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3cbb93d..d3b6378 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -794,6 +794,11 @@ VIR_ENUM_IMPL(virDomainLoader, "rom", "pflash")
+VIR_ENUM_IMPL(virDomainLoaderNVRAMFormat, + VIR_DOMAIN_LOADER_NVRAM_FORMAT_LAST, + "raw", + "qcow2") + /* Internal mapping: subset of block job types that can be present in * <mirror> XML (remaining types are not two-phase). */ VIR_ENUM_DECL(virDomainBlockJob) @@ -12617,16 +12622,18 @@ virDomainDefMaybeAddHostdevSCSIcontroller(virDomainDefPtr def) }
static int -virDomainLoaderDefParseXML(xmlNodePtr node, +virDomainLoaderDefParseXML(xmlNodePtr loader_node, + xmlNodePtr nvram_node, virDomainLoaderDefPtr loader) { int ret = -1; char *readonly_str = NULL; char *type_str = NULL; + char *format_str = NULL;
- readonly_str = virXMLPropString(node, "readonly"); - type_str = virXMLPropString(node, "type"); - loader->path = (char *) xmlNodeGetContent(node); + readonly_str = virXMLPropString(loader_node, "readonly"); + type_str = virXMLPropString(loader_node, "type"); + loader->path = (char *) xmlNodeGetContent(loader_node);
if (readonly_str && (loader->readonly = virTristateBoolTypeFromString(readonly_str)) <= 0) { @@ -12645,10 +12652,24 @@ virDomainLoaderDefParseXML(xmlNodePtr node, loader->type = type; }
+ if (nvram_node) { + loader->nvram = (char *)xmlNodeGetContent(nvram_node); + loader->templt = virXMLPropString(nvram_node, "template"); + format_str = virXMLPropString(nvram_node, "format"); + + if (format_str && + (loader->nvramFormat = virDomainLoaderNVRAMFormatTypeFromString(format_str)) < 0) { + virReportError(VIR_ERR_XML_DETAIL, + _("unknown format value: %s"), format_str);
not sure if this reports detailed location info; I guess you could mention <nvram>. (Again, not sure about the tradition here.)
+ goto cleanup; + } + } +
I'm confused. Aside from our wish to add "format" to <loader> as well, ie. accepting for a minute that only <nvram> gets the new attribute: why are we populating loader->nvram and loader->templt here? These changes seem to be unrelated to our goal.
ret = 0; cleanup: VIR_FREE(readonly_str); VIR_FREE(type_str); + VIR_FREE(format_str); return ret; }
@@ -13735,7 +13756,7 @@ virDomainDefParseXML(xmlDocPtr xml, if (STREQ(def->os.type, "xen") || STREQ(def->os.type, "hvm") || STREQ(def->os.type, "uml")) { - xmlNodePtr loader_node; + xmlNodePtr loader_node, nvram_node;
def->os.kernel = virXPathString("string(./os/kernel[1])", ctxt); def->os.initrd = virXPathString("string(./os/initrd[1])", ctxt); @@ -13746,11 +13767,10 @@ virDomainDefParseXML(xmlDocPtr xml, if (VIR_ALLOC(def->os.loader) < 0) goto error;
- if (virDomainLoaderDefParseXML(loader_node, def->os.loader) < 0) - goto error; + nvram_node = virXPathNode("./os/nvram[1]", ctxt);
- def->os.loader->nvram = virXPathString("string(./os/nvram[1])", ctxt); - def->os.loader->templt = virXPathString("string(./os/nvram[1]/@template)", ctxt); + if (virDomainLoaderDefParseXML(loader_node, nvram_node, def->os.loader) < 0) + goto error; } }
I guess this simplification makes sense (for loader->nvram and loader->templt), but, if you need it, could you extract this change into a separate patch?
@@ -19288,6 +19308,8 @@ virDomainLoaderDefFormat(virBufferPtr buf, if (loader->nvram || loader->templt) { virBufferAddLit(buf, "<nvram"); virBufferEscapeString(buf, " template='%s'", loader->templt); + virBufferAsprintf(buf, " format='%s'", + virDomainLoaderNVRAMFormatTypeToString(loader->nvramFormat)); if (loader->nvram) virBufferEscapeString(buf, ">%s</nvram>\n", loader->nvram); else diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index ac1f4f8..428afcc 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1729,6 +1729,15 @@ typedef enum {
VIR_ENUM_DECL(virDomainLoader)
+typedef enum { + VIR_DOMAIN_LOADER_NVRAM_FORMAT_RAW = 0, + VIR_DOMAIN_LOADER_NVRAM_FORMAT_QCOW2, + + VIR_DOMAIN_LOADER_NVRAM_FORMAT_LAST +} virDomainLoaderNVRAMFormat; + +VIR_ENUM_DECL(virDomainLoaderNVRAMFormat) + typedef struct _virDomainLoaderDef virDomainLoaderDef; typedef virDomainLoaderDef *virDomainLoaderDefPtr; struct _virDomainLoaderDef { @@ -1737,6 +1746,7 @@ struct _virDomainLoaderDef { virDomainLoader type; char *nvram; /* path to non-volatile RAM */ char *templt; /* user override of path to master nvram */ + virDomainLoaderNVRAMFormat nvramFormat; };
void virDomainLoaderDefFree(virDomainLoaderDefPtr loader); diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index fb5d003..2dd73db 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -316,6 +316,8 @@ virDomainLifecycleTypeToString; virDomainListFree; virDomainLiveConfigHelperMethod; virDomainLoaderDefFree; +virDomainLoaderNVRAMFormatTypeFromString; +virDomainLoaderNVRAMFormatTypeToString; virDomainLoaderTypeFromString; virDomainLoaderTypeToString; virDomainLockFailureTypeFromString; diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram.xml new file mode 100644 index 0000000..f622e1c --- /dev/null +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram.xml @@ -0,0 +1,40 @@ +<domain type='qemu'> + <name>test-bios</name> + <uuid>362d1fc1-df7d-193e-5c18-49a71bd1da66</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader> + <nvram format='raw'>/usr/share/OVMF/OVMF_VARS.fd</nvram> + <boot dev='hd'/> + <bootmenu enable='yes'/> + </os> + <features> + <acpi/> + </features> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>restart</on_crash> + <devices> + <emulator>/usr/bin/qemu</emulator> + <disk type='block' device='disk'> + <source dev='/dev/HostVG/QEMUGuest1'/> + <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </disk> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <serial type='pty'> + <target port='0'/> + </serial> + <console type='pty'> + <target type='serial' port='0'/> + </console> + <input type='tablet' bus='usb'/> + <memballoon model='virtio'/> + </devices> +</domain> diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 1166534..5238b09 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -404,7 +404,7 @@ mymain(void) DO_TEST_DIFFERENT("numatune-memnode"); DO_TEST("numatune-memnode-no-memory");
- DO_TEST("bios-nvram"); + DO_TEST_DIFFERENT("bios-nvram");
DO_TEST("tap-vhost"); DO_TEST("shmem");
I hope I didn't miss anything. Thanks Laszlo

This basically implements the availability of choosing NVRAM store file format in the qemu driver. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_command.c | 6 ++-- .../qemuxml2argv-bios-nvram-qcow2.args | 10 ++++++ .../qemuxml2argv-bios-nvram-qcow2.xml | 40 ++++++++++++++++++++++ tests/qemuxml2argvtest.c | 2 ++ 4 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-bios-nvram-qcow2.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-bios-nvram-qcow2.xml diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 3346e95..311cd98 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7708,8 +7708,10 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd, if (loader->nvram) { virBufferFreeAndReset(&buf); virBufferAsprintf(&buf, - "file=%s,if=pflash,format=raw,unit=%d", - loader->nvram, unit); + "file=%s,if=pflash,format=%s,unit=%d", + loader->nvram, + virDomainLoaderNVRAMFormatTypeToString(loader->nvramFormat), + unit); virCommandAddArg(cmd, "-drive"); virCommandAddArgBuffer(cmd, &buf); diff --git a/tests/qemuxml2argvdata/qemuxml2argv-bios-nvram-qcow2.args b/tests/qemuxml2argvdata/qemuxml2argv-bios-nvram-qcow2.args new file mode 100644 index 0000000..b9575e4 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-bios-nvram-qcow2.args @@ -0,0 +1,10 @@ +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \ +/usr/bin/qemu -S -M pc \ +-drive file=/usr/share/OVMF/OVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on \ +-drive file=/usr/share/OVMF/OVMF_VARS.qcow2,if=pflash,format=qcow2,unit=1 \ +-m 1024 -smp 1 -nographic -nodefaults \ +-monitor unix:/tmp/test-monitor,server,nowait -boot c -usb \ +-drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-ide0-0-0,format=raw \ +-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ +-serial pty -device usb-tablet,id=input0 \ +-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-bios-nvram-qcow2.xml b/tests/qemuxml2argvdata/qemuxml2argv-bios-nvram-qcow2.xml new file mode 100644 index 0000000..25870f4 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-bios-nvram-qcow2.xml @@ -0,0 +1,40 @@ +<domain type='qemu'> + <name>test-bios</name> + <uuid>362d1fc1-df7d-193e-5c18-49a71bd1da66</uuid> + <memory unit='KiB'>1048576</memory> + <currentMemory unit='KiB'>1048576</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='pc'>hvm</type> + <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader> + <nvram format='qcow2'>/usr/share/OVMF/OVMF_VARS.qcow2</nvram> + <boot dev='hd'/> + <bootmenu enable='yes'/> + </os> + <features> + <acpi/> + </features> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>restart</on_crash> + <devices> + <emulator>/usr/bin/qemu</emulator> + <disk type='block' device='disk'> + <source dev='/dev/HostVG/QEMUGuest1'/> + <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </disk> + <controller type='usb' index='0'/> + <controller type='ide' index='0'/> + <controller type='pci' index='0' model='pci-root'/> + <serial type='pty'> + <target port='0'/> + </serial> + <console type='pty'> + <target type='serial' port='0'/> + </console> + <input type='tablet' bus='usb'/> + <memballoon model='virtio'/> + </devices> +</domain> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 1d0bd61..86b3d0e 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -665,6 +665,8 @@ mymain(void) DO_TEST("bios", QEMU_CAPS_DEVICE, QEMU_CAPS_SGA); DO_TEST("bios-nvram", QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE, QEMU_CAPS_DRIVE_FORMAT, QEMU_CAPS_DRIVE_READONLY); + DO_TEST("bios-nvram-qcow2", QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE, + QEMU_CAPS_DRIVE_FORMAT, QEMU_CAPS_DRIVE_READONLY); DO_TEST("clock-utc", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE); DO_TEST("clock-localtime", NONE); DO_TEST("clock-localtime-basis-localtime", QEMU_CAPS_RTC); -- 2.0.5

comments below On 01/13/15 14:41, Michal Privoznik wrote:
This basically implements the availability of choosing NVRAM store file format in the qemu driver.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- src/qemu/qemu_command.c | 6 ++-- .../qemuxml2argv-bios-nvram-qcow2.args | 10 ++++++ .../qemuxml2argv-bios-nvram-qcow2.xml | 40 ++++++++++++++++++++++ tests/qemuxml2argvtest.c | 2 ++ 4 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-bios-nvram-qcow2.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-bios-nvram-qcow2.xml
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 3346e95..311cd98 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7708,8 +7708,10 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd, if (loader->nvram) { virBufferFreeAndReset(&buf); virBufferAsprintf(&buf, - "file=%s,if=pflash,format=raw,unit=%d", - loader->nvram, unit); + "file=%s,if=pflash,format=%s,unit=%d", + loader->nvram, + virDomainLoaderNVRAMFormatTypeToString(loader->nvramFormat), + unit);
virCommandAddArg(cmd, "-drive"); virCommandAddArgBuffer(cmd, &buf);
This formats the command line fragment for unit#1. But, as discussed before, we need to be able to specify the format for unit#0 as well, here under VIR_DOMAIN_LOADER_TYPE_PFLASH. Not particularly necessary for "readonly", but necessary for the unified (consequently: read-write) case, when loader->nvram is NULL. (I suggest (in line with libvirt tradition) that you *not* try to lock down the various combinations of the flags; let qemu worry about that. Just transform the config bits to syntactically valid qemu options. IOW the above seems structurally sufficient; don't bother about the interplay between readonly, nvram, etc etc.) [snip] Thanks! Laszlo

It would be nice if we expose the capability of choosing the NVRAM store file format among with all the possibilities. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- docs/formatdomaincaps.html.in | 16 ++++++++++++++++ docs/schemas/domaincaps.rng | 13 +++++++++++++ src/conf/domain_capabilities.c | 17 +++++++++++++++++ src/conf/domain_capabilities.h | 1 + src/qemu/qemu_capabilities.c | 7 +++++-- tests/domaincapsschemadata/domaincaps-full.xml | 6 ++++++ tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml | 6 ++++++ tests/domaincapstest.c | 1 + 8 files changed, 65 insertions(+), 2 deletions(-) diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in index 850109f..05a67b8 100644 --- a/docs/formatdomaincaps.html.in +++ b/docs/formatdomaincaps.html.in @@ -118,6 +118,12 @@ <value>no</value> </enum> </loader> + <nvram supported='yes'> + <enum name='format'> + <value>raw</value> + <value>qcow2</value> + </enum> + </nvram> </os> ... <domainCapabilities> @@ -142,6 +148,16 @@ <loader/> element.</dd> </dl> + <p>For the <code>nvram</code> element, the following can occur:</p> + + <dl> + <dt>format</dt> + <dd>What formats of NVRAM file are supported. The default is + <code>raw</code> which is delivered in the packages. However, in some + distributions, the <code>qcow2</code> may be delivered too. This refers + to <code>format</code> attribute of the <nvram/> element.</dd> + </dl> + <h3><a name="elementsDevices">Devices</a></h3> <p> diff --git a/docs/schemas/domaincaps.rng b/docs/schemas/domaincaps.rng index 35d3745..e8a1e59 100644 --- a/docs/schemas/domaincaps.rng +++ b/docs/schemas/domaincaps.rng @@ -54,6 +54,16 @@ </element> </define> + <define name='nvram'> + <element name='nvram'> + <ref name='supported'/> + <optional> + <ref name='value'/> + </optional> + <ref name='enum'/> + </element> + </define> + <define name='os'> <element name='os'> <interleave> @@ -61,6 +71,9 @@ <optional> <ref name='loader'/> </optional> + <optional> + <ref name='nvram'/> + </optional> </interleave> </element> </define> diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 7c59912..d545fcc 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -221,6 +221,22 @@ virDomainCapsLoaderFormat(virBufferPtr buf, } static void +virDomainCapsNVRAMFormat(virBufferPtr buf, + virDomainCapsLoaderPtr nvram) +{ + /* Even though the type of @nvram would suggest naming it + * differently than 'nvram' ('loader' for instance), keep in + * mind that the FORMAT_PROLOGUE macro emits the variable + * name into the XML where we want to see 'nvram'. Really. */ + FORMAT_PROLOGUE(nvram); + + virDomainCapsEnumFormat(buf, &nvram->nvramFormat, "format", + virDomainLoaderNVRAMFormatTypeToString); + + FORMAT_EPILOGUE(nvram); +} + +static void virDomainCapsOSFormat(virBufferPtr buf, virDomainCapsOSPtr os) { @@ -229,6 +245,7 @@ virDomainCapsOSFormat(virBufferPtr buf, FORMAT_PROLOGUE(os); virDomainCapsLoaderFormat(buf, loader); + virDomainCapsNVRAMFormat(buf, loader); FORMAT_EPILOGUE(os); } diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h index 597ac75..f878a67 100644 --- a/src/conf/domain_capabilities.h +++ b/src/conf/domain_capabilities.h @@ -57,6 +57,7 @@ struct _virDomainCapsLoader { virDomainCapsStringValues values; /* Info about values for the element */ virDomainCapsEnum type; /* Info about virDomainLoader */ virDomainCapsEnum readonly; /* Info about readonly:virTristateBool */ + virDomainCapsEnum nvramFormat; /* Info about virDomainLoaderNVRAMFormat */ }; typedef struct _virDomainCapsOS virDomainCapsOS; diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 13f3cd3..858ef8d 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3706,10 +3706,13 @@ virQEMUCapsFillDomainLoaderCaps(virQEMUCapsPtr qemuCaps, VIR_DOMAIN_LOADER_TYPE_ROM); if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE) && - virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_FORMAT)) + virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_FORMAT)) { VIR_DOMAIN_CAPS_ENUM_SET(capsLoader->type, VIR_DOMAIN_LOADER_TYPE_PFLASH); - + VIR_DOMAIN_CAPS_ENUM_SET(capsLoader->nvramFormat, + VIR_DOMAIN_LOADER_NVRAM_FORMAT_RAW, + VIR_DOMAIN_LOADER_NVRAM_FORMAT_QCOW2); + } if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_READONLY)) VIR_DOMAIN_CAPS_ENUM_SET(capsLoader->readonly, diff --git a/tests/domaincapsschemadata/domaincaps-full.xml b/tests/domaincapsschemadata/domaincaps-full.xml index 96202bc..8a3902e 100644 --- a/tests/domaincapsschemadata/domaincaps-full.xml +++ b/tests/domaincapsschemadata/domaincaps-full.xml @@ -18,6 +18,12 @@ <value>no</value> </enum> </loader> + <nvram supported='yes'> + <enum name='format'> + <value>raw</value> + <value>qcow2</value> + </enum> + </nvram> </os> <devices> <disk supported='yes'> diff --git a/tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml b/tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml index 346ef65..4ba0324 100644 --- a/tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml +++ b/tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml @@ -15,6 +15,12 @@ <value>no</value> </enum> </loader> + <nvram supported='yes'> + <enum name='format'> + <value>raw</value> + <value>qcow2</value> + </enum> + </nvram> </os> <devices> <disk supported='yes'> diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index 70d2ef3..328ce5e 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -70,6 +70,7 @@ fillAll(virDomainCapsPtr domCaps, loader->device.supported = true; SET_ALL_BITS(loader->type); SET_ALL_BITS(loader->readonly); + SET_ALL_BITS(loader->nvramFormat); if (fillStringValues(&loader->values, "/foo/bar", "/tmp/my_path", -- 2.0.5

comments below On 01/13/15 14:41, Michal Privoznik wrote:
It would be nice if we expose the capability of choosing the NVRAM store file format among with all the possibilities.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- docs/formatdomaincaps.html.in | 16 ++++++++++++++++ docs/schemas/domaincaps.rng | 13 +++++++++++++ src/conf/domain_capabilities.c | 17 +++++++++++++++++ src/conf/domain_capabilities.h | 1 + src/qemu/qemu_capabilities.c | 7 +++++-- tests/domaincapsschemadata/domaincaps-full.xml | 6 ++++++ tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml | 6 ++++++ tests/domaincapstest.c | 1 + 8 files changed, 65 insertions(+), 2 deletions(-)
diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in index 850109f..05a67b8 100644 --- a/docs/formatdomaincaps.html.in +++ b/docs/formatdomaincaps.html.in @@ -118,6 +118,12 @@ <value>no</value> </enum> </loader> + <nvram supported='yes'> + <enum name='format'> + <value>raw</value> + <value>qcow2</value> + </enum> + </nvram> </os> ... <domainCapabilities> @@ -142,6 +148,16 @@ <loader/> element.</dd> </dl>
+ <p>For the <code>nvram</code> element, the following can occur:</p>
s/occur/be listed/; I think. (May not be right for the capability docs.) Also, mention <loader>.
+ + <dl> + <dt>format</dt> + <dd>What formats of NVRAM file are supported. The default is + <code>raw</code> which is delivered in the packages. However, in some + distributions, the <code>qcow2</code> may be delivered too. This refers + to <code>format</code> attribute of the <nvram/> element.</dd> + </dl> +
I think the language about packages and distributions should be omitted.
<h3><a name="elementsDevices">Devices</a></h3>
<p> diff --git a/docs/schemas/domaincaps.rng b/docs/schemas/domaincaps.rng index 35d3745..e8a1e59 100644 --- a/docs/schemas/domaincaps.rng +++ b/docs/schemas/domaincaps.rng @@ -54,6 +54,16 @@ </element> </define>
+ <define name='nvram'> + <element name='nvram'> + <ref name='supported'/> + <optional> + <ref name='value'/> + </optional> + <ref name='enum'/> + </element> + </define> + <define name='os'> <element name='os'> <interleave> @@ -61,6 +71,9 @@ <optional> <ref name='loader'/> </optional> + <optional> + <ref name='nvram'/> + </optional> </interleave> </element> </define> diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index 7c59912..d545fcc 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -221,6 +221,22 @@ virDomainCapsLoaderFormat(virBufferPtr buf, }
static void +virDomainCapsNVRAMFormat(virBufferPtr buf, + virDomainCapsLoaderPtr nvram) +{ + /* Even though the type of @nvram would suggest naming it + * differently than 'nvram' ('loader' for instance), keep in + * mind that the FORMAT_PROLOGUE macro emits the variable + * name into the XML where we want to see 'nvram'. Really. */ + FORMAT_PROLOGUE(nvram); + + virDomainCapsEnumFormat(buf, &nvram->nvramFormat, "format", + virDomainLoaderNVRAMFormatTypeToString); + + FORMAT_EPILOGUE(nvram); +} + +static void virDomainCapsOSFormat(virBufferPtr buf, virDomainCapsOSPtr os) { @@ -229,6 +245,7 @@ virDomainCapsOSFormat(virBufferPtr buf, FORMAT_PROLOGUE(os);
virDomainCapsLoaderFormat(buf, loader); + virDomainCapsNVRAMFormat(buf, loader);
FORMAT_EPILOGUE(os); } diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h index 597ac75..f878a67 100644 --- a/src/conf/domain_capabilities.h +++ b/src/conf/domain_capabilities.h @@ -57,6 +57,7 @@ struct _virDomainCapsLoader { virDomainCapsStringValues values; /* Info about values for the element */ virDomainCapsEnum type; /* Info about virDomainLoader */ virDomainCapsEnum readonly; /* Info about readonly:virTristateBool */ + virDomainCapsEnum nvramFormat; /* Info about virDomainLoaderNVRAMFormat */ };
typedef struct _virDomainCapsOS virDomainCapsOS; diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 13f3cd3..858ef8d 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3706,10 +3706,13 @@ virQEMUCapsFillDomainLoaderCaps(virQEMUCapsPtr qemuCaps, VIR_DOMAIN_LOADER_TYPE_ROM);
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE) && - virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_FORMAT)) + virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_FORMAT)) { VIR_DOMAIN_CAPS_ENUM_SET(capsLoader->type, VIR_DOMAIN_LOADER_TYPE_PFLASH); - + VIR_DOMAIN_CAPS_ENUM_SET(capsLoader->nvramFormat, + VIR_DOMAIN_LOADER_NVRAM_FORMAT_RAW, + VIR_DOMAIN_LOADER_NVRAM_FORMAT_QCOW2); + }
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_READONLY)) VIR_DOMAIN_CAPS_ENUM_SET(capsLoader->readonly, diff --git a/tests/domaincapsschemadata/domaincaps-full.xml b/tests/domaincapsschemadata/domaincaps-full.xml index 96202bc..8a3902e 100644 --- a/tests/domaincapsschemadata/domaincaps-full.xml +++ b/tests/domaincapsschemadata/domaincaps-full.xml @@ -18,6 +18,12 @@ <value>no</value> </enum> </loader> + <nvram supported='yes'> + <enum name='format'> + <value>raw</value> + <value>qcow2</value> + </enum> + </nvram> </os> <devices> <disk supported='yes'> diff --git a/tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml b/tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml index 346ef65..4ba0324 100644 --- a/tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml +++ b/tests/domaincapsschemadata/domaincaps-qemu_1.6.50-1.xml @@ -15,6 +15,12 @@ <value>no</value> </enum> </loader> + <nvram supported='yes'> + <enum name='format'> + <value>raw</value> + <value>qcow2</value> + </enum> + </nvram> </os> <devices> <disk supported='yes'> diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index 70d2ef3..328ce5e 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -70,6 +70,7 @@ fillAll(virDomainCapsPtr domCaps, loader->device.supported = true; SET_ALL_BITS(loader->type); SET_ALL_BITS(loader->readonly); + SET_ALL_BITS(loader->nvramFormat); if (fillStringValues(&loader->values, "/foo/bar", "/tmp/my_path",
The rest seems okay to me (but you could sell me anything around these parts :)) Thanks Laszlo
participants (2)
-
Laszlo Ersek
-
Michal Privoznik