diff --git a/SOURCES/libvirt-Fix-documentation-of-VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES.patch b/SOURCES/libvirt-Fix-documentation-of-VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES.patch new file mode 100644 index 0000000..335895b --- /dev/null +++ b/SOURCES/libvirt-Fix-documentation-of-VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES.patch @@ -0,0 +1,73 @@ +From 7a8f13f443843e8903ab18d5917f6f8bc4192dd6 Mon Sep 17 00:00:00 2001 +Message-ID: <7a8f13f443843e8903ab18d5917f6f8bc4192dd6.1780571167.git.jdenemar@redhat.com> +From: Jiri Denemark +Date: Tue, 26 May 2026 15:38:59 +0200 +Subject: [PATCH] Fix documentation of + VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES + +The flag is designed for expanding the CPU model used by host-model. But +the documentation was sometimes describing it as showing all CPU +features supported on the host, which is wrong as the host may support +features that would not be enabled in host-model. + +Signed-off-by: Jiri Denemark +Reviewed-by: Peter Krempa +(cherry picked from commit 090183a7dc4a64cca83937eff9a4e93a45b4d712) + +https://redhat.atlassian.net/browse/RHEL-177364 + +Signed-off-by: Jiri Denemark +--- + docs/manpages/virsh.rst | 5 +++-- + src/libvirt-domain.c | 6 +++--- + tools/virsh-host.c | 2 +- + 3 files changed, 7 insertions(+), 6 deletions(-) + +diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst +index 85fa6ab011..7169b6bc05 100644 +--- a/docs/manpages/virsh.rst ++++ b/docs/manpages/virsh.rst +@@ -640,8 +640,9 @@ flagged as deprecated for the CPU model by the hypervisor. These + features will be paired with the "disable" policy. + + The **--expand-cpu-features** option will cause the host-model CPU definition +-to contain all CPU features supported on the host including those implicitly +-enabled by the selected CPU model. ++to contain all required CPU features including those implicitly enabled by the ++selected CPU model. Without this flag features that are part of the CPU model ++itself will not be listed. + + + pool-capabilities +diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c +index 034f126dd5..e146fa7e82 100644 +--- a/src/libvirt-domain.c ++++ b/src/libvirt-domain.c +@@ -12331,9 +12331,9 @@ virDomainSetUserPassword(virDomainPtr dom, + * passthrough and so on. + * + * If @flags includes VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES, +- * libvirt will explicitly list all CPU features (in host-model CPU definition) +- * that are supported on the host. Without this flag features that are part of +- * the CPU model itself will not be listed. ++ * libvirt will explicitly list all CPU features that will be enabled for ++ * host-model CPU mode. Without this flag features that are part of the CPU ++ * model itself will not be listed. + * + * Returns NULL in case of error or an XML string + * defining the capabilities. +diff --git a/tools/virsh-host.c b/tools/virsh-host.c +index dd98917fa8..5dbeb54ae5 100644 +--- a/tools/virsh-host.c ++++ b/tools/virsh-host.c +@@ -120,7 +120,7 @@ static const vshCmdOptDef opts_domcapabilities[] = { + }, + {.name = "expand-cpu-features", + .type = VSH_OT_BOOL, +- .help = N_("show all features in host CPU model"), ++ .help = N_("expand 'host-model' CPU to also show features enabled by the CPU model"), + }, + {.name = NULL} + }; +-- +2.54.0 diff --git a/SOURCES/libvirt-Introduce-EXPAND_CPU_FEATURES-flag-for-domain-capabilities.patch b/SOURCES/libvirt-Introduce-EXPAND_CPU_FEATURES-flag-for-domain-capabilities.patch new file mode 100644 index 0000000..e9a7c04 --- /dev/null +++ b/SOURCES/libvirt-Introduce-EXPAND_CPU_FEATURES-flag-for-domain-capabilities.patch @@ -0,0 +1,54 @@ +From 9644e7aceda1ca2b88d9eb699a274c5b4eafbda1 Mon Sep 17 00:00:00 2001 +Message-ID: <9644e7aceda1ca2b88d9eb699a274c5b4eafbda1.1780571166.git.jdenemar@redhat.com> +From: Jiri Denemark +Date: Wed, 11 Mar 2026 11:31:06 +0100 +Subject: [PATCH] Introduce EXPAND_CPU_FEATURES flag for domain capabilities + +The new VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES flag for +virConnectGetDomainCapabilities can be used to request the host-model +CPU definition to include all supported features (normally only extra +features relative to the selected CPU model are listed). + +Signed-off-by: Jiri Denemark +Reviewed-by: Peter Krempa +(cherry picked from commit 8aa13d1b16b08feea37ecacc85540671e7995bb8) + +https://issues.redhat.com/browse/RHEL-153653 + +Signed-off-by: Jiri Denemark +--- + include/libvirt/libvirt-domain.h | 2 ++ + src/libvirt-domain.c | 5 +++++ + 2 files changed, 7 insertions(+) + +diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h +index 8e62bd23d4..1c5dbdc26e 100644 +--- a/include/libvirt/libvirt-domain.h ++++ b/include/libvirt/libvirt-domain.h +@@ -1517,6 +1517,8 @@ int virDomainMigrateStartPostCopy(virDomainPtr domain, + typedef enum { + /* Report host model with deprecated features disabled. (Since: 11.0.0) */ + VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_FEATURES = (1 << 0), ++ /* Report all host model CPU features. (Since: 12.2.0) */ ++ VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES = (1 << 1), + } virConnectGetDomainCapabilitiesFlags; + + char * virConnectGetDomainCapabilities(virConnectPtr conn, +diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c +index c7451fee05..034f126dd5 100644 +--- a/src/libvirt-domain.c ++++ b/src/libvirt-domain.c +@@ -12330,6 +12330,11 @@ virDomainSetUserPassword(virDomainPtr dom, + * instance, if host, libvirt and qemu is capable of VFIO + * passthrough and so on. + * ++ * If @flags includes VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES, ++ * libvirt will explicitly list all CPU features (in host-model CPU definition) ++ * that are supported on the host. Without this flag features that are part of ++ * the CPU model itself will not be listed. ++ * + * Returns NULL in case of error or an XML string + * defining the capabilities. + * +-- +2.54.0 diff --git a/SOURCES/libvirt-Introduce-VIR_CONNECT_GET_DOMAIN_CAPABILITIES_SUPPORTED_CPU_FEATURES-flag.patch b/SOURCES/libvirt-Introduce-VIR_CONNECT_GET_DOMAIN_CAPABILITIES_SUPPORTED_CPU_FEATURES-flag.patch new file mode 100644 index 0000000..16c6f06 --- /dev/null +++ b/SOURCES/libvirt-Introduce-VIR_CONNECT_GET_DOMAIN_CAPABILITIES_SUPPORTED_CPU_FEATURES-flag.patch @@ -0,0 +1,59 @@ +From f4588f45d48037050c88624e37f7b13e15138b0e Mon Sep 17 00:00:00 2001 +Message-ID: +From: Jiri Denemark +Date: Fri, 29 May 2026 12:52:39 +0200 +Subject: [PATCH] Introduce + VIR_CONNECT_GET_DOMAIN_CAPABILITIES_SUPPORTED_CPU_FEATURES flag + +Some CPU features may be enabled explicitly, but should not +automatically become part of a host-model CPU. Users can now request +such features to be shown in the host-model CPU in domain capabilities +by VIR_CONNECT_GET_DOMAIN_CAPABILITIES_SUPPORTED_CPU_FEATURES flag. + +Signed-off-by: Jiri Denemark +Reviewed-by: Peter Krempa +(cherry picked from commit e1efd79e837456d209115c536fc7e5f14abcbc63) + +https://redhat.atlassian.net/browse/RHEL-177364 + +Signed-off-by: Jiri Denemark +--- + include/libvirt/libvirt-domain.h | 3 +++ + src/libvirt-domain.c | 8 ++++++++ + 2 files changed, 11 insertions(+) + +diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h +index 1c5dbdc26e..4d7c0099ef 100644 +--- a/include/libvirt/libvirt-domain.h ++++ b/include/libvirt/libvirt-domain.h +@@ -1519,6 +1519,9 @@ typedef enum { + VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_FEATURES = (1 << 0), + /* Report all host model CPU features. (Since: 12.2.0) */ + VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES = (1 << 1), ++ /* Report all CPU features supported on the host, even those that will not ++ * be enabled by host-model CPU mode. (Since: 12.5.0) */ ++ VIR_CONNECT_GET_DOMAIN_CAPABILITIES_SUPPORTED_CPU_FEATURES = (1 << 2), + } virConnectGetDomainCapabilitiesFlags; + + char * virConnectGetDomainCapabilities(virConnectPtr conn, +diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c +index e146fa7e82..0ae48654df 100644 +--- a/src/libvirt-domain.c ++++ b/src/libvirt-domain.c +@@ -12335,6 +12335,14 @@ virDomainSetUserPassword(virDomainPtr dom, + * host-model CPU mode. Without this flag features that are part of the CPU + * model itself will not be listed. + * ++ * Adding VIR_CONNECT_GET_DOMAIN_CAPABILITIES_SUPPORTED_CPU_FEATURES to @flags ++ * tells libvirt to update the host-model CPU definition with features that are ++ * supported on the host, but will not be enabled by default when starting a ++ * domain with host-model CPU. Use both ++ * VIR_CONNECT_GET_DOMAIN_CAPABILITIES_SUPPORTED_CPU_FEATURES and ++ * VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES flags to get a ++ * complete list of features that can be enabled on the host. ++ * + * Returns NULL in case of error or an XML string + * defining the capabilities. + * +-- +2.54.0 diff --git a/SOURCES/libvirt-conf-Add-fields-for-recording-actually-selected-virtio-video-device.patch b/SOURCES/libvirt-conf-Add-fields-for-recording-actually-selected-virtio-video-device.patch new file mode 100644 index 0000000..2e5abdb --- /dev/null +++ b/SOURCES/libvirt-conf-Add-fields-for-recording-actually-selected-virtio-video-device.patch @@ -0,0 +1,211 @@ +From ef0dfcf0dea53cc1d8aabc08942a7091c9dbf30c Mon Sep 17 00:00:00 2001 +Message-ID: +From: Peter Krempa +Date: Mon, 8 Jun 2026 16:55:05 +0200 +Subject: [PATCH] conf: Add fields for recording actually-selected virtio video + device + +QEMU's commandline generator picks for virtio video between various +actual device models not only based on the XML definition but also +capabilities present. Since none of the devices is actually ABI +compatible we need to record the actually selected device in the XML. + +Introduce 'device' attribute: + +