qemu-kvm/0010-Add-s390x-machine-types.patch

128 lines
4.9 KiB
Diff
Raw Normal View History

2020-08-12 15:53:34 +00:00
From dc0914b5e43a9925217af8ddde44194176822108 Mon Sep 17 00:00:00 2001
2018-11-08 17:02:33 +00:00
From: Miroslav Rezanina <mrezanin@redhat.com>
2018-11-29 12:09:34 +00:00
Date: Fri, 19 Oct 2018 13:47:32 +0200
2018-11-08 17:02:33 +00:00
Subject: Add s390x machine types
Adding changes to add RHEL machine types for s390x architecture.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
2018-11-29 12:09:34 +00:00
Rebase changes (weekly-4.1.0):
- Use upstream compat handling
2018-11-29 12:09:34 +00:00
Merged patches (3.1.0):
- 29df663 s390x/cpumodel: default enable bpb and ppa15 for z196 and later
2019-11-15 14:35:04 +00:00
Merged patches (4.1.0):
- 6c200d665b hw/s390x/s390-virtio-ccw: Add machine types for RHEL8.0.0
Merged patches (4.2.0):
2019-11-15 14:35:04 +00:00
- fb192e5 redhat: s390x: Rename s390-ccw-virtio-rhel8.0.0 to s390-ccw-virtio-rhel8.1.0
- a9b22e8 redhat: s390x: Add proper compatibility options for the -rhel7.6.0 machine
- hw/s390x: Add the s390-ccw-virtio-rhel8.2.0 machine types (patch 92954)
2020-07-15 20:28:51 +00:00
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
2018-11-08 17:02:33 +00:00
---
2020-07-15 20:28:51 +00:00
hw/s390x/s390-virtio-ccw.c | 71 +++++++++++++++++++++++++++++++++++++-
2020-05-13 01:03:43 +00:00
1 file changed, 70 insertions(+), 1 deletion(-)
2018-11-08 17:02:33 +00:00
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
2020-08-12 15:53:34 +00:00
index e72c61d2ea..a6a37cce94 100644
2018-11-08 17:02:33 +00:00
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
2020-08-12 15:53:34 +00:00
@@ -777,7 +777,7 @@ bool css_migration_enabled(void)
2018-11-08 17:02:33 +00:00
{ \
MachineClass *mc = MACHINE_CLASS(oc); \
ccw_machine_##suffix##_class_options(mc); \
- mc->desc = "VirtIO-ccw based S390 machine v" verstr; \
+ mc->desc = "VirtIO-ccw based S390 machine " verstr; \
if (latest) { \
mc->alias = "s390-ccw-virtio"; \
2020-05-13 01:03:43 +00:00
mc->is_default = true; \
2020-08-12 15:53:34 +00:00
@@ -801,6 +801,7 @@ bool css_migration_enabled(void)
} \
type_init(ccw_machine_register_##suffix)
2018-11-08 17:02:33 +00:00
+#if 0 /* Disabled for Red Hat Enterprise Linux */
static void ccw_machine_5_1_instance_options(MachineState *machine)
{
}
2020-08-12 15:53:34 +00:00
@@ -1053,6 +1054,74 @@ static void ccw_machine_2_4_class_options(MachineClass *mc)
compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat));
2018-11-08 17:02:33 +00:00
}
DEFINE_CCW_MACHINE(2_4, "2.4", false);
+#endif
+
+static void ccw_machine_rhel820_instance_options(MachineState *machine)
+{
+}
+
+static void ccw_machine_rhel820_class_options(MachineClass *mc)
+{
2020-05-13 01:03:43 +00:00
+ mc->fixup_ram_size = s390_fixup_ram_size;
+}
+DEFINE_CCW_MACHINE(rhel820, "rhel8.2.0", true);
2018-11-08 17:02:33 +00:00
+
+static void ccw_machine_rhel760_instance_options(MachineState *machine)
+{
2019-11-15 14:35:04 +00:00
+ static const S390FeatInit qemu_cpu_feat = { S390_FEAT_LIST_QEMU_V3_1 };
+
+ ccw_machine_rhel820_instance_options(machine);
2019-11-15 14:35:04 +00:00
+
+ s390_set_qemu_cpu_model(0x2827, 12, 2, qemu_cpu_feat);
+
+ /* The multiple-epoch facility was not available with rhel7.6.0 on z14GA1 */
+ s390_cpudef_featoff(14, 1, S390_FEAT_MULTIPLE_EPOCH);
+ s390_cpudef_featoff(14, 1, S390_FEAT_PTFF_QSIE);
+ s390_cpudef_featoff(14, 1, S390_FEAT_PTFF_QTOUE);
+ s390_cpudef_featoff(14, 1, S390_FEAT_PTFF_STOE);
+ s390_cpudef_featoff(14, 1, S390_FEAT_PTFF_STOUE);
2018-11-08 17:02:33 +00:00
+}
+
+static void ccw_machine_rhel760_class_options(MachineClass *mc)
+{
+ ccw_machine_rhel820_class_options(mc);
+ /* We never published the s390x version of RHEL-AV 8.0 and 8.1, so add this here */
2019-11-15 14:35:04 +00:00
+ compat_props_add(mc->compat_props, hw_compat_rhel_8_0, hw_compat_rhel_8_0_len);
+ compat_props_add(mc->compat_props, hw_compat_rhel_7_6, hw_compat_rhel_7_6_len);
2018-11-08 17:02:33 +00:00
+}
+DEFINE_CCW_MACHINE(rhel760, "rhel7.6.0", false);
2018-11-08 17:02:33 +00:00
+
+static void ccw_machine_rhel750_instance_options(MachineState *machine)
+{
+ static const S390FeatInit qemu_cpu_feat = { S390_FEAT_LIST_QEMU_V2_11 };
+ ccw_machine_rhel760_instance_options(machine);
+
+ /* before 2.12 we emulated the very first z900, and RHEL 7.5 is
+ based on 2.10 */
+ s390_set_qemu_cpu_model(0x2064, 7, 1, qemu_cpu_feat);
2018-11-29 12:09:34 +00:00
+
+ /* bpb and ppa15 were only in the full model in RHEL 7.5 */
+ s390_cpudef_featoff_greater(11, 1, S390_FEAT_PPA15);
+ s390_cpudef_featoff_greater(11, 1, S390_FEAT_BPB);
2018-11-08 17:02:33 +00:00
+}
+
+GlobalProperty ccw_compat_rhel_7_5[] = {
+ {
+ .driver = TYPE_SCLP_EVENT_FACILITY,
+ .property = "allow_all_mask_sizes",
+ .value = "off",
+ },
+};
+const size_t ccw_compat_rhel_7_5_len = G_N_ELEMENTS(ccw_compat_rhel_7_5);
+
2018-11-08 17:02:33 +00:00
+static void ccw_machine_rhel750_class_options(MachineClass *mc)
+{
+ ccw_machine_rhel760_class_options(mc);
+ compat_props_add(mc->compat_props, hw_compat_rhel_7_5, hw_compat_rhel_7_5_len);
+ compat_props_add(mc->compat_props, ccw_compat_rhel_7_5, ccw_compat_rhel_7_5_len);
+ S390_MACHINE_CLASS(mc)->hpage_1m_allowed = false;
2018-11-08 17:02:33 +00:00
+}
+DEFINE_CCW_MACHINE(rhel750, "rhel7.5.0", false);
2018-11-08 17:02:33 +00:00
static void ccw_machine_register_types(void)
{
--
2020-07-15 20:28:51 +00:00
2.27.0
2018-11-08 17:02:33 +00:00