libvirt/libvirt-qemu_firmware-Remove-NVRAM-to-loader-format-copy-hack.patch
Jiri Denemark 8d2da0bba7 libvirt-11.10.0-11.el10
- qemu_firmware: Drop support for kernel descriptors (RHEL-82645)
- qemu_firmware: Drop 'nvram' local variable (RHEL-82645)
- qemu_firmware: Move format=raw compat exception (RHEL-82645)
- qemu_firmware: Move copying of nvram.format to loader.format (RHEL-82645)
- tests: Add firmware-manual-efi-rw-nvram (RHEL-82645)
- domain_validate: Reject NVRAM with read/write firmware (RHEL-82645)
- tests: Add firmware-auto-bios-rw (RHEL-82645)
- tests: Add firmware-manual-bios-rw (RHEL-82645)
- domain_validate: Reject read/write ROMs (RHEL-82645)
- tests: Add firmware-auto-efi-format-loader-qcow2-rom (RHEL-82645)
- domain_validate: Reject ROMs with format other than raw (RHEL-82645)
- qemu_firmware: Ignore stateless/combined when NVRAM is configured (RHEL-82645)
- qemu_firmware: Drop fallback for absent nvramTemplateFormat (RHEL-82645)
- schemas: Allow templateFormat without template path (RHEL-82645)
- tests: Add firmware-manual-efi-nvram-template-nonstandard-format (RHEL-82645)
- tests: Add firmware-manual-efi-nvram-template-nonstandard-legacy-paths (RHEL-82645)
- tests: Add firmware-auto-efi-format-nvram-raw (RHEL-82645)
- tests: Add firmware-auto-efi-format-nvram-raw-loader-path (RHEL-82645)
- tests: Add firmware-auto-efi-format-nvram-raw-nvramtemplate-path (RHEL-82645)
- tests: Add firmware-auto-efi-format-nvramtemplate-qcow2 (RHEL-82645)
- tests: Add firmware-auto-efi-format-mismatch-nvramtemplate (RHEL-82645)
- qemu_firmware: Introduce qemuFirmwareFillDomainCustom() (RHEL-82645)
- qemu_firmware: Set templateFormat for custom paths (RHEL-82645)
- qemu_firmware: Simplify handling of legacy paths (RHEL-82645)
- qemu_firmware: Refactor setting NVRAM format (RHEL-82645)
- qemu_firmware: Prefer template format to loader format (RHEL-82645)
- qemu_firmware: Retain user-specified NVRAM format (RHEL-82645)
- qemu_firmware: Take templateFormat into account when matching (RHEL-82645)
- qemu_firmware: Take NVRAM format into account when matching (RHEL-82645)
- qemu_firmware: Remove NVRAM to loader format copy hack (RHEL-82645)
- tests: Add firmware-manual-efi-sev-snp (RHEL-82645)
- tests: Add firmware-manual-efi-tdx (RHEL-82645)
- qemu_firmware: ROM firmware is always in raw format (RHEL-82645)
- qemu_firmware: Don't skip autoselection for ROM (RHEL-82645)
- qemu_firmware: Allow matching both UEFI and BIOS for ROM loader (RHEL-82645)
- schema: Add firmwareFeatures element for domaincaps (RHEL-82645)
- conf: Add firmwareFeatures element for domaincaps (RHEL-82645)
- qemu: Fill in firmwareFeature element for domaincaps (RHEL-82645)
- docs: Document firmwareFeature element for domaincaps (RHEL-82645)
- docs: Rename "BIOS bootloader" section to "guest firmware" (RHEL-82645)
- docs: Improvement related to firmware selection (RHEL-82645)
- qemu_firmware: Only set format for custom loader if path is present (RHEL-82645)
- conf: Move type=rom default for loader to drivers (RHEL-82645)
- tests: Rename custom JSON firmware descriptors (RHEL-82645)
- schema: Introduce osnvram define (RHEL-82645)
- conf: Parse and format varstore element (RHEL-82645)
- conf: Update validation to consider varstore element (RHEL-82645)
- qemu_capabilities: Introduce QEMU_CAPS_DEVICE_UEFI_VARS (RHEL-82645)
- qemu: Validate presence of uefi-vars device (RHEL-82645)
- tests: Add firmware-manual-efi-varstore-q35 (RHEL-82645)
- tests: Add firmware-manual-efi-varstore-aarch64 (RHEL-82645)
- tests: Add firmware-auto-efi-varstore-q35 (RHEL-82645)
- tests: Add firmware-auto-efi-varstore-aarch64 (RHEL-82645)
- tests: Add firmware-auto-efi-enrolled-keys-aarch64 (RHEL-82645)
- qemu_firmware: Parse host-uefi-vars firmware feature (RHEL-82645)
- qemu_firmware: Split sanity check (RHEL-82645)
- qemu_firmware: Consider host-uefi-vars feature in sanity check (RHEL-82645)
- qemu_firmware: Support extended syntax for ROM firmware descriptors (RHEL-82645)
- qemu_firmware: Report NVRAM template path for ROMs (RHEL-82645)
- conf: Include varstore element in domcaps (RHEL-82645)
- qemu: Fill in varstore element in domcaps (RHEL-82645)
- qemu_firmware: Use of NVRAM implies stateful firmware (RHEL-82645)
- qemu_firmware: Allow matching stateful ROMs (RHEL-82645)
- qemu_firmware: Fill in varstore information (RHEL-82645)
- qemu: Introduce varstoreDir (RHEL-82645)
- qemu_firmware: Generate varstore path when necessary (RHEL-82645)
- qemu: Introduce qemuPrepareNVRAMFileCommon() (RHEL-82645)
- qemu: Create and delete varstore file (RHEL-82645)
- security: Mark ROMs as read only when using AppArmor (RHEL-82645)
- security: Handle varstore file (RHEL-82645)
- tests: Add firmware descriptors for uefi-vars builds (RHEL-82645)
- qemu_command: Use uefi-vars device where appropriate (RHEL-82645)
- include: Mention varstore where applicable (RHEL-82645)
- virsh: Update for varstore handling (RHEL-82645)
- domain_conf: initialize network hostdev private data (RHEL-151916)
- qemu_hotplug: enter monitor in order to rollback passed FD (RHEL-151916)

Resolves: RHEL-151916, RHEL-82645
2026-03-06 17:41:54 +01:00

332 lines
17 KiB
Diff

From 0af887be667a15eff3c7aa50f51a679786fec38b Mon Sep 17 00:00:00 2001
Message-ID: <0af887be667a15eff3c7aa50f51a679786fec38b.1772815313.git.jdenemar@redhat.com>
From: Andrea Bolognani <abologna@redhat.com>
Date: Fri, 28 Nov 2025 15:53:00 +0100
Subject: [PATCH] qemu_firmware: Remove NVRAM to loader format copy hack
Now that the hack is gone, a few test cases that were failing
before start succeeding instead.
The firmware-auto-efi-format-nvramtemplate-qcow2 test case
originally passed but produced wrong results, then started
failing once we began taking templateFormat into account, and now
passes once again, finally producing the correct results.
The firmware-auto-efi-format-nvram-raw-loader-path and
firmware-auto-efi-format-nvram-raw-nvramtemplate-path test cases,
on the other hand, never passed before now, because the hack
resulted in information contradicting those provided by the user
being injected into the configuration, which in turn made it
impossible to successfully pick a firmware build. With the hack
gone they can finally succeed, as they should have in the first
place.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 0aa3fa2d621fe6e0c3063be0d74f339f5852ac8a)
https://issues.redhat.com/browse/RHEL-82645
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
src/qemu/qemu_firmware.c | 19 ++--------
...t-nvram-raw-loader-path.x86_64-latest.args | 37 ++++++++++++++++++
...at-nvram-raw-loader-path.x86_64-latest.err | 1 -
...at-nvram-raw-loader-path.x86_64-latest.xml | 9 ++++-
...-raw-nvramtemplate-path.x86_64-latest.args | 37 ++++++++++++++++++
...m-raw-nvramtemplate-path.x86_64-latest.err | 1 -
...m-raw-nvramtemplate-path.x86_64-latest.xml | 9 ++++-
...mat-nvramtemplate-qcow2.x86_64-latest.args | 38 +++++++++++++++++++
...rmat-nvramtemplate-qcow2.x86_64-latest.err | 1 -
...rmat-nvramtemplate-qcow2.x86_64-latest.xml | 9 ++++-
tests/qemuxmlconftest.c | 6 +--
11 files changed, 139 insertions(+), 28 deletions(-)
create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-loader-path.x86_64-latest.args
delete mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-loader-path.x86_64-latest.err
create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-nvramtemplate-path.x86_64-latest.args
delete mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-nvramtemplate-path.x86_64-latest.err
create mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-format-nvramtemplate-qcow2.x86_64-latest.args
delete mode 100644 tests/qemuxmlconfdata/firmware-auto-efi-format-nvramtemplate-qcow2.x86_64-latest.err
diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c
index 8714538ba3..70ac88c373 100644
--- a/src/qemu/qemu_firmware.c
+++ b/src/qemu/qemu_firmware.c
@@ -1859,21 +1859,6 @@ qemuFirmwareFillDomain(virQEMUDriver *driver,
bool autoSelection = (def->os.firmware != VIR_DOMAIN_OS_DEF_FIRMWARE_NONE);
int ret;
- /* If there is no <loader> element but the <nvram> element
- * was present, copy the format from the latter to the
- * former.
- *
- * This ensures that a configuration such as
- *
- * <os>
- * <nvram format='foo'/>
- * </os>
- *
- * behaves as expected, that is, results in a firmware build
- * with format 'foo' being selected */
- if (loader && loader->nvram && !loader->format)
- loader->format = loader->nvram->format;
-
/* If we're loading an existing configuration from disk, we
* should try as hard as possible to preserve historical
* behavior. In particular, firmware autoselection being enabled
@@ -1889,7 +1874,9 @@ qemuFirmwareFillDomain(virQEMUDriver *driver,
def->os.loader = virDomainLoaderDefNew();
loader = def->os.loader;
}
- if (!loader->format) {
+ if (!loader->format &&
+ !loader->nvramTemplateFormat &&
+ (!loader->nvram || !loader->nvram->format)) {
loader->format = VIR_STORAGE_FILE_RAW;
}
}
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-loader-path.x86_64-latest.args b/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-loader-path.x86_64-latest.args
new file mode 100644
index 0000000000..14027c21db
--- /dev/null
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-loader-path.x86_64-latest.args
@@ -0,0 +1,37 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-guest \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
+/usr/bin/qemu-system-x86_64 \
+-name guest=guest,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
+-blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"qcow2","file":"libvirt-pflash0-storage","backing":null}' \
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","read-only":false}' \
+-machine pc-q35-10.0,usb=off,smm=on,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-storage,acpi=on \
+-accel kvm \
+-cpu qemu64 \
+-global driver=cfi.pflash01,property=secure,value=on \
+-m size=1048576k \
+-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-global ICH9-LPC.noreboot=off \
+-watchdog-action reset \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-loader-path.x86_64-latest.err b/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-loader-path.x86_64-latest.err
deleted file mode 100644
index 3edb2b3451..0000000000
--- a/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-loader-path.x86_64-latest.err
+++ /dev/null
@@ -1 +0,0 @@
-operation failed: Unable to find 'efi' firmware that is compatible with the current configuration
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-loader-path.x86_64-latest.xml b/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-loader-path.x86_64-latest.xml
index 6bb1ad1507..a02714d7b9 100644
--- a/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-loader-path.x86_64-latest.xml
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-loader-path.x86_64-latest.xml
@@ -6,12 +6,17 @@
<vcpu placement='static'>1</vcpu>
<os firmware='efi'>
<type arch='x86_64' machine='pc-q35-10.0'>hvm</type>
- <loader type='pflash' format='raw'>/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2</loader>
- <nvram format='raw'/>
+ <firmware>
+ <feature enabled='yes' name='enrolled-keys'/>
+ <feature enabled='yes' name='secure-boot'/>
+ </firmware>
+ <loader readonly='yes' secure='yes' type='pflash' format='qcow2'>/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2</loader>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS_4M.secboot.qcow2' templateFormat='qcow2' format='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<acpi/>
+ <smm state='on'/>
</features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</model>
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-nvramtemplate-path.x86_64-latest.args b/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-nvramtemplate-path.x86_64-latest.args
new file mode 100644
index 0000000000..14027c21db
--- /dev/null
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-nvramtemplate-path.x86_64-latest.args
@@ -0,0 +1,37 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-guest \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
+/usr/bin/qemu-system-x86_64 \
+-name guest=guest,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
+-blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"qcow2","file":"libvirt-pflash0-storage","backing":null}' \
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.fd","node-name":"libvirt-pflash1-storage","read-only":false}' \
+-machine pc-q35-10.0,usb=off,smm=on,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-storage,acpi=on \
+-accel kvm \
+-cpu qemu64 \
+-global driver=cfi.pflash01,property=secure,value=on \
+-m size=1048576k \
+-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-global ICH9-LPC.noreboot=off \
+-watchdog-action reset \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-nvramtemplate-path.x86_64-latest.err b/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-nvramtemplate-path.x86_64-latest.err
deleted file mode 100644
index 3edb2b3451..0000000000
--- a/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-nvramtemplate-path.x86_64-latest.err
+++ /dev/null
@@ -1 +0,0 @@
-operation failed: Unable to find 'efi' firmware that is compatible with the current configuration
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-nvramtemplate-path.x86_64-latest.xml b/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-nvramtemplate-path.x86_64-latest.xml
index 8bb8f1b26c..a02714d7b9 100644
--- a/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-nvramtemplate-path.x86_64-latest.xml
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-format-nvram-raw-nvramtemplate-path.x86_64-latest.xml
@@ -6,12 +6,17 @@
<vcpu placement='static'>1</vcpu>
<os firmware='efi'>
<type arch='x86_64' machine='pc-q35-10.0'>hvm</type>
- <loader format='raw'/>
- <nvram template='/usr/share/edk2/ovmf/OVMF_VARS_4M.secboot.qcow2' format='raw'/>
+ <firmware>
+ <feature enabled='yes' name='enrolled-keys'/>
+ <feature enabled='yes' name='secure-boot'/>
+ </firmware>
+ <loader readonly='yes' secure='yes' type='pflash' format='qcow2'>/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2</loader>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS_4M.secboot.qcow2' templateFormat='qcow2' format='raw'>/var/lib/libvirt/qemu/nvram/guest_VARS.fd</nvram>
<boot dev='hd'/>
</os>
<features>
<acpi/>
+ <smm state='on'/>
</features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</model>
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-format-nvramtemplate-qcow2.x86_64-latest.args b/tests/qemuxmlconfdata/firmware-auto-efi-format-nvramtemplate-qcow2.x86_64-latest.args
new file mode 100644
index 0000000000..468ad4326c
--- /dev/null
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-format-nvramtemplate-qcow2.x86_64-latest.args
@@ -0,0 +1,38 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/var/lib/libvirt/qemu/domain--1-guest \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/var/lib/libvirt/qemu/domain--1-guest/.local/share \
+XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain--1-guest/.cache \
+XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-guest/.config \
+/usr/bin/qemu-system-x86_64 \
+-name guest=guest,debug-threads=on \
+-S \
+-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain--1-guest/master-key.aes"}' \
+-blockdev '{"driver":"file","filename":"/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"qcow2","file":"libvirt-pflash0-storage","backing":null}' \
+-blockdev '{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' \
+-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"qcow2","file":"libvirt-pflash1-storage","backing":null}' \
+-machine pc-q35-10.0,usb=off,smm=on,dump-guest-core=off,memory-backend=pc.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on \
+-accel kvm \
+-cpu qemu64 \
+-global driver=cfi.pflash01,property=secure,value=on \
+-m size=1048576k \
+-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}' \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 63840878-0deb-4095-97e6-fc444d9bc9fa \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot strict=on \
+-audiodev '{"id":"audio1","driver":"none"}' \
+-global ICH9-LPC.noreboot=off \
+-watchdog-action reset \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-format-nvramtemplate-qcow2.x86_64-latest.err b/tests/qemuxmlconfdata/firmware-auto-efi-format-nvramtemplate-qcow2.x86_64-latest.err
deleted file mode 100644
index 3edb2b3451..0000000000
--- a/tests/qemuxmlconfdata/firmware-auto-efi-format-nvramtemplate-qcow2.x86_64-latest.err
+++ /dev/null
@@ -1 +0,0 @@
-operation failed: Unable to find 'efi' firmware that is compatible with the current configuration
diff --git a/tests/qemuxmlconfdata/firmware-auto-efi-format-nvramtemplate-qcow2.x86_64-latest.xml b/tests/qemuxmlconfdata/firmware-auto-efi-format-nvramtemplate-qcow2.x86_64-latest.xml
index 1f039061ba..4061a0ae35 100644
--- a/tests/qemuxmlconfdata/firmware-auto-efi-format-nvramtemplate-qcow2.x86_64-latest.xml
+++ b/tests/qemuxmlconfdata/firmware-auto-efi-format-nvramtemplate-qcow2.x86_64-latest.xml
@@ -6,12 +6,17 @@
<vcpu placement='static'>1</vcpu>
<os firmware='efi'>
<type arch='x86_64' machine='pc-q35-10.0'>hvm</type>
- <loader format='raw'/>
- <nvram templateFormat='qcow2'/>
+ <firmware>
+ <feature enabled='yes' name='enrolled-keys'/>
+ <feature enabled='yes' name='secure-boot'/>
+ </firmware>
+ <loader readonly='yes' secure='yes' type='pflash' format='qcow2'>/usr/share/edk2/ovmf/OVMF_CODE_4M.secboot.qcow2</loader>
+ <nvram template='/usr/share/edk2/ovmf/OVMF_VARS_4M.secboot.qcow2' templateFormat='qcow2' format='qcow2'>/var/lib/libvirt/qemu/nvram/guest_VARS.qcow2</nvram>
<boot dev='hd'/>
</os>
<features>
<acpi/>
+ <smm state='on'/>
</features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</model>
diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c
index 03b3aeef86..0091840731 100644
--- a/tests/qemuxmlconftest.c
+++ b/tests/qemuxmlconftest.c
@@ -1659,11 +1659,11 @@ mymain(void)
DO_TEST_CAPS_LATEST("firmware-auto-efi-format-nvram-qcow2-network-nbd");
DO_TEST_CAPS_LATEST("firmware-auto-efi-format-nvram-raw");
DO_TEST_CAPS_LATEST_ABI_UPDATE("firmware-auto-efi-format-nvram-raw");
- DO_TEST_CAPS_LATEST_FAILURE("firmware-auto-efi-format-nvram-raw-loader-path");
- DO_TEST_CAPS_LATEST_FAILURE("firmware-auto-efi-format-nvram-raw-nvramtemplate-path");
+ DO_TEST_CAPS_LATEST("firmware-auto-efi-format-nvram-raw-loader-path");
+ DO_TEST_CAPS_LATEST("firmware-auto-efi-format-nvram-raw-nvramtemplate-path");
DO_TEST_CAPS_ARCH_LATEST("firmware-auto-efi-format-loader-raw", "aarch64");
DO_TEST_CAPS_ARCH_LATEST_ABI_UPDATE("firmware-auto-efi-format-loader-raw", "aarch64");
- DO_TEST_CAPS_LATEST_FAILURE("firmware-auto-efi-format-nvramtemplate-qcow2");
+ DO_TEST_CAPS_LATEST("firmware-auto-efi-format-nvramtemplate-qcow2");
DO_TEST_CAPS_LATEST("firmware-auto-efi-format-mismatch");
DO_TEST_CAPS_LATEST_FAILURE("firmware-auto-efi-format-mismatch-nvramtemplate");
--
2.53.0