Skip to contentSkip to conversation

target/s390x: set has_deprecated_props flag

PATCH In review Collin Walling 2 participants 2 messages Jun 30, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target/s390x: set has_deprecated_props flag

Now that the deprecated_props is an optional field, the expansion method must now set the "has_deprecated_props" flag in order for the data to be output from the response.

Fixes 448553bb7c (qapi: Make CpuModelExpansionInfo::deprecated-props optional and generic)
---
 target/s390x/cpu_models_system.c | 3 +++
 1 file changed, 3 insertions(+)
target/s390x/cpu_models_system.c +3 -0
index 9d84faa3c9e..5b846048675 100644
@@ -252,6 +252,9 @@ CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType type,
 
     s390_feat_bitmap_to_ascii(deprecated_feats,
                               &expansion_info->deprecated_props, list_add_feat);
+
+    expansion_info->has_deprecated_props = !!expansion_info->deprecated_props;
+
     return expansion_info;
 }
 
Signature · 1 line
2.49.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Collin Walling

Now that the deprecated_props is an optional field, the expansion method must now set the "has_deprecated_props" flag in order for the data to be output from the response.

Fixes 448553bb7c (qapi: Make CpuModelExpansionInfo::deprecated-props optional and generic)
---
  target/s390x/cpu_models_system.c | 3 +++
  1 file changed, 3 insertions(+)
target/s390x/cpu_models_system.c +0 -0
index 9d84faa3c9e..5b846048675 100644

target/s390x/cpu_models_system.c CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType type, · line 260

Quoted 9 lines
target/s390x/cpu_models_system.c +3 -0
@@ -252,6 +252,9 @@ CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType type,
 
      s390_feat_bitmap_to_ascii(deprecated_feats,
                                &expansion_info->deprecated_props, list_add_feat);
+
+    expansion_info->has_deprecated_props = !!expansion_info->deprecated_props;
+
      return expansion_info;
  }
 

Oops.