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

87 lines
2.9 KiB
Diff
Raw Normal View History

2018-11-08 17:02:33 +00:00
From 05b950dccdf9e8f58f3358730aa4705642d0196f Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Thu, 8 Nov 2018 12:02:37 +0100
Subject: Add s390x machine types
Adding changes to add RHEL machine types for s390x architecture.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
hw/s390x/s390-virtio-ccw.c | 46 +++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 45 insertions(+), 1 deletion(-)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 7983185..0f135c9 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -649,7 +649,7 @@ bool css_migration_enabled(void)
{ \
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"; \
mc->is_default = 1; \
@@ -676,6 +676,8 @@ bool css_migration_enabled(void)
#define CCW_COMPAT_2_12 \
HW_COMPAT_2_12
+#if 0 /* Disabled for Red Hat Enterprise Linux */
+
#define CCW_COMPAT_2_11 \
HW_COMPAT_2_11 \
{\
@@ -898,6 +900,48 @@ static void ccw_machine_2_4_class_options(MachineClass *mc)
}
DEFINE_CCW_MACHINE(2_4, "2.4", false);
+#else
+
+/*
+ * like CCW_COMPAT_2_11, but includes HW_COMPAT_RHEL7_5 (derived from
+ * HW_COMPAT_2_11 and HW_COMPAT_2_10) instead of HW_COMPAT_2_11
+ */
+#define CCW_COMPAT_RHEL7_5 \
+ HW_COMPAT_RHEL7_5 \
+ {\
+ .driver = TYPE_SCLP_EVENT_FACILITY,\
+ .property = "allow_all_mask_sizes",\
+ .value = "off",\
+ },
+
+static void ccw_machine_rhel760_instance_options(MachineState *machine)
+{
+}
+
+static void ccw_machine_rhel760_class_options(MachineClass *mc)
+{
+}
+DEFINE_CCW_MACHINE(rhel760, "rhel7.6.0", true);
+
+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);
+}
+
+static void ccw_machine_rhel750_class_options(MachineClass *mc)
+{
+ ccw_machine_rhel760_class_options(mc);
+ SET_MACHINE_COMPAT(mc, CCW_COMPAT_RHEL7_5);
+}
+DEFINE_CCW_MACHINE(rhel750, "rhel7.5.0", false);
+
+#endif
+
static void ccw_machine_register_types(void)
{
type_register_static(&ccw_machine_info);
--
1.8.3.1