53721 Commits
Author SHA1 Message Date
Jiri Denemark 6f0df1af01 Release of libvirt-12.1.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
v12.1.0
2026-03-02 10:22:43 +01:00
Peter Krempa 496cccf47f news: Mention latency histogram support and (managed) save fixes
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2026-03-02 09:57:33 +01:00
Andi Chandler 4a0424e2f3 Translated using Weblate (English (United Kingdom))
Currently translated at 47.8% (5256 of 10975 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/en_GB/

Signed-off-by: Andi Chandler <andi@gowling.com>
2026-02-27 16:41:09 +00:00
Daniel P. Berrangé 39b3b2eb37 fdstream: fix EOF handling when reading data
A recent commit caused the virFDStreamRead method to loop reading data
until the provided buffer is full. Unfortunately the EOF handling was
not quite correct.

 * When seeing a virFDStreamMsg with length zero, it would still
   loop trying to read more and then get an error that the thread
   has quit.

 * When seeing a virFDStreamMsg with length zero on subsequent
   iterations, it would discard this message, which would in turn
   prevent the caller from ever seeing the 'ret == 0' return value
   indicating EOF. The caller would then try to read again and get
   an error about the stream being closed.

Fixes: e23fd0b7fd
Reported-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Tested-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-27 16:40:53 +00:00
Daniel P. Berrangé 774241017a fdstream: don't set return value if looping to read more data
The 'ret' variable should only have a value assigned once we have
completely finished reading data, otherwise an error on a subsequent
iteration will report an error but not return a negative value.

Fixes: e23fd0b7fd
Reported-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Tested-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-27 16:40:53 +00:00
Roman Bogorodskiy 656f51dd20 news: document bhyve changes for 12.1.0
Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2026-02-27 15:52:46 +01:00
Michal Privoznik b0e57a2b35 NEWS: Document features/improvements/bug fixes I've participated in
There are some features/improvements/bug fixes I've either
contributed or reviewed/merged. Document them for upcoming
release.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2026-02-27 15:49:48 +01:00
Jonathon Jongsma 2c6fe784ac news: document new hyperv features
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2026-02-27 08:33:05 -06:00
Pavel Hrdina 4374dbbbf0 qemu_hotplug: enter monitor in order to rollback passed FD
Reported-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
v12.1.0-rc2
2026-02-26 12:23:24 +01:00
Pavel Hrdina fe782ed334 domain_conf: initialize network hostdev private data
Currently virDomainNetDef and virDomainActualNetDef use
virDomainHostdevDef directly as structure and the code doesn't call
virDomainHostdevDefNew() that would initialize private data.

This is hackish quick fix to solve a crash that happens in two
scenarios:

1. attaching any interface with hostdev backend

0x0000fffbfc0e2a90 in qemuDomainAttachHostPCIDevice (driver=0xfffbb4006750, vm=0xfffbf001f790, hostdev=0xfffbf400b150) at ../src/qemu/qemu_hotplug.c:1652
1652 if ((ret = qemuFDPassDirectTransferMonitor(hostdevPriv->vfioDeviceFd, priv->mon)) < 0)

2. starting VM with interface with hostdev backend using iommufd

0x00007f6638d5b9ca in qemuProcessOpenVfioDeviceFd (hostdev=hostdev@entry=0x7f6634425ee0) at ../src/qemu/qemu_process.c:7719
7719	    hostdevPriv->vfioDeviceFd = qemuFDPassDirectNew(name, &vfioDeviceFd);

Proper fix for this issue is to refactor network code to use pointer and to
use virDomainHostdevDefNew().

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2026-02-26 11:00:15 +01:00
Stefan Kober 10d5a41231 util: fix use-after-free in virIdentityGetSystem
We have a g_autoptr ret in the virIdentityGetSystem function. In the
happy path it is properly returned by doing: return g_steal_pointer(&ret);

There are 2 early return paths, were we do the following: "return ret;"

This leads to the g_autoptr being cleaned up after we leave the
function, as we do not properly "steal" it.

When later using the return value we have a use-after-free, which has
led to segfaults in some cases.

As this is a regression introduced in v5.9.0-rc1~269, we change
the behavior to properly return NULL in those cases.

Fixes: c6825d8813
On-behalf-of: SAP stefan.kober@sap.com
Signed-off-by: Stefan Kober <stefan.kober@cyberus-technology.de>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2026-02-26 10:20:46 +01:00
Cole Robinson 633ac90d2b vmx: log full .vmx content
We can kinda triangulate it from virConf debugging lines,
but this is nicer IMO

Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2026-02-25 09:53:14 -05:00
Jiri Denemark 3d1e6d92de qemu: Fix job handling when domain dies in post-copy migration
When a domain is in post-copy migration phase, we need to keep the job
active if something fails to protect the domain from changes.
Unfortunately, there is a race between migration code and
qemuProcessStop that can cause the job to stay active even when the
domain is gone and thus preventing the domain from being started again
(until virtqemud is restarted). The race is caused by unlocking the vm
object when calling virConnectUnregisterCloseCallback. While the domain
is unlocked qemuProcessStop can finish its work and the domain may no
longer be active when we get the lock back. The post-copy path does not
properly check if a domain is still active.

Instead of adding the virDomainObjIsActive check in all places where
this could happen, we can add it in virDomainObjIsPostcopy and
virDomainObjIsFailedPostcopy and let the code take the pre-copy cleanup
path. Clearly an inactive domain can never be in (failed) post-copy
migration.

https://issues.redhat.com/browse/RHEL-145179

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2026-02-25 13:44:40 +01:00
Jiri Denemark 634b40ccab po: Refresh potfile for v12.1.0
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
v12.1.0-rc1
2026-02-24 13:59:36 +01:00
Haorong Xu dbf3d81d24 Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 97.9% (10790 of 11015 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/zh_CN/

Signed-off-by: Haorong Xu <haorongxu09@gmail.com>
2026-02-24 12:12:08 +00:00
Fco. Javier F. Serrador 82512796fe Translated using Weblate (Spanish)
Currently translated at 90.3% (9956 of 11015 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/es/

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>
2026-02-24 12:12:08 +00:00
Weblate e943aff795 Translated using Weblate (Spanish)
Currently translated at 90.3% (9956 of 11015 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/es/

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2026-02-24 12:12:08 +00:00
Fco. Javier F. Serrador 8a1bd82f50 Translated using Weblate (Spanish)
Currently translated at 87.8% (9682 of 11015 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/es/

Signed-off-by: "Fco. Javier F. Serrador" <fserrador@gmail.com>
2026-02-24 12:12:08 +00:00
Pavel Borecki 29a53e39c0 Translated using Weblate (Czech)
Currently translated at 98.2% (10818 of 11015 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/cs/

Signed-off-by: Pavel Borecki <pavel.borecki@gmail.com>

Translated using Weblate (Czech)

Currently translated at 98.2% (10818 of 11015 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/cs/

Signed-off-by: Pavel Borecki <pavel.borecki@gmail.com>

Translated using Weblate (Czech)

Currently translated at 98.2% (10818 of 11015 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/cs/

Signed-off-by: Pavel Borecki <pavel.borecki@gmail.com>

Translated using Weblate (Czech)

Currently translated at 98.1% (10816 of 11015 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/cs/

Signed-off-by: Pavel Borecki <pavel.borecki@gmail.com>

Translated using Weblate (Czech)

Currently translated at 98.1% (10815 of 11015 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/cs/

Signed-off-by: Pavel Borecki <pavel.borecki@gmail.com>
2026-02-24 12:12:08 +00:00
Jim Spentzos 92cbb0fcd7 Translated using Weblate (Greek)
Currently translated at 1.3% (152 of 11015 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/el/

Signed-off-by: Jim Spentzos <jimspentzos2000@gmail.com>
2026-02-24 12:12:08 +00:00
Remus-Gabriel Chelu f88910b713 Translated using Weblate (Romanian)
Currently translated at 45.5% (5015 of 11015 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/ro/

Signed-off-by: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>
2026-02-24 12:12:08 +00:00
Weblate e39ce22996 Translated using Weblate (Greek)
Currently translated at 1.3% (146 of 11015 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/el/

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2026-02-24 12:12:08 +00:00
Jim Spentzos b713afcebd Translated using Weblate (Greek)
Currently translated at 1.3% (146 of 11015 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/el/

Signed-off-by: Jim Spentzos <jimspentzos2000@gmail.com>
2026-02-24 12:12:08 +00:00
Luna Jernberg 42eb8b6d0b Translated using Weblate (Swedish)
Currently translated at 100.0% (11015 of 11015 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/sv/

Signed-off-by: Luna Jernberg <droidbittin@gmail.com>
2026-02-24 12:12:08 +00:00
Daniel Nylander ce5e429171 Translated using Weblate (Swedish)
Currently translated at 99.9% (11008 of 11015 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/sv/

Signed-off-by: Daniel Nylander <po@danielnylander.se>
2026-02-24 12:12:07 +00:00
Hosted Weblate d507c85f93 Update translation files
Updated by "Update LINGUAS file" hook in Weblate.

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/

Signed-off-by: Fedora Weblate Translation <i18n@lists.fedoraproject.org>
2026-02-24 12:12:07 +00:00
Languages add-on aa48051095 Added translation using Weblate (Chinese (Traditional Han script))
Signed-off-by: Languages add-on <noreply-addon-languages@weblate.org>
2026-02-24 12:12:07 +00:00
Weblate 5b6adb61c8 Translated using Weblate (Georgian)
Currently translated at 4.6% (515 of 11015 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/ka/

Signed-off-by: Weblate <noreply-mt-weblate@weblate.org>
2026-02-24 12:12:07 +00:00
Andrea Bolognani 6085f809ad bhyve: Default to ROM type for loader
A previous commit had moved this logic from the generic
postparse code to drivers but failed to update the bhyve driver
accordingly in the process.

Fixes: 1504b7f687
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2026-02-24 12:31:43 +01:00
Andrea Bolognani f051939111 news: Document support for uefi-vars device and firmwares
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:07 +01:00
Andrea Bolognani 0151db88c2 virsh: Update for varstore handling
Document the fact that the existing flags which apply to
NVRAM files also do the right thing when varstore files are
used instead.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:07 +01:00
Andrea Bolognani 31e40b6229 include: Mention varstore where applicable
We are not introducing additional API flags for varstore
handling since that would require unnecessary churn in all
libvirt-based apps, and the intent is the same: recreate
the UEFI variable storage, be it NVRAM or varstore, from its
template.

In order to clarify that the existing flags affect varstore
too, update their documentation.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:07 +01:00
Andrea Bolognani bcda5b2efd qemu_command: Use uefi-vars device where appropriate
This makes guests actually functional.

https://issues.redhat.com/browse/RHEL-82645

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:07 +01:00
Andrea Bolognani 0ea04024ef tests: Add firmware descriptors for uefi-vars builds
Now that everything else is in place, we can finally add the
firmware descriptors for the edk2 builds that use the uefi-vars
QEMU device.

Several existing test cases that were failing up until this
point can pass now. This includes firmware-auto-efi-varstore-q35,
firmware-auto-efi-varstore-aarch64 and
firmware-auto-efi-enrolled-keys-aarch64, which were only failing
because a matching firmware descriptor could not be found.

firmware-manual-efi-varstore-aarch64 also passes now, because
with the firmware descriptor in place libvirt is able to figure
out that the manually-provided path corresponds to a UEFI
firmware build, which means that the use of ACPI is fine.

The test cases using older version of QEMU still fail, as is
expected, though the error message is now slightly different and
reflect the actual reason why that is.

The qemufirmware and domaincaps tests are updated in the
expected ways. In particular, versions QEMU 10.0 and newer now
advertise varstore support as available.

https://issues.redhat.com/browse/RHEL-82645

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:07 +01:00
Andrea Bolognani bcbb2667e2 security: Handle varstore file
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:07 +01:00
Andrea Bolognani a32b4a6037 security: Mark ROMs as read only when using AppArmor
Before this, attempting to use a ROM that was not explictly
marked at read only resulted in an error at startup time.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:07 +01:00
Andrea Bolognani 5dc97de2c4 qemu: Create and delete varstore file
Simply mimicking what is currently done for NVRAM files does
the trick. A few user-visible messages are updated to reflect
the fact that they apply both to NVRAM and varstore.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:07 +01:00
Andrea Bolognani 41fe1199bb qemu: Introduce qemuPrepareNVRAMFileCommon()
Most of the code in the qemuPrepareNVRAMFile() function can
be reused to create a varstore file from template. Move the
common parts to a generic helper, leaving only the parts
that are NVRAM-specific in the original function.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:07 +01:00
Andrea Bolognani 0dd118ccee qemu_firmware: Generate varstore path when necessary
Introduce qemuFirmwareEnsureVarstore(), which performs the same
task as the existing qemuFirmwareEnsureNVRAM() but for the
varstore element.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:07 +01:00
Andrea Bolognani df3121d21e qemu: Introduce varstoreDir
This is the same as the existing nvramDir, except it will be
used to store the files used with the uefi-vars QEMU device.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:07 +01:00
Andrea Bolognani da7eb72148 qemu_firmware: Fill in varstore information
If the matching firmware requires the use of varstore, we
have to bubble up information about it, namely the path to
the template. If the struct member doesn't exist yet, we need
to allocate it.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:07 +01:00
Andrea Bolognani fa74aae490 qemu_firmware: Allow matching stateful ROMs
Stateful ROMs are those that use the uefi-vars QEMU device to
implement access to UEFI variable storage.

Matching works much the same as it does for pflash-based
firmware images. Notably, the <varstore> element is only
allowed for ROM and the <nvram> element is only allowed for
pflash.

The firmware-auto-efi-varstore-q35 and
firmware-auto-efi-varstore-aarch64 fail in a different way
after this change: the input XML is now considered valid, and
the only remaining issue is that the firmware autoselection
process is unable to find a match.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:07 +01:00
Andrea Bolognani ffe37c6989 qemu_firmware: Use of NVRAM implies stateful firmware
Currently we only look at the value for the stateless attribute
itself when matching, but the <nvram> element being included in
the input XML is likewise a clear sign that a stateless firmware
build will not satisfy the user's requirements.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:07 +01:00
Andrea Bolognani 500c010df2 qemu: Fill in varstore element in domcaps
The element should only be advertised as supported if the QEMU
binary contains the necessary device and a suitable JSON firmware
descriptor is found on the system. Right now the latter
requirement is not satisfied, so it's marked as not supported
across the board.

The qemufirmware test is extended to cover the new attribute.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:06 +01:00
Andrea Bolognani 3d6987914b conf: Include varstore element in domcaps
We want to advertise whether the element is usable when
defining new domains.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:06 +01:00
Andrea Bolognani a440ada214 qemu_firmware: Report NVRAM template path for ROMs
This was not necessary until now since ROMs couldn't have an
associate NVRAM template, and technically speaking they still
can't; however, the varstore template serves essentialy the
same purpose.

The qemuFirmwareGetSupported() helper is used in two places:
one is the code that is responsible for filling in domaincaps,
where templates are ignored so this change has no impact on it;
the other is the qemufirmware test program, where this value
being reported is useful as it will allow us to confirm that
the JSON firmware descriptors for uefi-vars enabled builds are
parsed correctly.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:06 +01:00
Andrea Bolognani cab5b6532d qemu_firmware: Support extended syntax for ROM firmware descriptors
The existing syntax can only describe stateless firmware builds,
while the extended one can additionally describe builds intended
for use with the uefi-vars device. This involves including the
path to the corresponding varstore template.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:06 +01:00
Andrea Bolognani d0c6aa084f qemu_firmware: Consider host-uefi-vars feature in sanity check
Just like with firmware builds targeting the confidential use
case, use of the uefi-vars device obviates the need to have SMM
emulation enabled while still guaranteeing that protected EFI
variables work as intended.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:06 +01:00
Andrea Bolognani 91337ee06d qemu_firmware: Split sanity check
The two checks are semantically different, so it makes sense to
perform them separately. We will soon extend the first one.

While at it, start printing out the value of isConfidential. We
could print the value of each firmware feature it's derived from,
but that would make things unnecessarily verbose; at the same
time, knowing that libvirt believes that the firmware build is
targeting the confidential use case can be useful for debugging
so it's worth including it.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:06 +01:00
Andrea Bolognani 83679d7338 qemu_firmware: Parse host-uefi-vars firmware feature
When present in a firmware descriptor, this feature indicates that
the corresponding executable expects to access variable storage
through the uefi-vars QEMU device.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2026-02-24 11:29:06 +01:00