]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: rename modelinfo's deprecated_props to full_dep_props
authorCollin Walling <walling@linux.ibm.com>
Thu, 20 Nov 2025 22:34:40 +0000 (17:34 -0500)
committerJiri Denemark <jdenemar@redhat.com>
Fri, 21 Nov 2025 15:17:31 +0000 (16:17 +0100)
The current query of deprecated properties is the result of a full model
expansion.  Rename the field to reflect this.

Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor_json.c

index 205bf3d0b89d0d18fd8c3a4ceaecd6666437933a..bcc7c5b602772c0406ff8dd3a7795d5f58455468 100644 (file)
@@ -3275,9 +3275,9 @@ virQEMUCapsProbeFullDeprecatedProperties(qemuMonitor *mon,
                                         cpu, true, false, false, &propsInfo) < 0)
         return -1;
 
-    if (propsInfo && propsInfo->deprecated_props) {
+    if (propsInfo && propsInfo->full_dep_props) {
         g_strfreev(*props);
-        *props = g_steal_pointer(&propsInfo->deprecated_props);
+        *props = g_steal_pointer(&propsInfo->full_dep_props);
     }
 
     return 0;
@@ -3366,7 +3366,7 @@ virQEMUCapsProbeQMPHostCPU(virQEMUCaps *qemuCaps,
     }
 
     if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION_DEPRECATED_PROPS) &&
-        virQEMUCapsProbeFullDeprecatedProperties(mon, cpu, &modelInfo->deprecated_props) < 0)
+        virQEMUCapsProbeFullDeprecatedProperties(mon, cpu, &modelInfo->full_dep_props) < 0)
         return -1;
 
     if (virQEMUCapsTypeIsAccelerated(virtType) &&
@@ -3441,11 +3441,11 @@ virQEMUCapsUpdateCPUDeprecatedFeatures(virQEMUCaps *qemuCaps,
 
     modelInfo = virQEMUCapsGetCPUModelInfo(qemuCaps, virtType);
 
-    if (!modelInfo || !modelInfo->deprecated_props)
+    if (!modelInfo || !modelInfo->full_dep_props)
         return;
 
-    for (i = 0; i < g_strv_length(modelInfo->deprecated_props); i++) {
-        virCPUDefUpdateFeature(cpu, modelInfo->deprecated_props[i], policy);
+    for (i = 0; i < g_strv_length(modelInfo->full_dep_props); i++) {
+        virCPUDefUpdateFeature(cpu, modelInfo->full_dep_props[i], policy);
     }
 }
 
@@ -4210,12 +4210,12 @@ virQEMUCapsLoadHostCPUModelInfo(virQEMUCapsAccel *caps,
     if ((deprecated_props = virXPathNode("./deprecatedFeatures", ctxt))) {
         g_autoptr(GPtrArray) props = virXMLNodeGetSubelementList(deprecated_props, NULL);
 
-        hostCPU->deprecated_props = g_new0(char *, props->len + 1);
+        hostCPU->full_dep_props = g_new0(char *, props->len + 1);
 
         for (i = 0; i < props->len; i++) {
             xmlNodePtr prop = g_ptr_array_index(props, i);
 
-            if (!(hostCPU->deprecated_props[i] = virXMLPropString(prop, "name"))) {
+            if (!(hostCPU->full_dep_props[i] = virXMLPropString(prop, "name"))) {
                 virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                                _("missing 'name' attribute for a host CPU model deprecated property in QEMU capabilities cache"));
                 return -1;
@@ -4979,13 +4979,13 @@ virQEMUCapsFormatHostCPUModelInfo(virQEMUCapsAccel *caps,
         virBufferAddLit(buf, "/>\n");
     }
 
-    if (model->deprecated_props) {
+    if (model->full_dep_props) {
         virBufferAddLit(buf, "<deprecatedFeatures>\n");
         virBufferAdjustIndent(buf, 2);
 
-        for (i = 0; i < g_strv_length(model->deprecated_props); i++)
+        for (i = 0; i < g_strv_length(model->full_dep_props); i++)
             virBufferAsprintf(buf, "<property name='%s'/>\n",
-                              model->deprecated_props[i]);
+                              model->full_dep_props[i]);
 
         virBufferAdjustIndent(buf, -2);
         virBufferAddLit(buf, "</deprecatedFeatures>\n");
index 0f1a9d13f561c24feaa1221b5ab6334d9b967827..bcedd96f4eb910a8c054429ce0c018eb158f6344 100644 (file)
@@ -3374,7 +3374,7 @@ qemuMonitorCPUModelInfoFree(qemuMonitorCPUModelInfo *model_info)
             g_free(model_info->props[i].value.string);
     }
 
-    g_strfreev(model_info->deprecated_props);
+    g_strfreev(model_info->full_dep_props);
     g_free(model_info->props);
     g_free(model_info->name);
     g_free(model_info);
@@ -3419,7 +3419,7 @@ qemuMonitorCPUModelInfoCopy(const qemuMonitorCPUModelInfo *orig)
         }
     }
 
-    copy->deprecated_props = g_strdupv(orig->deprecated_props);
+    copy->full_dep_props = g_strdupv(orig->full_dep_props);
 
     return copy;
 }
index dd038f2775e8bcf0f898aff2dac47259d9eb98ad..6cd93297879d24b273bbf913f0a9f9c99f72ad4b 100644 (file)
@@ -1430,7 +1430,7 @@ struct _qemuMonitorCPUModelInfo {
     char *name;
     size_t nprops;
     qemuMonitorCPUProperty *props;
-    GStrv deprecated_props;
+    GStrv full_dep_props;   /* deprecated properties resulting from a full model expansion */
     bool migratability;
 };
 
index a4cbc222a835d5611ccc0ed0d6df5c98caf273a2..e911c1929cce25ac89dda3e4fbb021c0b34ffc1b 100644 (file)
@@ -5401,7 +5401,7 @@ qemuMonitorJSONParseCPUModelExpansion(const char *cpu_name,
 
     if (cpu_deprecated_props &&
         virJSONValueArraySize(cpu_deprecated_props) &&
-        (!(expanded_model->deprecated_props = virJSONValueArrayToStringList(cpu_deprecated_props)))) {
+        (!(expanded_model->full_dep_props = virJSONValueArrayToStringList(cpu_deprecated_props)))) {
         return -1;
     }