1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-10-23 23:34:16 +03:00

qemu_firmware: Extend qemuFirmwareGetSupported to return FW paths

The qemuFirmwareGetSupported() function is called from qemu
driver to generate domain capabilities XML based on FW descriptor
files. However, the function currently reports only some features
from domcapabilities XML and not actual FW image paths. The paths
reported in the domcapabilities XML are still from pre-FW
descriptor era and therefore the XML might be a bit confusing.
For instance, it may say that secure boot is supported but
secboot enabled FW is not in the listed FW image paths.

To resolve this problem, change qemuFirmwareGetSupported() so
that it also returns a list of FW images (we have the list
anyway). Luckily, we already have a structure to represent a FW
image - virFirmware.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1733940

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Michal Privoznik
2019-08-05 14:56:32 +02:00
parent bc7fe2f56d
commit 78f8769a84
4 changed files with 68 additions and 4 deletions

View File

@@ -123,7 +123,7 @@ testSupportedFW(const void *opaque)
expectedInterfaces |= 1ULL << data->interfaces[i];
if (qemuFirmwareGetSupported(data->machine, data->arch, false,
&actualInterfaces, &actualSecure) < 0) {
&actualInterfaces, &actualSecure, NULL, NULL) < 0) {
fprintf(stderr, "Unable to get list of supported interfaces\n");
return -1;
}