qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] target/s390x: filter deprecated features based on model expansion type
@ 2024-07-11 20:32 Collin Walling
  2024-07-11 21:10 ` David Hildenbrand
  2024-07-12  5:23 ` Markus Armbruster
  0 siblings, 2 replies; 6+ messages in thread
From: Collin Walling @ 2024-07-11 20:32 UTC (permalink / raw)
  To: qemu-s390x, qemu-devel
  Cc: thuth, david, wangyanan55, philmd, marcel.apfelbaum, eduardo,
	armbru, Jiri Denemark

It is beneficial to provide an interface to retrieve *all* deprecated
features in one go. Management applications will need this information
to determine which features need to be disabled regardless of the
host-model's capabilities.

To remedy this, deprecated features are only filtered during a static
expansion. All deperecated features are reported on a full expansion.

Suggested-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Collin Walling <walling@linux.ibm.com>
---
 target/s390x/cpu_models_sysemu.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/target/s390x/cpu_models_sysemu.c b/target/s390x/cpu_models_sysemu.c
index 977fbc6522..76d15f2e4d 100644
--- a/target/s390x/cpu_models_sysemu.c
+++ b/target/s390x/cpu_models_sysemu.c
@@ -211,7 +211,15 @@ static void cpu_info_from_model(CpuModelInfo *info, const S390CPUModel *model,
     bitmap_zero(bitmap, S390_FEAT_MAX);
     s390_get_deprecated_features(bitmap);
 
-    bitmap_and(bitmap, bitmap, model->def->full_feat, S390_FEAT_MAX);
+    /*
+     * For static model expansion, filter out deprecated features that are
+     * not a subset of the model's feature set. Otherwise, report the entire 
+     * deprecated features list.
+     */
+    if (delta_changes) {
+        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;
 }
-- 
2.45.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-07-16  6:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-11 20:32 [PATCH v1] target/s390x: filter deprecated features based on model expansion type Collin Walling
2024-07-11 21:10 ` David Hildenbrand
2024-07-15 16:04   ` Collin Walling
2024-07-12  5:23 ` Markus Armbruster
2024-07-15 16:52   ` Collin Walling
2024-07-16  6:11     ` Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).