Blame SOURCES/kvm-s390x-add-RHEL-7.6-machine-type-for-ccw.patch

357786
From ea16161ecfee857c3d83841f806c5fa55837c483 Mon Sep 17 00:00:00 2001
357786
From: Cornelia Huck <cohuck@redhat.com>
357786
Date: Thu, 17 May 2018 11:52:08 +0200
357786
Subject: [PATCH 2/8] s390x: add RHEL 7.6 machine type for ccw
357786
357786
RH-Author: Cornelia Huck <cohuck@redhat.com>
357786
Message-id: <20180517115208.20738-1-cohuck@redhat.com>
357786
Patchwork-id: 80375
357786
O-Subject: [RHEL-7.6 qemu-kvm-ma PATCH v2] s390x: add RHEL 7.6 machine type for ccw
357786
Bugzilla: 1562138
357786
RH-Acked-by: David Hildenbrand <david@redhat.com>
357786
RH-Acked-by: Thomas Huth <thuth@redhat.com>
357786
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
357786
357786
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1562138
357786
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16338248
357786
Branch: rhv7/master-2.12.0
357786
Upstream: n/a
357786
Tested: Managedsave/restore between qemu-kvm-ma-2.10 and qemu-kvm-ma-2.12
357786
        with 7.5.0 machine type; started guest with 7.6.0 machine type
357786
357786
Follows the s390x-specific 2.10->2.12 compat handling (sclp masks,
357786
qemu cpu model) and introduces generic compat defines for 7.5->7.6
357786
(even though not applicable on s390x).
357786
357786
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
357786
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
357786
---
357786
 hw/s390x/s390-virtio-ccw.c | 35 ++++++++++++++++++++++++++++++++---
357786
 include/hw/compat.h        | 28 ++++++++++++++++++++++++++++
357786
 2 files changed, 60 insertions(+), 3 deletions(-)
357786
357786
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
357786
index 3956ac3..64e2a3b 100644
357786
--- a/hw/s390x/s390-virtio-ccw.c
357786
+++ b/hw/s390x/s390-virtio-ccw.c
357786
@@ -671,6 +671,8 @@ bool css_migration_enabled(void)
357786
     }                                                                         \
357786
     type_init(ccw_machine_register_##suffix)
357786
 
357786
+#if 0 /* Disabled for Red Hat Enterprise Linux */
357786
+
357786
 #define CCW_COMPAT_2_11 \
357786
         HW_COMPAT_2_11 \
357786
         {\
357786
@@ -682,8 +684,6 @@ bool css_migration_enabled(void)
357786
 #define CCW_COMPAT_2_10 \
357786
         HW_COMPAT_2_10
357786
 
357786
-#if 0 /* Disabled for Red Hat Enterprise Linux */
357786
-
357786
 #define CCW_COMPAT_2_9 \
357786
         HW_COMPAT_2_9 \
357786
         {\
357786
@@ -883,14 +883,43 @@ DEFINE_CCW_MACHINE(2_4, "2.4", false);
357786
 
357786
 #else
357786
 
357786
+/*
357786
+ * like CCW_COMPAT_2_11, but includes HW_COMPAT_RHEL7_5 (derived from
357786
+ * HW_COMPAT_2_11 and HW_COMPAT_2_10) instead of HW_COMPAT_2_11
357786
+ */
357786
+#define CCW_COMPAT_RHEL7_5 \
357786
+        HW_COMPAT_RHEL7_5 \
357786
+        {\
357786
+            .driver   = TYPE_SCLP_EVENT_FACILITY,\
357786
+            .property = "allow_all_mask_sizes",\
357786
+            .value    = "off",\
357786
+        },
357786
+
357786
+static void ccw_machine_rhel760_instance_options(MachineState *machine)
357786
+{
357786
+}
357786
+
357786
+static void ccw_machine_rhel760_class_options(MachineClass *mc)
357786
+{
357786
+}
357786
+DEFINE_CCW_MACHINE(rhel760, "rhel7.6.0", true);
357786
+
357786
 static void ccw_machine_rhel750_instance_options(MachineState *machine)
357786
 {
357786
+    static const S390FeatInit qemu_cpu_feat = { S390_FEAT_LIST_QEMU_V2_11 };
357786
+    ccw_machine_rhel760_instance_options(machine);
357786
+
357786
+    /* before 2.12 we emulated the very first z900, and RHEL 7.5 is
357786
+       based on 2.10 */
357786
+    s390_set_qemu_cpu_model(0x2064, 7, 1, qemu_cpu_feat);
357786
 }
357786
 
357786
 static void ccw_machine_rhel750_class_options(MachineClass *mc)
357786
 {
357786
+    ccw_machine_rhel760_class_options(mc);
357786
+    SET_MACHINE_COMPAT(mc, CCW_COMPAT_RHEL7_5);
357786
 }
357786
-DEFINE_CCW_MACHINE(rhel750, "rhel7.5.0", true);
357786
+DEFINE_CCW_MACHINE(rhel750, "rhel7.5.0", false);
357786
 
357786
 #endif
357786
 
357786
diff --git a/include/hw/compat.h b/include/hw/compat.h
357786
index 503b5c8..666eed9 100644
357786
--- a/include/hw/compat.h
357786
+++ b/include/hw/compat.h
357786
@@ -450,4 +450,32 @@
357786
         .value    = "off",\
357786
     },
357786
 
357786
+/* The same as HW_COMPAT_2_11 + HW_COMPAT_2_10 */
357786
+#define HW_COMPAT_RHEL7_5 \
357786
+    { /* HW_COMPAT_RHEL7_5 from HW_COMPAT_2_11 */ \
357786
+        .driver   = "hpet",\
357786
+        .property = "hpet-offset-saved",\
357786
+        .value    = "false",\
357786
+    },{ /* HW_COMPAT_RHEL7_5 from HW_COMPAT_2_11 */ \
357786
+        .driver   = "virtio-blk-pci",\
357786
+        .property = "vectors",\
357786
+        .value    = "2",\
357786
+    },{ /* HW_COMPAT_RHEL7_5 from HW_COMPAT_2_11 */ \
357786
+        .driver   = "vhost-user-blk-pci",\
357786
+        .property = "vectors",\
357786
+        .value    = "2",\
357786
+    },{ /* HW_COMPAT_RHEL7_5 from HW_COMPAT_2_11 */ \
357786
+        .driver   = "e1000",\
357786
+        .property = "migrate_tso_props",\
357786
+        .value    = "off",\
357786
+    },{ /* HW_COMPAT_RHEL7_5 from HW_COMPAT_2_10 */ \
357786
+        .driver   = "virtio-mouse-device",\
357786
+        .property = "wheel-axis",\
357786
+        .value    = "false",\
357786
+    },{ /* HW_COMPAT_RHEL7_5 from HW_COMPAT_2_10 */ \
357786
+        .driver   = "virtio-tablet-device",\
357786
+        .property = "wheel-axis",\
357786
+        .value    = "false",\
357786
+    },
357786
+
357786
 #endif /* HW_COMPAT_H */
357786
-- 
357786
1.8.3.1
357786