@@ -20,11 +20,16 @@
#
# @props: a dictionary of QOM properties to be applied
#
+# @deprecated-props: a list of properties that are flagged as deprecated
+# by the CPU vendor. These props are a subset of the full model's
+# definition list of properties. (since 9.1)
+#
# Since: 2.8
##
{ 'struct': 'CpuModelInfo',
'data': { 'name': 'str',
- '*props': 'any' } }
+ '*props': 'any',
+ '*deprecated-props': ['str'] } }
##
# @CpuModelExpansionType:
@@ -69,6 +69,7 @@ void s390_add_from_feat_block(S390FeatBitmap features, S390FeatType type,
uint8_t *data);
void s390_feat_bitmap_to_ascii(const S390FeatBitmap features, void *opaque,
void (*fn)(const char *name, void *opaque));
+void s390_get_deprecated_features(S390FeatBitmap features);
/* Definition of a CPU feature group */
typedef struct {
@@ -212,6 +212,20 @@ void s390_feat_bitmap_to_ascii(const S390FeatBitmap features, void *opaque,
};
}
+void s390_get_deprecated_features(S390FeatBitmap features)
+{
+ static const int feats[] = {
+ /* CSSKE is deprecated on newer generations */
+ S390_FEAT_CONDITIONAL_SSKE,
+ S390_FEAT_BPB,
+ };
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(feats); i++) {
+ set_bit(feats[i], features);
+ }
+}
+
#define FEAT_GROUP_INIT(_name, _group, _desc) \
{ \
.name = _name, \
@@ -206,6 +206,14 @@ static void cpu_info_from_model(CpuModelInfo *info, const S390CPUModel *model,
} else {
info->props = QOBJECT(qdict);
}
+
+ /* features flagged as deprecated */
+ bitmap_zero(bitmap, S390_FEAT_MAX);
+ s390_get_deprecated_features(bitmap);
+
+ bitmap_and(bitmap, bitmap, model->def->full_feat, S390_FEAT_MAX);
+ s390_feat_bitmap_to_ascii(bitmap, &info->deprecated_props, list_add_feat);
+ info->has_deprecated_props = !!info->deprecated_props;
}
CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType type,