From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "Andrea Bolognani" <abologna@redhat.com>,
qemu-devel@nongnu.org, "Kashyap Chamarthy" <kchamart@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Markus Armbruster" <armbru@redhat.com>
Subject: Re: [PATCH 2/2] docs/interop/firmware: Introduce extended syntax for FirmwareMappingMemory
Date: Tue, 6 Jan 2026 10:36:30 +0000 [thread overview]
Message-ID: <aVzliFd70KWKcMJR@redhat.com> (raw)
In-Reply-To: <aVzbqk5FSrG9rSuM@dobby.home.kraxel.org>
On Tue, Jan 06, 2026 at 11:13:33AM +0100, Gerd Hoffmann wrote:
> Hi,
>
> > IMHO we could add merely a new "uefi-vars-service" such that it looks
> > like this:
> >
> > {
> > "mapping: {
> > "device": "memory",
> > "filename": "/path/to/firmware.bin",
> > "uefi-vars-service": {
> > "template": "/path/to/firmware.json",
> > }
> > }
> > }
>
> I'm wondering whenever it makes sense to put this into the firmware
> description at all? The reason this is done for flash images is that
> code and vars can not be matched freely. This is simply not the case
> with host-managed variable stores.
True, though our schema of course allows us to list the exact same
json file against multiple firmware binaries. The more significant
problem is probably in the opposite direction - there are can
arbitrarily many json vars files that are valid for use with any
single firmware binary. This would require us to have multiple
firmware descriptors pointing to the same binary, each with a
differnt json file. Essentially the descriptors need to define
the combinatorial expansion of firmware + json files, and this
feels like it is getting a bit silly.
> Maybe have separate json files describing the variable store template
> only, and expect libvirt searching for one in case the firmware
> descriptor has the 'host-uefi-vars' feature flag set?
Or just have the host-uefi-vars feature flag alone, and then libvirt
can just invoke virt-firmware in whatever way it needs to create the
json templates and not worry about providing any pre-defined json
files. All the default microsoft CAs are ultimately embedded in
virt-firmware and spat out when given the right args.
If libvirt doesn't want to run virt-firmware every time, libvirt
could cache some common templates itself.
> Many fields of the firmware descriptor format continue to make sense
> in that case. Description obviously. Architecture too (the dbx
> revocation list is arch specific, so x86 / arm need different
> templates). Also some features, specifically 'enrolled-keys'.
>
> For the template filename we could use mapping->device = 'hostvars' with
> mapping->filenname (somewhat quirky), or simply replace mapping with
> something else.
>
> I think this also fits better with the long-term plan that libvirt can
> generate distro-specific variable stores based on libosinfo information
> instead of using some template file.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2026-01-06 10:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-28 23:26 [PATCH 0/2] docs/interop/firmware: Introduce extended syntax for FirmwareMappingMemory Andrea Bolognani
2025-12-28 23:26 ` [PATCH 1/2] docs/interop/firmware: Rename FirmwareFormat to FirmwareFlashFormat Andrea Bolognani
2026-01-05 8:40 ` Michal Prívozník
2025-12-28 23:26 ` [PATCH 2/2] docs/interop/firmware: Introduce extended syntax for FirmwareMappingMemory Andrea Bolognani
2026-01-05 14:40 ` Daniel P. Berrangé
2026-01-06 10:13 ` Gerd Hoffmann
2026-01-06 10:36 ` Daniel P. Berrangé [this message]
2026-01-06 11:28 ` Gerd Hoffmann
2026-01-06 11:34 ` Daniel P. Berrangé
2025-12-29 1:34 ` [PATCH 0/2] " Andrea Bolognani
2026-01-05 14:11 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aVzliFd70KWKcMJR@redhat.com \
--to=berrange@redhat.com \
--cc=abologna@redhat.com \
--cc=armbru@redhat.com \
--cc=kchamart@redhat.com \
--cc=kraxel@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.