Blame SOURCES/0025-redhat-Add-s390x-machine-type-compatibility-handling.patch

ff9ada
From 265a57f2955b7f0b65e3f57f89aa1ff2541d3f73 Mon Sep 17 00:00:00 2001
ff9ada
From: Thomas Huth <thuth@redhat.com>
ff9ada
Date: Fri, 26 Nov 2021 09:37:11 +0100
ff9ada
Subject: redhat: Add s390x machine type compatibility handling for the rebase
ff9ada
 to v6.2
ff9ada
ff9ada
RH-Author: Thomas Huth <thuth@redhat.com>
ff9ada
RH-MergeRequest: 80: Add s390x machine type compatibility handling for the rebase to v6.2
ff9ada
RH-Commit: [26/26] c45cf594604f6dd23954696b9c84d2025e328d11
ff9ada
RH-Bugzilla: 2022602
ff9ada
RH-Acked-by: David Hildenbrand <david@redhat.com>
ff9ada
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
ff9ada
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
ff9ada
ff9ada
Add compatibility handling for the rhel8.5.0 machine type (and
ff9ada
recursively older, of course).
ff9ada
ff9ada
Based on the following upstream commits:
ff9ada
ff9ada
 463e50da8b - s390x/cpumodel: Bump up QEMU model to a stripped-down IBM z14 GA2
ff9ada
 30e398f796 - s390x/cpumodel: Add more feature to gen16 default model
ff9ada
 4a0af2930a - machine: Prefer cores over sockets in smp parsing since 6.2
ff9ada
 2b52619994 - machine: Move smp_prefer_sockets to struct SMPCompatProps
ff9ada
ff9ada
Signed-off-by: Thomas Huth <thuth@redhat.com>
ff9ada
---
ff9ada
 hw/s390x/s390-virtio-ccw.c | 10 ++++++++++
ff9ada
 1 file changed, 10 insertions(+)
ff9ada
ff9ada
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
ff9ada
index 181856e6cf..cf13c457d6 100644
ff9ada
--- a/hw/s390x/s390-virtio-ccw.c
ff9ada
+++ b/hw/s390x/s390-virtio-ccw.c
ff9ada
@@ -1105,11 +1105,21 @@ DEFINE_CCW_MACHINE(2_4, "2.4", false);
ff9ada
 
ff9ada
 static void ccw_machine_rhel850_instance_options(MachineState *machine)
ff9ada
 {
ff9ada
+    static const S390FeatInit qemu_cpu_feat = { S390_FEAT_LIST_QEMU_V6_0 };
ff9ada
+
ff9ada
+    s390_set_qemu_cpu_model(0x2964, 13, 2, qemu_cpu_feat);
ff9ada
+
ff9ada
+    s390_cpudef_featoff_greater(16, 1, S390_FEAT_NNPA);
ff9ada
+    s390_cpudef_featoff_greater(16, 1, S390_FEAT_VECTOR_PACKED_DECIMAL_ENH2);
ff9ada
+    s390_cpudef_featoff_greater(16, 1, S390_FEAT_BEAR_ENH);
ff9ada
+    s390_cpudef_featoff_greater(16, 1, S390_FEAT_RDP);
ff9ada
+    s390_cpudef_featoff_greater(16, 1, S390_FEAT_PAI);
ff9ada
 }
ff9ada
 
ff9ada
 static void ccw_machine_rhel850_class_options(MachineClass *mc)
ff9ada
 {
ff9ada
     compat_props_add(mc->compat_props, hw_compat_rhel_8_5, hw_compat_rhel_8_5_len);
ff9ada
+    mc->smp_props.prefer_sockets = true;
ff9ada
 }
ff9ada
 DEFINE_CCW_MACHINE(rhel850, "rhel8.5.0", true);
ff9ada
 
ff9ada
-- 
ff9ada
2.27.0
ff9ada