cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

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

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