Blame SOURCES/kvm-target-ppc-Add-POWER9-DD2.0-model-information.patch

9bac43
From f862178a20240a06504e35d11953982fcf769789 Mon Sep 17 00:00:00 2001
9bac43
From: Laurent Vivier <lvivier@redhat.com>
9bac43
Date: Fri, 8 Dec 2017 14:48:39 +0100
9bac43
Subject: [PATCH 1/6] target/ppc: Add POWER9 DD2.0 model information
9bac43
9bac43
RH-Author: Laurent Vivier <lvivier@redhat.com>
9bac43
Message-id: <20171208144839.6655-1-lvivier@redhat.com>
9bac43
Patchwork-id: 78276
9bac43
O-Subject: [RHV7.5 qemu-kvm-rhev PATCH] target/ppc: Add POWER9 DD2.0 model information
9bac43
Bugzilla: 1523235
9bac43
RH-Acked-by: David Gibson <dgibson@redhat.com>
9bac43
RH-Acked-by: Thomas Huth <thuth@redhat.com>
9bac43
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
9bac43
9bac43
From: David Gibson <david@gibson.dropbear.id.au>
9bac43
9bac43
Tested: /usr/libexec/qemu-kvm -device help 2>&1|grep -i "power9"
9bac43
        name "POWER9_v1.0-spapr-cpu-core"
9bac43
        name "POWER9_v2.0-spapr-cpu-core"
9bac43
        /usr/libexec/qemu-kvm -cpu help 2>&1|grep -i "power9"
9bac43
        PowerPC POWER9_v1.0      PVR 004e0100
9bac43
        PowerPC POWER9_v2.0      PVR 004e1200
9bac43
        PowerPC POWER9           (alias for preferred POWER9 CPU)
9bac43
9bac43
At the moment the only POWER9 model which is listed in qemu is v1.0 (aka
9bac43
"DD1").  This is a very early (read, buggy) version which will never be
9bac43
released to the public - it was included in qemu only for the convenience
9bac43
of those doing bringup on the early silicon.  For bonus points, we actually
9bac43
had its PVR incorrect in the table (0x004e0000 instead of 0x004e0100).  We
9bac43
also never actually implemented the differences in behaviour (read, bugs)
9bac43
that marked DD1 in qemu.
9bac43
9bac43
Now that we know the PVR for the substantially better v2.0 (DD2) chip,
9bac43
include it and make it the default POWER9 in qemu.  For the time being we
9bac43
leave the DD1 definition in place for the poor souls (read, me) who still
9bac43
need to work with DD1 hardware.
9bac43
9bac43
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
9bac43
(cherry picked from commit 1ed9c8af501f8d1bdf5a8725a038527be059f54d)
9bac43
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
9bac43
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9bac43
9bac43
Conflicts:
9bac43
	hw/ppc/spapr_cpu_core.c
9bac43
	target/ppc/cpu-models.c
9bac43
9bac43
with downstream only commit:
9bac43
9bac43
  0e72e616b2 Enable/disable devices for RHEL 7
9bac43
9bac43
introducing "#if .. #endif" in the CPU list
9bac43
9bac43
And missing upstream commit:
9bac43
9bac43
  c5354f5 ppc: make cpu_model translation to type consistent
9bac43
9bac43
changing all the CPU names to lower-case and then doing
9bac43
case-insensitive matching. I've chosen to not backport this one
9bac43
because it changes the behaviour of the interface (vs upstream 2.10).
9bac43
---
9bac43
 hw/ppc/spapr_cpu_core.c | 1 +
9bac43
 target/ppc/cpu-models.c | 6 ++++--
9bac43
 target/ppc/cpu-models.h | 1 +
9bac43
 3 files changed, 6 insertions(+), 2 deletions(-)
9bac43
9bac43
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c
9bac43
index 400ab56..30c15d5 100644
9bac43
--- a/hw/ppc/spapr_cpu_core.c
9bac43
+++ b/hw/ppc/spapr_cpu_core.c
9bac43
@@ -308,6 +308,7 @@ static const char *spapr_core_models[] = {
9bac43
     "POWER8NVL_v1.0",
9bac43
     /* POWER9 */
9bac43
     "POWER9_v1.0",
9bac43
+    "POWER9_v2.0",
9bac43
 };
9bac43
 
9bac43
 static Property spapr_cpu_core_properties[] = {
9bac43
diff --git a/target/ppc/cpu-models.c b/target/ppc/cpu-models.c
9bac43
index 08a1f59..975aa07 100644
9bac43
--- a/target/ppc/cpu-models.c
9bac43
+++ b/target/ppc/cpu-models.c
9bac43
@@ -1150,8 +1150,10 @@
9bac43
                 "PowerPC 970 v2.2")
9bac43
 #endif
9bac43
 
9bac43
-    POWERPC_DEF("POWER9_v1.0",   CPU_POWERPC_POWER9_BASE,            POWER9,
9bac43
+    POWERPC_DEF("POWER9_v1.0",   CPU_POWERPC_POWER9_DD1,             POWER9,
9bac43
                 "POWER9 v1.0")
9bac43
+    POWERPC_DEF("POWER9_v2.0",   CPU_POWERPC_POWER9_DD20,            POWER9,
9bac43
+                "POWER9 v2.0")
9bac43
 
9bac43
 #if 0  /* Disabled for Red Hat Enterprise Linux */
9bac43
     POWERPC_DEF("970fx_v1.0",    CPU_POWERPC_970FX_v10,              970,
9bac43
@@ -1403,7 +1405,7 @@ PowerPCCPUAlias ppc_cpu_aliases[] = {
9bac43
     { "POWER8E", "POWER8E_v2.1" },
9bac43
     { "POWER8", "POWER8_v2.0" },
9bac43
     { "POWER8NVL", "POWER8NVL_v1.0" },
9bac43
-    { "POWER9", "POWER9_v1.0" },
9bac43
+    { "POWER9", "POWER9_v2.0" },
9bac43
 #if 0  /* Disabled for Red Hat Enterprise Linux */
9bac43
     { "970", "970_v2.2" },
9bac43
     { "970fx", "970fx_v3.1" },
9bac43
diff --git a/target/ppc/cpu-models.h b/target/ppc/cpu-models.h
9bac43
index b563c45..fc1b1d2 100644
9bac43
--- a/target/ppc/cpu-models.h
9bac43
+++ b/target/ppc/cpu-models.h
9bac43
@@ -562,6 +562,7 @@ enum {
9bac43
     CPU_POWERPC_POWER8NVL_v10      = 0x004C0100,
9bac43
     CPU_POWERPC_POWER9_BASE        = 0x004E0000,
9bac43
     CPU_POWERPC_POWER9_DD1         = 0x004E0100,
9bac43
+    CPU_POWERPC_POWER9_DD20        = 0x004E1200,
9bac43
     CPU_POWERPC_970_v22            = 0x00390202,
9bac43
     CPU_POWERPC_970FX_v10          = 0x00391100,
9bac43
     CPU_POWERPC_970FX_v20          = 0x003C0200,
9bac43
-- 
9bac43
1.8.3.1
9bac43