From 2439da853b8b26c082845f26a6285b55f1bdfa22 Mon Sep 17 00:00:00 2001 From: Andrew Lukoshko Date: Thu, 7 Aug 2025 10:58:14 +0000 Subject: [PATCH] import OL libvirt-10.10.0-7.6.0.1.el9_6 --- ...nf-add-deprecated_features-attribute.patch | 280 ++++++ ...ent-CA-bundle-for-remote-connections.patch | 119 +++ ...BILITIES_DISABLE_DEPRECATED_FEATURES.patch | 58 ++ ...m-query-cpu-model-expansion-response.patch | 243 +++++ ...Expansion-refactor-parsing-functions.patch | 100 ++ ...ile-Fix-NVRAM-image-conversion-check.patch | 67 ++ ...ter-deprecated-features-if-requested.patch | 95 ++ ...y-deprecated-features-for-host-model.patch | 927 ++++++++++++++++++ ...ted-features-flag-to-domcapabilities.patch | 79 ++ SPECS/libvirt.spec | 32 +- 10 files changed, 1998 insertions(+), 2 deletions(-) create mode 100644 SOURCES/libvirt-conf-add-deprecated_features-attribute.patch create mode 100644 SOURCES/libvirt-esx-Allow-specifying-different-CA-bundle-for-remote-connections.patch create mode 100644 SOURCES/libvirt-libvirt-domain-introduce-VIR_CONNECT_GET_DOMAIN_CAPABILITIES_DISABLE_DEPRECATED_FEATURES.patch create mode 100644 SOURCES/libvirt-qemu-parse-deprecated-props-from-query-cpu-model-expansion-response.patch create mode 100644 SOURCES/libvirt-qemuMonitorJSONGetCPUModelExpansion-refactor-parsing-functions.patch create mode 100644 SOURCES/libvirt-qemuPrepareNVRAMFile-Fix-NVRAM-image-conversion-check.patch create mode 100644 SOURCES/libvirt-qemu_capabilities-filter-deprecated-features-if-requested.patch create mode 100644 SOURCES/libvirt-qemu_capabilities-query-deprecated-features-for-host-model.patch create mode 100644 SOURCES/libvirt-virsh-add-disable-deprecated-features-flag-to-domcapabilities.patch diff --git a/SOURCES/libvirt-conf-add-deprecated_features-attribute.patch b/SOURCES/libvirt-conf-add-deprecated_features-attribute.patch new file mode 100644 index 0000000..15c8fe1 --- /dev/null +++ b/SOURCES/libvirt-conf-add-deprecated_features-attribute.patch @@ -0,0 +1,280 @@ +From 1f2939355139bb56af0db6b4d575bc3aa9831394 Mon Sep 17 00:00:00 2001 +Message-ID: <1f2939355139bb56af0db6b4d575bc3aa9831394.1749027246.git.jdenemar@redhat.com> +From: Collin Walling +Date: Mon, 16 Dec 2024 18:03:58 -0500 +Subject: [PATCH] conf: add deprecated_features attribute + +Add a new a attribute, deprecated_features='on|off' to the +element. This is used to toggle features flagged as deprecated on the +CPU model on or off. When this attribute is paired with 'on', +deprecated features will not be filtered. When paired with 'off', any +CPU features that are flagged as deprecated will be listed under the +CPU model with the 'disable' policy. + +Example: + + + +The absence of this attribute is equivalent to the 'on' option. + +The deprecated features that will populate the domain XML are the same +features that result in the virsh domcapabilities command with the +--disable-deprecated-features argument present. + +It is recommended to define a domain XML with this attribute set to +'off' to ensure migration to machines that may outright drop these +features in the future. + +Signed-off-by: Collin Walling +Reviewed-by: Jiri Denemark +(cherry picked from commit 62658bbf060784c757f96c9de3935f27885834aa) +JIRA: https://issues.redhat.com/browse/RHEL-89977 +Signed-off-by: Thomas Huth +--- + src/conf/cpu_conf.c | 11 +++++++ + src/conf/cpu_conf.h | 1 + + src/conf/schemas/cputypes.rng | 5 +++ + src/qemu/qemu_process.c | 11 +++++++ + ...el-deprecated-features-off.s390x-8.2.0.err | 1 + + ...el-deprecated-features-off.s390x-8.2.0.xml | 25 +++++++++++++++ + ...-deprecated-features-off.s390x-latest.args | 32 +++++++++++++++++++ + ...l-deprecated-features-off.s390x-latest.xml | 25 +++++++++++++++ + .../cpu-model-deprecated-features-off.xml | 15 +++++++++ + tests/qemuxmlconftest.c | 3 ++ + 10 files changed, 129 insertions(+) + create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-8.2.0.err + create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-8.2.0.xml + create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-latest.args + create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-latest.xml + create mode 100644 tests/qemuxmlconfdata/cpu-model-deprecated-features-off.xml + +diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c +index dcc164d165..31425783ba 100644 +--- a/src/conf/cpu_conf.c ++++ b/src/conf/cpu_conf.c +@@ -238,6 +238,7 @@ virCPUDefCopyWithoutModel(const virCPUDef *cpu) + copy->mode = cpu->mode; + copy->match = cpu->match; + copy->check = cpu->check; ++ copy->deprecated_feats = cpu->deprecated_feats; + copy->fallback = cpu->fallback; + copy->sockets = cpu->sockets; + copy->dies = cpu->dies; +@@ -450,6 +451,11 @@ virCPUDefParseXML(xmlXPathContextPtr ctxt, + if (virXMLPropEnum(ctxt->node, "check", virCPUCheckTypeFromString, + VIR_XML_PROP_NONE, &def->check) < 0) + return -1; ++ ++ if (virXMLPropTristateSwitch(ctxt->node, "deprecated_features", ++ VIR_XML_PROP_NONE, ++ &def->deprecated_feats) < 0) ++ return -1; + } + + if (def->type == VIR_CPU_TYPE_HOST) { +@@ -748,6 +754,11 @@ virCPUDefFormatBufFull(virBuffer *buf, + virBufferAsprintf(&attributeBuf, " migratable='%s'", + virTristateSwitchTypeToString(def->migratable)); + } ++ ++ if (def->deprecated_feats) { ++ virBufferAsprintf(&attributeBuf, " deprecated_features='%s'", ++ virTristateSwitchTypeToString(def->deprecated_feats)); ++ } + } + + /* Format children */ +diff --git a/src/conf/cpu_conf.h b/src/conf/cpu_conf.h +index f71d942ce6..28e26303ef 100644 +--- a/src/conf/cpu_conf.h ++++ b/src/conf/cpu_conf.h +@@ -161,6 +161,7 @@ struct _virCPUDef { + virCPUMaxPhysAddrDef *addr; + virHostCPUTscInfo *tsc; + virTristateSwitch migratable; /* for host-passthrough mode */ ++ virTristateSwitch deprecated_feats; + }; + + virCPUDef *virCPUDefNew(void); +diff --git a/src/conf/schemas/cputypes.rng b/src/conf/schemas/cputypes.rng +index 3a8910e09f..8edf1d14e3 100644 +--- a/src/conf/schemas/cputypes.rng ++++ b/src/conf/schemas/cputypes.rng +@@ -439,6 +439,11 @@ + + + ++ ++ ++ ++ ++ + + + +diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c +index c80d7bb6dc..16b8991c3c 100644 +--- a/src/qemu/qemu_process.c ++++ b/src/qemu/qemu_process.c +@@ -6483,6 +6483,17 @@ qemuProcessUpdateGuestCPU(virDomainDef *def, + &def->os.arch) < 0) + return -1; + ++ if (def->cpu->deprecated_feats && ++ !virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION_DEPRECATED_PROPS)) { ++ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", ++ _("toggling deprecated features for CPU model is unsupported")); ++ return -1; ++ } ++ ++ if (def->cpu->deprecated_feats == VIR_TRISTATE_SWITCH_OFF) { ++ virQEMUCapsUpdateCPUDeprecatedFeatures(qemuCaps, def->virtType, def->cpu); ++ } ++ + return 0; + } + +diff --git a/tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-8.2.0.err b/tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-8.2.0.err +new file mode 100644 +index 0000000000..936d1d5a46 +--- /dev/null ++++ b/tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-8.2.0.err +@@ -0,0 +1 @@ ++unsupported configuration: toggling deprecated features for CPU model is unsupported +diff --git a/tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-8.2.0.xml b/tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-8.2.0.xml +new file mode 100644 +index 0000000000..e1f7ba3857 +--- /dev/null ++++ b/tests/qemuxmlconfdata/cpu-model-deprecated-features-off.s390x-8.2.0.xml +@@ -0,0 +1,25 @@ ++ ++ guest ++ 22782664-6b93-46bf-9595-317220dd2d1c ++ 219100 ++ 219100 ++ 1 ++ ++ hvm ++ ++ ++ ++ ++ destroy ++ restart ++ destroy ++ ++ /usr/bin/qemu-system-s390x ++ ++