]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
docs/interop/firmware: Add 'uefi-vars' member for FirmwareMappingMemory
authorAndrea Bolognani <abologna@redhat.com>
Tue, 17 Feb 2026 13:15:53 +0000 (14:15 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 17 Feb 2026 15:03:06 +0000 (16:03 +0100)
This allows describing firmwares that are loaded as ROMs but also
support a UEFI variable store. This is the case for edk2 builds
that are set up to use the uefi-vars QEMU device, and whose
descriptors would advertise the 'host-uefi-vars' feature.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20260217131553.313772-2-abologna@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
docs/interop/firmware.json

index da0362a2c0e8291c039e344780b47ff868c9f92a..3c71914a526c5d72f7ddf49f9feaa7ab2aed4f53 100644 (file)
 { 'struct' : 'FirmwareMappingKernel',
   'data'   : { 'filename' : 'str' } }
 
+##
+# @FirmwareMemoryUefiVars:
+#
+# Contains information needed to set up the "uefi-vars" device
+# to provide UEFI variable store access to the firmware.
+#
+# @template: The path to the UEFI JSON variable store template
+#     compatible with the firmware.  Management software instantiates
+#     an individual copy -- a specific UEFI variable store file --
+#     from @template for each new virtual machine definition created.
+#     @template itself is never mapped into virtual machines, only
+#     individual copies of it are.  The file created by copying
+#     @template is used for persistently storing the non-volatile
+#     UEFI variables of a virtual machine definition.  The
+#     corresponding QEMU command line options are
+#
+#     ::
+#
+#         -device uefi-vars-x64,jsonfile=PATH_TO_PRIVATE_FILE
+#
+#     for x86_64 virtual machines, or
+#
+#     ::
+#
+#         -device uefi-vars-sysbus,jsonfile=PATH_TO_PRIVATE_FILE
+#
+#     for other UEFI architectures (aarch64, riscv64, loongarch64).
+#
+# Since: 11.0
+##
+{ 'struct' : 'FirmwareMemoryUefiVars',
+  'data'   : { 'template' : 'str' }}
+
 ##
 # @FirmwareMappingMemory:
 #
 #     definitions.  The corresponding QEMU command line option is
 #     "-bios @filename".
 #
+# @uefi-vars: Information specific to firmware builds that expect the
+#     "uefi-vars" device to be used to provide access to the UEFI
+#     variable store.  If the mapping contains this member, the
+#     firmware descriptor must advertise both the @uefi interface
+#     from @FirmwareOSInterface and the @host-uefi-vars feature from
+#     @FirmwareFeature.  (Since 11.0)
+#
 # Since: 3.0
 ##
 { 'struct' : 'FirmwareMappingMemory',
-  'data'   : { 'filename' : 'str' } }
+  'data'   : { 'filename' : 'str',
+               '*uefi-vars' : 'FirmwareMemoryUefiVars' } }
 
 ##
 # @FirmwareMappingIgvm: