summary refs log tree commit diff stats
path: root/qom/object.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2024-01-17 15:10:53 +0100
committerThomas Huth <thuth@redhat.com>2024-02-05 14:21:21 +0100
commit5bfb75f15297a91161f720f997792dd9abc05dea (patch)
treed0b9ac0443170d8aacd7495f5a73a0bc37170f2b /qom/object.c
parent8b09b7fe47082c69295a0fc0cc01b041b6385025 (diff)
downloadfocaccia-qemu-5bfb75f15297a91161f720f997792dd9abc05dea.tar.gz
focaccia-qemu-5bfb75f15297a91161f720f997792dd9abc05dea.zip
target/ppc/cpu-models: Rename power5+ and power7+ for new QOM naming rules
The character "+" is now forbidden in QOM device names (see commit
b447378e1217 - "Limit type names to alphanumerical and some few special
characters"). For the "power5+" and "power7+" CPU names, there is
currently a hack in type_name_is_valid() to still allow them for
compatibility reasons. However, there is a much nicer solution for this:
Simply use aliases! This way we can still support the old names without
the need for the ugly hack in type_name_is_valid().

Message-ID: <20240117141054.73841-2-thuth@redhat.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'qom/object.c')
-rw-r--r--qom/object.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/qom/object.c b/qom/object.c
index 654e1afaf2..2c4c64d2b6 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -160,10 +160,6 @@ static bool type_name_is_valid(const char *name)
 
     /* Allow some legacy names with '+' in it for compatibility reasons */
     if (name[plen] == '+') {
-        if (plen == 6 && g_str_has_prefix(name, "power")) {
-            /* Allow "power5+" and "power7+" CPU names*/
-            return true;
-        }
         if (plen >= 17 && g_str_has_prefix(name, "Sun-UltraSparc-I")) {
             /* Allow "Sun-UltraSparc-IV+" and "Sun-UltraSparc-IIIi+" */
             return true;