Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1564270 - RFE: QEMU firmware metadata format - libvirt support [RHEL-8]
Summary: RFE: QEMU firmware metadata format - libvirt support [RHEL-8]
Status: POST
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: 8.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 8.0
Assignee: Michal Privoznik
QA Contact: Meina Li
: 1609225 (view as bug list)
Depends On: 1546084
Blocks: 1369007
TreeView+ depends on / blocked
Reported: 2018-04-05 21:00 UTC by Ademar Reis
Modified: 2019-04-10 16:12 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of: 1546084
Last Closed:
Type: Feature Request
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1605127 None CLOSED RFE: QEMU firmware metadata format - libvirt support [RHEL-7] 2019-04-12 14:16:21 UTC

Internal Links: 1605127

Description Ademar Reis 2018-04-05 21:00:12 UTC
libvirt will need to support it somehow.

+++ This bug was initially created as a clone of Bug #1546084 +++

(Suggested by: Gerd Hoffmann and Dan Berrangé on different lists.)

For each firmware file we need a metadata file in a well defined
location, e.g.  /usr/share/qemu/bios/  that lists stuff like:

 - Path to the firmware binary
 - Path to the pre-built OVMF 'vars' file (if any)
 - Support architectures
 - Associated QEMU feature flags (Secure Boot) 
 - If the binary provides / requires SMM (System Management Mode)

Libvirt can read these metadata files and then pick the correct firmware
image based on the settings for the guest.

Essentially QEMU would define the file format, and provide metadata
files from any ROMs it ships directly.  If vendors ship extra ROMs like
OVMF, etc the vendor (distribution) should provide suitable metadata 

   Discussion from 2014 about the OVMF metdata format, where Gerd
   suggested an idea of a firemware registry format for libvirt

--- Additional comment from Kashyap Chamarthy on 2018-02-16 08:07:58 BRST ---

There's an additional consideration that Laszlo brought up elsewhere on this topic:

    Would this [the idea presented in bug description] be flexible 
    enough to tell apart OVMF binaries that can be used interchangeably
    w.r.t. the QEMU command line, but have different firmware features 
    built into them?

--- Additional comment from Laszlo Ersek on 2018-04-03 11:11:19 BRT ---

Comment 2 Laszlo Ersek 2018-07-27 12:38:37 UTC
*** Bug 1609225 has been marked as a duplicate of this bug. ***

Comment 3 Daniel Berrange 2019-02-01 15:49:11 UTC
FYI from libvirt side this entire effort in QEMU stems from this original libvirt patch series  where we concluded we wanted to replace libvirt's list of OVMF files with metadata before continuing.

Comment 4 Michal Privoznik 2019-02-27 10:06:58 UTC
First version posted onto the list:

Comment 6 Michal Privoznik 2019-03-12 15:11:55 UTC
I've just merged patches upstream:

68ade25372 qemu: Enable firmware autoselection
d433f3cdd8 qemuDomainDefValidate: Don't require SMM if automatic firmware selection enabled
43527af27c qemu_process: Call qemuFirmwareFillDomain
804d2003e6 qemu_firmware: Introduce qemuFirmwareFillDomain()
31eb3093c0 qemufirmwaretest: Test qemuFirmwareFetchConfigs()
3c876d2428 qemu_firmware: Introduce qemuFirmwareFetchConfigs
04406d87d2 test: Introduce qemufirmwaretest
8b5b80f4c5 qemu: Introduce basic skeleton for parsing firmware description
d947fa8a08 conf: Introduce firmware attribute to <os/>
d21f89cc1a conf: Introduce VIR_DOMAIN_LOADER_TYPE_NONE
cdd592553a virDomainLoaderDefParseXML: Allow loader path to be NULL
849a0cfef1 qemu_capabilities: Expose qemu <-> libvirt arch translators
23018c0823 qemu_domain: Separate NVRAM VAR store file name generation


Comment 8 Michal Privoznik 2019-04-05 08:02:00 UTC
I've sent some more patches that expose the feature in domain capabilities:

They might be worth backporting too.

Comment 9 Michal Privoznik 2019-04-10 16:12:21 UTC
Patches are now pushed upstream:

947ea8665e tests: Fix MinGW build for domaincapstest
5b9819eedc domain capabilities: Expose firmware auto selection feature
9c0d73bf49 qemu_firmware: Introduce qemuFirmwareGetSupported
2337309e04 qemu_firmware: Separate machine and arch matching into a function
15e0b76480 qemu_firmware: Separate firmware loading into a function


Note You need to log in before you can comment on or make changes to this bug.