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

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