From 9f834855c72c7efeff8320a61a660feda41722bb Mon Sep 17 00:00:00 2001 From: AlmaLinux RelEng Bot Date: Fri, 17 Apr 2026 04:23:49 -0400 Subject: [PATCH] import Oracle_OSS libvirt-10.10.0-15.9.0.1.el9_7 --- ...EATURES-flag-for-domain-capabilities.patch | 54 +++++++++++++++ ...l-description-in-domain-capabilities.patch | 34 ++++++++++ ...AIN_CAPABILITIES_EXPAND_CPU_FEATURES.patch | 47 +++++++++++++ ...-features-option-for-domcapabilities.patch | 68 +++++++++++++++++++ SPECS/libvirt.spec | 18 ++++- 5 files changed, 219 insertions(+), 2 deletions(-) create mode 100644 SOURCES/libvirt-Introduce-EXPAND_CPU_FEATURES-flag-for-domain-capabilities.patch create mode 100644 SOURCES/libvirt-docs-Clarify-host-model-description-in-domain-capabilities.patch create mode 100644 SOURCES/libvirt-qemu-Implement-VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES.patch create mode 100644 SOURCES/libvirt-virsh-Add-expand-cpu-features-option-for-domcapabilities.patch 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..327152d --- /dev/null +++ b/SOURCES/libvirt-Introduce-EXPAND_CPU_FEATURES-flag-for-domain-capabilities.patch @@ -0,0 +1,54 @@ +From 4a81cb382970dce339164a13cd18002e789ec10b Mon Sep 17 00:00:00 2001 +Message-ID: <4a81cb382970dce339164a13cd18002e789ec10b.1773242419.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-154551 + +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 7759ddeaad..df92c520c1 100644 +--- a/include/libvirt/libvirt-domain.h ++++ b/include/libvirt/libvirt-domain.h +@@ -1501,6 +1501,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 efc26a41d9..c262c9607a 100644 +--- a/src/libvirt-domain.c ++++ b/src/libvirt-domain.c +@@ -12174,6 +12174,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.53.0 diff --git a/SOURCES/libvirt-docs-Clarify-host-model-description-in-domain-capabilities.patch b/SOURCES/libvirt-docs-Clarify-host-model-description-in-domain-capabilities.patch new file mode 100644 index 0000000..7613df9 --- /dev/null +++ b/SOURCES/libvirt-docs-Clarify-host-model-description-in-domain-capabilities.patch @@ -0,0 +1,34 @@ +From 5c32760042fe8d59260f1d801f9122af3b722206 Mon Sep 17 00:00:00 2001 +Message-ID: <5c32760042fe8d59260f1d801f9122af3b722206.1773242419.git.jdenemar@redhat.com> +From: Jiri Denemark +Date: Wed, 11 Mar 2026 12:13:45 +0100 +Subject: [PATCH] docs: Clarify host-model description in domain capabilities + +Signed-off-by: Jiri Denemark +Reviewed-by: Peter Krempa +(cherry picked from commit 0b54c9d535b9b7c832ff8422dca28c84eb75ed2e) + +https://issues.redhat.com/browse/RHEL-154551 + +Signed-off-by: Jiri Denemark +--- + docs/formatdomaincaps.rst | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/docs/formatdomaincaps.rst b/docs/formatdomaincaps.rst +index aee0af1045..48033d1bd6 100644 +--- a/docs/formatdomaincaps.rst ++++ b/docs/formatdomaincaps.rst +@@ -244,6 +244,10 @@ more details about it: + reports physical address size of the host CPU if this value is available and + applicable for the requested domain type. This is useful for computing + baseline CPU definition which should be compatible with several hosts. ++ Consistently with all other CPU definitions used by libvirt, features ++ implicitly enabled by the selected CPU model (in ``model`` sub element) are ++ not listed. Use ``--expand-cpu-features`` virsh option or the equivalent API ++ flag to request all supported features to be listed in the CPU definition. + ``custom`` + The ``mode`` element contains a list of supported CPU models, each described + by a dedicated ``model`` element. The ``usable`` attribute specifies whether +-- +2.53.0 diff --git a/SOURCES/libvirt-qemu-Implement-VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES.patch b/SOURCES/libvirt-qemu-Implement-VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES.patch new file mode 100644 index 0000000..caeb85b --- /dev/null +++ b/SOURCES/libvirt-qemu-Implement-VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES.patch @@ -0,0 +1,47 @@ +From bb2de2abe87a3ba8194da248cf5de84d60b0a2b5 Mon Sep 17 00:00:00 2001 +Message-ID: +From: Jiri Denemark +Date: Wed, 11 Mar 2026 12:12:40 +0100 +Subject: [PATCH] qemu: Implement + VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES + +Signed-off-by: Jiri Denemark +Reviewed-by: Peter Krempa +(cherry picked from commit 3215fee34967c49f37a965154879fc5860293cac) + +https://issues.redhat.com/browse/RHEL-154551 + +Signed-off-by: Jiri Denemark +--- + src/qemu/qemu_driver.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c +index 98bfe8124d..2de0ea6a9c 100644 +--- a/src/qemu/qemu_driver.c ++++ b/src/qemu/qemu_driver.c +@@ -16552,7 +16552,8 @@ qemuConnectGetDomainCapabilities(virConnectPtr conn, + virDomainVirtType virttype; + g_autoptr(virDomainCaps) domCaps = NULL; + +- virCheckFlags(VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_FEATURES, ++ virCheckFlags(VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_FEATURES | ++ VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES, + NULL); + + if (virConnectGetDomainCapabilitiesEnsureACL(conn) < 0) +@@ -16577,6 +16578,12 @@ qemuConnectGetDomainCapabilities(virConnectPtr conn, + domCaps->cpu.hostModel); + } + ++ if (flags & VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES) { ++ virCPUDef *cpu = domCaps->cpu.hostModel; ++ if (cpu && virCPUExpandFeatures(arch, cpu) < 0) ++ return NULL; ++ } ++ + return virDomainCapsFormat(domCaps); + } + +-- +2.53.0 diff --git a/SOURCES/libvirt-virsh-Add-expand-cpu-features-option-for-domcapabilities.patch b/SOURCES/libvirt-virsh-Add-expand-cpu-features-option-for-domcapabilities.patch new file mode 100644 index 0000000..06245f6 --- /dev/null +++ b/SOURCES/libvirt-virsh-Add-expand-cpu-features-option-for-domcapabilities.patch @@ -0,0 +1,68 @@ +From ee175567f79c3c9359ed209973172e88cc8c9c31 Mon Sep 17 00:00:00 2001 +Message-ID: +From: Jiri Denemark +Date: Wed, 11 Mar 2026 12:13:22 +0100 +Subject: [PATCH] virsh: Add --expand-cpu-features option for domcapabilities + +Signed-off-by: Jiri Denemark +Reviewed-by: Peter Krempa +(cherry picked from commit 57e5bb55cef5e97eea14fcecef7114e804576d6c) + +https://issues.redhat.com/browse/RHEL-154551 + +Signed-off-by: Jiri Denemark +--- + docs/manpages/virsh.rst | 5 +++++ + tools/virsh-host.c | 7 +++++++ + 2 files changed, 12 insertions(+) + +diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst +index b75e00beb6..e445672c2a 100644 +--- a/docs/manpages/virsh.rst ++++ b/docs/manpages/virsh.rst +@@ -584,6 +584,7 @@ domcapabilities + domcapabilities [virttype] [emulatorbin] [arch] [machine] + [--xpath EXPRESSION] [--wrap] + [--disable-deprecated-features] ++ [--expand-cpu-features] + + + Print an XML document describing the domain capabilities for the +@@ -630,6 +631,10 @@ of host-model CPU XML, updating the features list with any features + 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. ++ + + pool-capabilities + ----------------- +diff --git a/tools/virsh-host.c b/tools/virsh-host.c +index 9a2b689620..c692d0ea5b 100644 +--- a/tools/virsh-host.c ++++ b/tools/virsh-host.c +@@ -118,6 +118,10 @@ static const vshCmdOptDef opts_domcapabilities[] = { + .type = VSH_OT_BOOL, + .help = N_("report host CPU model with deprecated features disabled"), + }, ++ {.name = "expand-cpu-features", ++ .type = VSH_OT_BOOL, ++ .help = N_("show all features in host CPU model"), ++ }, + {.name = NULL} + }; + +@@ -137,6 +141,9 @@ cmdDomCapabilities(vshControl *ctl, const vshCmd *cmd) + if (vshCommandOptBool(cmd, "disable-deprecated-features")) + flags |= VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_FEATURES; + ++ if (vshCommandOptBool(cmd, "expand-cpu-features")) ++ flags |= VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES; ++ + if (vshCommandOptString(ctl, cmd, "virttype", &virttype) < 0 || + vshCommandOptString(ctl, cmd, "emulatorbin", &emulatorbin) < 0 || + vshCommandOptString(ctl, cmd, "arch", &arch) < 0 || +-- +2.53.0 diff --git a/SPECS/libvirt.spec b/SPECS/libvirt.spec index 0e154e9..0d97fb8 100644 --- a/SPECS/libvirt.spec +++ b/SPECS/libvirt.spec @@ -289,7 +289,7 @@ Summary: Library providing a simple virtualization API Name: libvirt Version: 10.10.0 -Release: 15.8%{?dist}%{?extra_release} +Release: 15.9.0.1%{?dist}%{?extra_release} License: GPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND OFL-1.1 URL: https://libvirt.org/ @@ -509,6 +509,10 @@ Patch209: libvirt-qemu-correctly-detect-working-TDX-support.patch Patch210: libvirt-qemu_validate-Drop-VIR_DOMAIN_HYPERV_SYNIC-dependency-on-VIR_DOMAIN_HYPERV_VPINDEX.patch Patch211: libvirt-qemu_validate-Drop-VIR_DOMAIN_HYPERV_STIMER-dependency-on-VIR_DOMAIN_HYPERV_VPINDEX.patch Patch212: libvirt-qemu-Ignore-cmp_legacy-CPU-flag.patch +Patch213: libvirt-Introduce-EXPAND_CPU_FEATURES-flag-for-domain-capabilities.patch +Patch214: libvirt-qemu-Implement-VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES.patch +Patch215: libvirt-virsh-Add-expand-cpu-features-option-for-domcapabilities.patch +Patch216: libvirt-docs-Clarify-host-model-description-in-domain-capabilities.patch Requires: libvirt-daemon = %{version}-%{release} @@ -1530,7 +1534,8 @@ exit 1 %define arg_packager_version -Dpackager_version="%{release}" %define arg_selinux_mount -Dselinux_mount="/sys/fs/selinux" -# place macros above and build commands below this comment +# Set SOURCE_DATE_EPOCH from changelog +%define source_date_epoch_from_changelog 1 export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec) @@ -2834,6 +2839,15 @@ exit 0 %endif %changelog +* Tue Apr 07 2026 EL Errata - 10.10.0-15.9.0.1 +- Set SOURCE_DATE_EPOCH from changelog [Orabug: 32019554] + +* Wed Mar 11 2026 Jiri Denemark - 10.10.0-15.9.el9_7 +- Introduce EXPAND_CPU_FEATURES flag for domain capabilities (RHEL-154551) +- qemu: Implement VIR_CONNECT_GET_DOMAIN_CAPABILITIES_EXPAND_CPU_FEATURES (RHEL-154551) +- virsh: Add --expand-cpu-features option for domcapabilities (RHEL-154551) +- docs: Clarify host-model description in domain capabilities (RHEL-154551) + * Wed Feb 11 2026 Jiri Denemark - 10.10.0-15.8.el9_7 - qemu: Ignore cmp_legacy CPU flag (RHEL-148500)