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

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