ZFS packages for Fedora, CentOS Stream & RHEL for the aarch64 architecture
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

50 lines
1.9 KiB

From f77f7a3d566b6fd6bbc5d4b3d78fc290a2f84e54 Mon Sep 17 00:00:00 2001
Message-ID: <f77f7a3d566b6fd6bbc5d4b3d78fc290a2f84e54.1784297532.git.jdenemar@redhat.com>
From: Peter Krempa <pkrempa@redhat.com>
Date: Thu, 11 Jun 2026 12:56:17 +0200
Subject: [PATCH] qemu: postparse: Process VM config with qemuCaps influenced
by <qemu:capabilities>
The user configuration of added/removed qemu capabilities via the qemu
namespace element was applied only right before generating a
commandline, but the post parse code code didn't see these.
Apply the capability modification prior to running post parse code so
that defaults are properly picked based on the configuration.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 011ae74640b230222ca521c6d253e2df59c8ab63)
https://redhat.atlassian.net/browse/RHEL-186019
https://redhat.atlassian.net/browse/RHEL-177646 (rhel-9.9)
---
src/qemu/qemu_postparse.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_postparse.c b/src/qemu/qemu_postparse.c
index dc5ade829a..cd88cd1806 100644
--- a/src/qemu/qemu_postparse.c
+++ b/src/qemu/qemu_postparse.c
@@ -1924,9 +1924,16 @@ qemuDomainPostParseDataAlloc(const virDomainDef *def,
void **parseOpaque)
{
virQEMUDriver *driver = opaque;
+ g_autoptr(virQEMUCaps) qemuCapsLocal = NULL;
- if (!(*parseOpaque = virQEMUCapsCacheLookup(driver->qemuCapsCache,
- def->emulator)))
+ *parseOpaque = NULL;
+
+ if (!(qemuCapsLocal = virQEMUCapsCacheLookup(driver->qemuCapsCache,
+ def->emulator)))
+ return 1;
+
+ if (qemuDomainUpdateCustomCapabilities(def, qemuCapsLocal,
+ (virQEMUCaps **) parseOpaque) < 0)
return 1;
return 0;
--
2.55.0