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

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