qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [PATCH 1/2] QEMU: PPC: specify PVRs for all e500 cores


From: Alexander Graf
Subject: Re: [Qemu-ppc] [PATCH 1/2] QEMU: PPC: specify PVRs for all e500 cores
Date: Thu, 17 Apr 2014 11:09:20 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.4.0


On 17.04.14 05:13, Stuart Yoder wrote:

-----Original Message-----
From: Alexander Graf [mailto:address@hidden
Sent: Monday, April 14, 2014 6:01 AM
To: Yoder Stuart-B08248
Cc: address@hidden; address@hidden
Subject: Re: [PATCH 1/2] QEMU: PPC: specify PVRs for all e500 cores


On 14.02.14 20:22, Stuart Yoder wrote:
From: Stuart Yoder <address@hidden>

Signed-off-by: Stuart Yoder <address@hidden>
---
   target-ppc/cpu-models.c |   64
+++++++++++++++++++++++++++++++++++++++++++++--
   target-ppc/cpu-models.h |   30 ++++++++++++++++++++--
   2 files changed, 90 insertions(+), 4 deletions(-)

diff --git a/target-ppc/cpu-models.c b/target-ppc/cpu-models.c
index f6c9b3a..9cf603b 100644
--- a/target-ppc/cpu-models.c
+++ b/target-ppc/cpu-models.c
@@ -677,19 +677,79 @@
                   "PowerPC e500 v2.0 core")
       POWERPC_DEF("e500v2_v10",    CPU_POWERPC_e500v2_v10,
e500v2,
                   "PowerPC e500v2 v1.0 core")
+    POWERPC_DEF("e500v2_v11",    CPU_POWERPC_e500v2_v11,
e500v2,
+                "PowerPC e500v2 v1.1 core")
       POWERPC_DEF("e500v2_v20",    CPU_POWERPC_e500v2_v20,
e500v2,
                   "PowerPC e500v2 v2.0 core")
       POWERPC_DEF("e500v2_v21",    CPU_POWERPC_e500v2_v21,
e500v2,
                   "PowerPC e500v2 v2.1 core")
       POWERPC_DEF("e500v2_v22",    CPU_POWERPC_e500v2_v22,
e500v2,
                   "PowerPC e500v2 v2.2 core")
+    POWERPC_DEF("e500v2_v23",    CPU_POWERPC_e500v2_v23,
e500v2,
+                "PowerPC e500v2 v2.3 core")
       POWERPC_DEF("e500v2_v30",    CPU_POWERPC_e500v2_v30,
e500v2,
                   "PowerPC e500v2 v3.0 core")
+    POWERPC_DEF("e500v2_v31",    CPU_POWERPC_e500v2_v31,
e500v2,
+                "PowerPC e500v2 v3.1 core")
+    POWERPC_DEF("e500v2_v1040", CPU_POWERPC_e500v2_v1040,
e500v2,
+                "PowerPC e500v2 v104.0 core")
+    POWERPC_DEF("e500v2_v1050", CPU_POWERPC_e500v2_v1050,
e500v2,
+                "PowerPC e500v2 v105.0 core")
+    POWERPC_DEF("e500v2_v1051", CPU_POWERPC_e500v2_v1051,
e500v2,
+                "PowerPC e500v2 v105.1 core")
+    POWERPC_DEF("e500v2_v1151", CPU_POWERPC_e500v2_v1151,
e500v2,
+                "PowerPC e500v2 v115.1 core")
+    POWERPC_DEF("e500v2_v1152", CPU_POWERPC_e500v2_v1152,
e500v2,
+                "PowerPC e500v2 v115.2 core")
+    POWERPC_DEF("e500v2_v2050", CPU_POWERPC_e500v2_v2050,
e500v2,
+                "PowerPC e500v2 v205.0 core")
+    POWERPC_DEF("e500v2_v2051", CPU_POWERPC_e500v2_v2051,
e500v2,
+                "PowerPC e500v2 v205.1 core")
+    POWERPC_DEF("e500v2_v2151", CPU_POWERPC_e500v2_v2151,
e500v2,
+                "PowerPC e500v2 v215.1 core")
+    POWERPC_DEF("e500v2_v2152", CPU_POWERPC_e500v2_v2152,
e500v2,
+                "PowerPC e500v2 v215.2 core")
+    POWERPC_DEF("e500v2_v2251", CPU_POWERPC_e500v2_v2251,
e500v2,
+                "PowerPC e500v2 v225.1 core")
+
+    /* e500mc family */
       POWERPC_DEF_SVR("e500mc", "e500mc",
-                    CPU_POWERPC_e500mc,       POWERPC_SVR_E500,
e500mc)
+                    CPU_POWERPC_e500mc_v20,   POWERPC_SVR_E500,
e500mc)

How about we use aliases instead like the other CPU types? :)

+    POWERPC_DEF_SVR("e500mc_v10", "PowerPC e500mc v1.0 core",
+                    CPU_POWERPC_e500mc_v10,   POWERPC_SVR_E500,
e500mc)
+    POWERPC_DEF_SVR("e500mc_v21", "PowerPC e500mc v2.1 core",
+                    CPU_POWERPC_e500mc_v21,   POWERPC_SVR_E500,
e500mc)
+    POWERPC_DEF_SVR("e500mc_v22", "PowerPC e500mc v2.2 core",
+                    CPU_POWERPC_e500mc_v22,   POWERPC_SVR_E500,
e500mc)
+    POWERPC_DEF_SVR("e500mc_v23", "PowerPC e500mc v2.3 core",
+                    CPU_POWERPC_e500mc_v23,   POWERPC_SVR_E500,
e500mc)
+    POWERPC_DEF_SVR("e500mc_v1030", "PowerPC e500mc v103.0 core",
+                    CPU_POWERPC_e500mc_v1030, POWERPC_SVR_E500,
e500mc)
+    POWERPC_DEF_SVR("e500mc_v30", "PowerPC e500mc v3.0 core",
+                    CPU_POWERPC_e500mc_v30,   POWERPC_SVR_E500,
e500mc)
+    POWERPC_DEF_SVR("e500mc_v31", "PowerPC e500mc v3.1 core",
+                    CPU_POWERPC_e500mc_v31,   POWERPC_SVR_E500,
e500mc)
+    POWERPC_DEF_SVR("e500mc_v32", "PowerPC e500mc v3.2 core",
+                    CPU_POWERPC_e500mc_v32,   POWERPC_SVR_E500,
e500mc)
+
   #ifdef TARGET_PPC64
+    /* e5500 family */
       POWERPC_DEF_SVR("e5500", "e5500",
-                    CPU_POWERPC_e5500,        POWERPC_SVR_E500,
e5500)

Same here
Can you explain you mean?  what kind of alias?

Further down in the same file you will find a list of CPU aliases where we map common names to specific versioned classes, like

    { "POWER7", "POWER7_v2.3" },

Because we didn't implement versioned e500 CPU types we don't do this for e500. However now that we get versioned types, I think it makes sense to add aliases and keep all classes versioned.

One thing that Alexey recently introduced is dynamic class creation based on the host CPU through masks. So for e500mc, we would have an e500mc match mask that catches all e500mc cores. The internal logic could then create an "e500mc" class type on the fly based on the host's PVR.

This works as long as all e500mc cores have basically the same feature set. Are we sure this is the case? Then we can also be more future proof and not introduce new classes for every single core version.


Alex




reply via email to

[Prev in Thread] Current Thread [Next in Thread]