Blob Blame History Raw
From d5df1efe63c6a0d8502f2066d4aaa2f03713f6f1 Mon Sep 17 00:00:00 2001
From: David Gibson <dgibson@redhat.com>
Date: Wed, 2 Aug 2017 03:50:04 +0200
Subject: [PATCH 1/4] Downstream: Update pseries machine types for RHEL-ALT-7.4

RH-Author: David Gibson <dgibson@redhat.com>
Message-id: <20170802035004.29766-1-dgibson@redhat.com>
Patchwork-id: 75878
O-Subject: [PATCH] Downstream: Update pseries machine types for RHEL-ALT-7.4
Bugzilla: 1473518
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
RH-Acked-by: Thomas Huth <thuth@redhat.com>
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>

From: David Gibson <david@gibson.dropbear.id.au>

At present Pegas 1.0 (RHEL-ALT-7.4) presents an identical machine type to
guests as RHEL 7.4.  However, that's not certain to stay the case, so it
seems safest to create a new machine type for the Pegas release,
'pseries-rhel7.4.0alt'.

Furthermore, pegas 1.0 (RHEL-ALT-7.4) supports only POWER9 native guests
- we will only support guests in POWER8 compatibility mode in Pegas1.1.
Since earlier (non-Pegas) releases supported only POWER8, it's impossible
to migrate any existing guests to Pegas1.0.

Therefore we don't need to include the earlier RHEL specific machine types
in Pegas1.0 (they won't support POWER9 anyway).  So we also disable those.

Signed-off-by: David Gibson <dgibson@redhat.com>
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
---
 hw/ppc/spapr.c | 29 ++++++++++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 0c401bf..b0ec050 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -3349,6 +3349,7 @@ DEFINE_SPAPR_MACHINE(2_8, "2.8", false);
     },
 #endif
 
+#if 0 /* Disabled for Red Hat Enterprise Linux */
 static void phb_placement_2_7(sPAPRMachineState *spapr, uint32_t index,
                               uint64_t *buid, hwaddr *pio,
                               hwaddr *mmio32, hwaddr *mmio64,
@@ -3398,7 +3399,6 @@ static void phb_placement_2_7(sPAPRMachineState *spapr, uint32_t index,
      */
 }
 
-#if 0 /* Disabled for Red Hat Enterprise Linux */
 static void spapr_machine_2_7_instance_options(MachineState *machine)
 {
     sPAPRMachineState *spapr = SPAPR_MACHINE(machine);
@@ -3565,18 +3565,37 @@ DEFINE_SPAPR_MACHINE(2_1, "2.1", false);
 #endif
 
 /*
+ * pseries-rhel7.4.0alt
+ */
+static void spapr_machine_rhel740alt_instance_options(MachineState *machine)
+{
+}
+
+static void spapr_machine_rhel740alt_class_options(MachineClass *mc)
+{
+    /* Defaults for the latest behaviour inherited from the base class */
+}
+
+DEFINE_SPAPR_MACHINE(rhel740alt, "rhel7.4.0alt", true);
+
+
+/*
  * pseries-rhel7.4.0
  */
+
+#if 0 /* Disabled in Red Hat Enterprise Linux */
 static void spapr_machine_rhel740_instance_options(MachineState *machine)
 {
+    spapr_machine_rhel740alt_instance_options(machine);
 }
 
 static void spapr_machine_rhel740_class_options(MachineClass *mc)
 {
-    /* Defaults for the latest behaviour inherited from the base class */
+    spapr_machine_rhel740alt_class_options(mc);
 }
 
-DEFINE_SPAPR_MACHINE(rhel740, "rhel7.4.0", true);
+DEFINE_SPAPR_MACHINE(rhel740, "rhel7.4.0", false);
+#endif
 
 /*
  * pseries-rhel7.3.0
@@ -3610,6 +3629,7 @@ DEFINE_SPAPR_MACHINE(rhel740, "rhel7.4.0", true);
         .value    = "off",                          \
     },
 
+#if 0 /* Disabled in Red Hat Enterprise Linux */
 static void spapr_machine_rhel730_instance_options(MachineState *machine)
 {
     sPAPRMachineState *spapr = SPAPR_MACHINE(machine);
@@ -3629,6 +3649,7 @@ static void spapr_machine_rhel730_class_options(MachineClass *mc)
 }
 
 DEFINE_SPAPR_MACHINE(rhel730, "rhel7.3.0", false);
+#endif
 
 /*
  * pseries-rhel7.2.0
@@ -3650,6 +3671,7 @@ DEFINE_SPAPR_MACHINE(rhel730, "rhel7.3.0", false);
     },
 
 
+#if 0 /* Disabled in Red Hat Enterprise Linux */
 static void spapr_machine_rhel720_instance_options(MachineState *machine)
 {
     spapr_machine_rhel730_instance_options(machine);
@@ -3668,6 +3690,7 @@ static void spapr_machine_rhel720_class_options(MachineClass *mc)
 }
 
 DEFINE_SPAPR_MACHINE(rhel720, "rhel7.2.0", false);
+#endif
 
 static void spapr_machine_register_types(void)
 {
-- 
1.8.3.1