- qemu_firmware: Drop support for kernel descriptors (RHEL-82645) - qemu_firmware: Drop 'nvram' local variable (RHEL-82645) - qemu_firmware: Move format=raw compat exception (RHEL-82645) - qemu_firmware: Move copying of nvram.format to loader.format (RHEL-82645) - tests: Add firmware-manual-efi-rw-nvram (RHEL-82645) - domain_validate: Reject NVRAM with read/write firmware (RHEL-82645) - tests: Add firmware-auto-bios-rw (RHEL-82645) - tests: Add firmware-manual-bios-rw (RHEL-82645) - domain_validate: Reject read/write ROMs (RHEL-82645) - tests: Add firmware-auto-efi-format-loader-qcow2-rom (RHEL-82645) - domain_validate: Reject ROMs with format other than raw (RHEL-82645) - qemu_firmware: Ignore stateless/combined when NVRAM is configured (RHEL-82645) - qemu_firmware: Drop fallback for absent nvramTemplateFormat (RHEL-82645) - schemas: Allow templateFormat without template path (RHEL-82645) - tests: Add firmware-manual-efi-nvram-template-nonstandard-format (RHEL-82645) - tests: Add firmware-manual-efi-nvram-template-nonstandard-legacy-paths (RHEL-82645) - tests: Add firmware-auto-efi-format-nvram-raw (RHEL-82645) - tests: Add firmware-auto-efi-format-nvram-raw-loader-path (RHEL-82645) - tests: Add firmware-auto-efi-format-nvram-raw-nvramtemplate-path (RHEL-82645) - tests: Add firmware-auto-efi-format-nvramtemplate-qcow2 (RHEL-82645) - tests: Add firmware-auto-efi-format-mismatch-nvramtemplate (RHEL-82645) - qemu_firmware: Introduce qemuFirmwareFillDomainCustom() (RHEL-82645) - qemu_firmware: Set templateFormat for custom paths (RHEL-82645) - qemu_firmware: Simplify handling of legacy paths (RHEL-82645) - qemu_firmware: Refactor setting NVRAM format (RHEL-82645) - qemu_firmware: Prefer template format to loader format (RHEL-82645) - qemu_firmware: Retain user-specified NVRAM format (RHEL-82645) - qemu_firmware: Take templateFormat into account when matching (RHEL-82645) - qemu_firmware: Take NVRAM format into account when matching (RHEL-82645) - qemu_firmware: Remove NVRAM to loader format copy hack (RHEL-82645) - tests: Add firmware-manual-efi-sev-snp (RHEL-82645) - tests: Add firmware-manual-efi-tdx (RHEL-82645) - qemu_firmware: ROM firmware is always in raw format (RHEL-82645) - qemu_firmware: Don't skip autoselection for ROM (RHEL-82645) - qemu_firmware: Allow matching both UEFI and BIOS for ROM loader (RHEL-82645) - schema: Add firmwareFeatures element for domaincaps (RHEL-82645) - conf: Add firmwareFeatures element for domaincaps (RHEL-82645) - qemu: Fill in firmwareFeature element for domaincaps (RHEL-82645) - docs: Document firmwareFeature element for domaincaps (RHEL-82645) - docs: Rename "BIOS bootloader" section to "guest firmware" (RHEL-82645) - docs: Improvement related to firmware selection (RHEL-82645) - qemu_firmware: Only set format for custom loader if path is present (RHEL-82645) - conf: Move type=rom default for loader to drivers (RHEL-82645) - tests: Rename custom JSON firmware descriptors (RHEL-82645) - schema: Introduce osnvram define (RHEL-82645) - conf: Parse and format varstore element (RHEL-82645) - conf: Update validation to consider varstore element (RHEL-82645) - qemu_capabilities: Introduce QEMU_CAPS_DEVICE_UEFI_VARS (RHEL-82645) - qemu: Validate presence of uefi-vars device (RHEL-82645) - tests: Add firmware-manual-efi-varstore-q35 (RHEL-82645) - tests: Add firmware-manual-efi-varstore-aarch64 (RHEL-82645) - tests: Add firmware-auto-efi-varstore-q35 (RHEL-82645) - tests: Add firmware-auto-efi-varstore-aarch64 (RHEL-82645) - tests: Add firmware-auto-efi-enrolled-keys-aarch64 (RHEL-82645) - qemu_firmware: Parse host-uefi-vars firmware feature (RHEL-82645) - qemu_firmware: Split sanity check (RHEL-82645) - qemu_firmware: Consider host-uefi-vars feature in sanity check (RHEL-82645) - qemu_firmware: Support extended syntax for ROM firmware descriptors (RHEL-82645) - qemu_firmware: Report NVRAM template path for ROMs (RHEL-82645) - conf: Include varstore element in domcaps (RHEL-82645) - qemu: Fill in varstore element in domcaps (RHEL-82645) - qemu_firmware: Use of NVRAM implies stateful firmware (RHEL-82645) - qemu_firmware: Allow matching stateful ROMs (RHEL-82645) - qemu_firmware: Fill in varstore information (RHEL-82645) - qemu: Introduce varstoreDir (RHEL-82645) - qemu_firmware: Generate varstore path when necessary (RHEL-82645) - qemu: Introduce qemuPrepareNVRAMFileCommon() (RHEL-82645) - qemu: Create and delete varstore file (RHEL-82645) - security: Mark ROMs as read only when using AppArmor (RHEL-82645) - security: Handle varstore file (RHEL-82645) - tests: Add firmware descriptors for uefi-vars builds (RHEL-82645) - qemu_command: Use uefi-vars device where appropriate (RHEL-82645) - include: Mention varstore where applicable (RHEL-82645) - virsh: Update for varstore handling (RHEL-82645) - domain_conf: initialize network hostdev private data (RHEL-151916) - qemu_hotplug: enter monitor in order to rollback passed FD (RHEL-151916) Resolves: RHEL-151916, RHEL-82645
141 lines
4.5 KiB
Diff
141 lines
4.5 KiB
Diff
From af94300604718604a70a5d587e56187ffe5e6557 Mon Sep 17 00:00:00 2001
|
|
Message-ID: <af94300604718604a70a5d587e56187ffe5e6557.1772815313.git.jdenemar@redhat.com>
|
|
From: Andrea Bolognani <abologna@redhat.com>
|
|
Date: Fri, 30 Jan 2026 17:46:30 +0100
|
|
Subject: [PATCH] conf: Include varstore element in domcaps
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
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>
|
|
(cherry picked from commit 3d6987914bb10beb11b9eb5e83ec2194dfab1659)
|
|
|
|
https://issues.redhat.com/browse/RHEL-82645
|
|
|
|
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
---
|
|
docs/formatdomaincaps.rst | 7 +++++++
|
|
src/conf/domain_capabilities.c | 10 ++++++++++
|
|
src/conf/domain_capabilities.h | 6 ++++++
|
|
src/conf/schemas/domaincaps.rng | 9 +++++++++
|
|
4 files changed, 32 insertions(+)
|
|
|
|
diff --git a/docs/formatdomaincaps.rst b/docs/formatdomaincaps.rst
|
|
index 3426b7c9cd..5a1d3f2670 100644
|
|
--- a/docs/formatdomaincaps.rst
|
|
+++ b/docs/formatdomaincaps.rst
|
|
@@ -141,6 +141,7 @@ domains.
|
|
<value>no</value>
|
|
</enum>
|
|
</loader>
|
|
+ <varstore supported='yes'/>
|
|
</os>
|
|
...
|
|
<domainCapabilities>
|
|
@@ -227,6 +228,12 @@ are the following:
|
|
possible to enforce Secure Boot, look at the ``enrolledKeys`` enum inside
|
|
the ``<firmwareFeatures/>`` element instead.
|
|
|
|
+The ``<varstore/>`` element :since:`(since 12.1.0)` indicates whether UEFI
|
|
+variable storage backed by the ``uefi-vars`` QEMU device can be used as an
|
|
+alternative to pflash-based NVRAM storage. This is the only type of variable
|
|
+storage compatible with Secure Boot on non-x86 architectures, but it can be
|
|
+used on x86 too.
|
|
+
|
|
CPU configuration
|
|
~~~~~~~~~~~~~~~~~
|
|
|
|
diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c
|
|
index 9b3577cd08..78b8e6e6e1 100644
|
|
--- a/src/conf/domain_capabilities.c
|
|
+++ b/src/conf/domain_capabilities.c
|
|
@@ -449,12 +449,21 @@ virDomainCapsLoaderFormat(virBuffer *buf,
|
|
FORMAT_EPILOGUE(loader);
|
|
}
|
|
|
|
+static void
|
|
+virDomainCapsVarstoreFormat(virBuffer *buf,
|
|
+ const virDomainCapsVarstore *varstore)
|
|
+{
|
|
+ FORMAT_PROLOGUE(varstore);
|
|
+ FORMAT_EPILOGUE(varstore);
|
|
+}
|
|
+
|
|
static void
|
|
virDomainCapsOSFormat(virBuffer *buf,
|
|
const virDomainCapsOS *os)
|
|
{
|
|
const virDomainCapsFirmwareFeatures *firmwareFeatures = &os->firmwareFeatures;
|
|
const virDomainCapsLoader *loader = &os->loader;
|
|
+ const virDomainCapsVarstore *varstore = &os->varstore;
|
|
|
|
FORMAT_PROLOGUE(os);
|
|
|
|
@@ -462,6 +471,7 @@ virDomainCapsOSFormat(virBuffer *buf,
|
|
|
|
virDomainCapsFirmwareFeaturesFormat(&childBuf, firmwareFeatures);
|
|
virDomainCapsLoaderFormat(&childBuf, loader);
|
|
+ virDomainCapsVarstoreFormat(&childBuf, varstore);
|
|
|
|
FORMAT_EPILOGUE(os);
|
|
}
|
|
diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h
|
|
index a68fafe235..02344fd9b6 100644
|
|
--- a/src/conf/domain_capabilities.h
|
|
+++ b/src/conf/domain_capabilities.h
|
|
@@ -61,6 +61,11 @@ struct _virDomainCapsLoader {
|
|
virDomainCapsEnum secure; /* Info about secure:virTristateBool */
|
|
};
|
|
|
|
+typedef struct _virDomainCapsVarstore virDomainCapsVarstore;
|
|
+struct _virDomainCapsVarstore {
|
|
+ virTristateBool supported;
|
|
+};
|
|
+
|
|
STATIC_ASSERT_ENUM(VIR_DOMAIN_OS_DEF_FIRMWARE_LAST);
|
|
typedef struct _virDomainCapsOS virDomainCapsOS;
|
|
struct _virDomainCapsOS {
|
|
@@ -68,6 +73,7 @@ struct _virDomainCapsOS {
|
|
virDomainCapsEnum firmware; /* Info about virDomainOsDefFirmware */
|
|
virDomainCapsFirmwareFeatures firmwareFeatures;
|
|
virDomainCapsLoader loader; /* Info about virDomainLoaderDef */
|
|
+ virDomainCapsVarstore varstore;
|
|
};
|
|
|
|
STATIC_ASSERT_ENUM(VIR_DOMAIN_MEMORY_SOURCE_LAST);
|
|
diff --git a/src/conf/schemas/domaincaps.rng b/src/conf/schemas/domaincaps.rng
|
|
index 3b24caeca6..4682abbf41 100644
|
|
--- a/src/conf/schemas/domaincaps.rng
|
|
+++ b/src/conf/schemas/domaincaps.rng
|
|
@@ -87,6 +87,12 @@
|
|
</element>
|
|
</define>
|
|
|
|
+ <define name="varstore">
|
|
+ <element name="varstore">
|
|
+ <ref name="supported"/>
|
|
+ </element>
|
|
+ </define>
|
|
+
|
|
<define name="os">
|
|
<element name="os">
|
|
<interleave>
|
|
@@ -98,6 +104,9 @@
|
|
<optional>
|
|
<ref name="loader"/>
|
|
</optional>
|
|
+ <optional>
|
|
+ <ref name="varstore"/>
|
|
+ </optional>
|
|
</interleave>
|
|
</element>
|
|
</define>
|
|
--
|
|
2.53.0
|