Blob Blame History Raw
From 86ef5cd189077ab6a1a3b55ed844408c1ba8f75a Mon Sep 17 00:00:00 2001
From: Laurent Vivier <lvivier@redhat.com>
Date: Mon, 9 Oct 2017 14:23:16 +0200
Subject: [PATCH 07/69] redhat: define pseries-rhel7.5.0 machine type

RH-Author: Laurent Vivier <lvivier@redhat.com>
Message-id: <20171009142318.6262-3-lvivier@redhat.com>
Patchwork-id: 77034
O-Subject: [RHV7.5 qemu-kvm-rhev PATCH 2/4] redhat: define pseries-rhel7.5.0 machine type
Bugzilla: 1478478
RH-Acked-by: David Gibson <dgibson@redhat.com>
RH-Acked-by: Thomas Huth <thuth@redhat.com>
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>

As we don't support migration from PEGAS 1.0, pseries-rhel7.4.0alt is removed
(replaced) in this patch.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/ppc/spapr.c | 29 ++++++++++++++++++++++-------
 1 file changed, 22 insertions(+), 7 deletions(-)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 30b2c5b..cb317f8 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -3946,32 +3946,47 @@ DEFINE_SPAPR_MACHINE(2_1, "2.1", false);
 #endif
 
 /*
- * pseries-rhel7.4.0alt
+ * pseries-rhel7.5.0
  */
-static void spapr_machine_rhel740alt_instance_options(MachineState *machine)
+
+static void spapr_machine_rhel750_instance_options(MachineState *machine)
 {
 }
 
-static void spapr_machine_rhel740alt_class_options(MachineClass *mc)
+static void spapr_machine_rhel750_class_options(MachineClass *mc)
 {
     /* Defaults for the latest behaviour inherited from the base class */
 }
 
-DEFINE_SPAPR_MACHINE(rhel740alt, "rhel7.4.0alt", true);
-
+DEFINE_SPAPR_MACHINE(rhel750, "rhel7.5.0", true);
 
 /*
  * pseries-rhel7.4.0
+ * like SPAPR_COMPAT_2_9
  */
 
+#define SPAPR_COMPAT_RHEL7_4                                           \
+    HW_COMPAT_RHEL7_4                                                  \
+    {                                                                  \
+        .driver = TYPE_POWERPC_CPU,                                    \
+        .property = "pre-2.10-migration",                              \
+        .value    = "on",                                              \
+    },                                                                 \
+
 static void spapr_machine_rhel740_instance_options(MachineState *machine)
 {
-    spapr_machine_rhel740alt_instance_options(machine);
+    spapr_machine_rhel750_instance_options(machine);
 }
 
 static void spapr_machine_rhel740_class_options(MachineClass *mc)
 {
-    spapr_machine_rhel740alt_class_options(mc);
+    sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
+
+    spapr_machine_rhel750_class_options(mc);
+    SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_RHEL7_4);
+    mc->numa_auto_assign_ram = numa_legacy_auto_assign_ram;
+    smc->pre_2_10_has_unused_icps = true;
+    smc->resize_hpt_default = SPAPR_RESIZE_HPT_DISABLED;
 }
 
 DEFINE_SPAPR_MACHINE(rhel740, "rhel7.4.0", false);
-- 
1.8.3.1