ppc: Rename power5+ and power7+ for the new QOM naming rules
v2 cover ppc: Rename power5+ and power7+ for the new QOM naming rules
We can get rid of the "power5+" / "power7+" hack in qom/object.c by using CPU aliases for those names instead (first patch).
I think in the long run, we should get rid of the names with a "+" in it completely, so the second patch suggests to deprecate those, but I'd also be fine if we keep the aliases around, so in that case please ignore the second patch.
v2:
- Use "power5p" / "power7p" instead of "power5plus" / "power7plus"
Thomas Huth (2):
target/ppc/cpu-models: Rename power5+ and power7+ for new QOM naming
rules
docs/about: Deprecate the old "power5+" and "power7+" CPU names
docs/about/deprecated.rst | 9 +++++++++ hw/ppc/spapr_cpu_core.c | 4 ++-- qom/object.c | 4 ---- target/ppc/cpu-models.c | 10 ++++++---- 4 files changed, 17 insertions(+), 10 deletions(-)
Signature · 1 line
2.43.0
PATCH v2 1/2 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().
--- hw/ppc/spapr_cpu_core.c | 4 ++-- qom/object.c | 4 ---- target/ppc/cpu-models.c | 10 ++++++---- 3 files changed, 8 insertions(+), 10 deletions(-)
hw/ppc/spapr_cpu_core.c +2 -2
@@ -389,9 +389,9 @@ static const TypeInfo spapr_cpu_core_type_infos[] = {DEFINE_SPAPR_CPU_CORE_TYPE ("970_v2.2" ),DEFINE_SPAPR_CPU_CORE_TYPE ("970mp_v1.0" ),DEFINE_SPAPR_CPU_CORE_TYPE ("970mp_v1.1" ), -DEFINE_SPAPR_CPU_CORE_TYPE ("power5+_v2.1" ), +DEFINE_SPAPR_CPU_CORE_TYPE ("power5p_v2.1" ),DEFINE_SPAPR_CPU_CORE_TYPE ("power7_v2.3" ), -DEFINE_SPAPR_CPU_CORE_TYPE ("power7+_v2.1" ), +DEFINE_SPAPR_CPU_CORE_TYPE ("power7p_v2.1" ),DEFINE_SPAPR_CPU_CORE_TYPE ("power8_v2.0" ),DEFINE_SPAPR_CPU_CORE_TYPE ("power8e_v2.1" ), DEFINE_SPAPR_CPU_CORE_TYPE("power8nvl_v1.0"),
qom/object.c +0 -4
@@ -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;
target/ppc/cpu-models.c +6 -4
@@ -716,11 +716,11 @@ "PowerPC 970MP v1.0") POWERPC_DEF("970mp_v1.1", CPU_POWERPC_970MP_v11, 970, "PowerPC 970MP v1.1") - POWERPC_DEF("power5+_v2.1", CPU_POWERPC_POWER5P_v21, POWER5P, + POWERPC_DEF("power5p_v2.1", CPU_POWERPC_POWER5P_v21, POWER5P, "POWER5+ v2.1") POWERPC_DEF("power7_v2.3", CPU_POWERPC_POWER7_v23, POWER7, "POWER7 v2.3") - POWERPC_DEF("power7+_v2.1", CPU_POWERPC_POWER7P_v21, POWER7, + POWERPC_DEF("power7p_v2.1", CPU_POWERPC_POWER7P_v21, POWER7, "POWER7+ v2.1")POWERPC_DEF ("power8e_v2.1" , CPU_POWERPC_POWER8E_v21,POWER8 ,"POWER8E v2.1" )
@@ -902,10 +902,12 @@ PowerPCCPUAlias ppc_cpu_aliases[] = { { "970", "970_v2.2" }, { "970fx", "970fx_v3.1" }, { "970mp", "970mp_v1.1" }, - { "power5+", "power5+_v2.1" }, + { "power5+", "power5p_v2.1" }, + { "power5+_v2.1", "power5p_v2.1" }, { "power5gs", "power5+_v2.1" }, { "power7", "power7_v2.3" }, - { "power7+", "power7+_v2.1" }, + { "power7+", "power7p_v2.1" }, + { "power7+_v2.1", "power7p_v2.1" }, { "power8e", "power8e_v2.1" }, { "power8", "power8_v2.0" }, { "power8nvl", "power8nvl_v1.0" },
Signature · 1 line
2.43.0
Re: [PATCH v2 1/2] target/ppc/cpu-models: Rename power5+ and power7+ for new QOM naming rules
Quoted 9 lines · Thomas Huth
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 intype_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 intype_name_is_valid().Signed-off-by Thomas Huth <[email protected]>
Thanks,
C.
Quoted 70 lines
--- hw/ppc/spapr_cpu_core.c | 4 ++-- qom/object.c | 4 ---- target/ppc/cpu-models.c | 10 ++++++---- 3 files changed, 8 insertions(+), 10 deletions(-)hw/ppc/spapr_cpu_core.c +2
-2@@ -389,9 +389,9 @@ static const TypeInfo spapr_cpu_core_type_infos[] = {DEFINE_SPAPR_CPU_CORE_TYPE ("970_v2.2" ),DEFINE_SPAPR_CPU_CORE_TYPE ("970mp_v1.0" ),DEFINE_SPAPR_CPU_CORE_TYPE ("970mp_v1.1" ), -DEFINE_SPAPR_CPU_CORE_TYPE ("power5+_v2.1" ), +DEFINE_SPAPR_CPU_CORE_TYPE ("power5p_v2.1" ),DEFINE_SPAPR_CPU_CORE_TYPE ("power7_v2.3" ), -DEFINE_SPAPR_CPU_CORE_TYPE ("power7+_v2.1" ), +DEFINE_SPAPR_CPU_CORE_TYPE ("power7p_v2.1" ),DEFINE_SPAPR_CPU_CORE_TYPE ("power8_v2.0" ),DEFINE_SPAPR_CPU_CORE_TYPE ("power8e_v2.1" ), DEFINE_SPAPR_CPU_CORE_TYPE("power8nvl_v1.0"),qom/object.c +0
-4@@ -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;target/ppc/cpu-models.c +6
-4@@ -716,11 +716,11 @@ "PowerPC 970MP v1.0") POWERPC_DEF("970mp_v1.1", CPU_POWERPC_970MP_v11, 970, "PowerPC 970MP v1.1") - POWERPC_DEF("power5+_v2.1", CPU_POWERPC_POWER5P_v21, POWER5P, + POWERPC_DEF("power5p_v2.1", CPU_POWERPC_POWER5P_v21, POWER5P, "POWER5+ v2.1") POWERPC_DEF("power7_v2.3", CPU_POWERPC_POWER7_v23, POWER7, "POWER7 v2.3") - POWERPC_DEF("power7+_v2.1", CPU_POWERPC_POWER7P_v21, POWER7, + POWERPC_DEF("power7p_v2.1", CPU_POWERPC_POWER7P_v21, POWER7, "POWER7+ v2.1")POWERPC_DEF ("power8e_v2.1" , CPU_POWERPC_POWER8E_v21,POWER8 ,"POWER8E v2.1" )@@ -902,10 +902,12 @@ PowerPCCPUAlias ppc_cpu_aliases[] = { { "970", "970_v2.2" }, { "970fx", "970fx_v3.1" }, { "970mp", "970mp_v1.1" }, - { "power5+", "power5+_v2.1" }, + { "power5+", "power5p_v2.1" }, + { "power5+_v2.1", "power5p_v2.1" }, { "power5gs", "power5+_v2.1" }, { "power7", "power7_v2.3" }, - { "power7+", "power7+_v2.1" }, + { "power7+", "power7p_v2.1" }, + { "power7+_v2.1", "power7p_v2.1" }, { "power8e", "power8e_v2.1" }, { "power8", "power8_v2.0" }, { "power8nvl", "power8nvl_v1.0" },
Re: [PATCH v2 1/2] target/ppc/cpu-models: Rename power5+ and power7+ for new QOM naming rules
In reply to Thomas HuthQuoted 9 lines · Thomas Huth
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 intype_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 intype_name_is_valid().Signed-off-by Thomas Huth <[email protected]>
Quoted 70 lines
--- hw/ppc/spapr_cpu_core.c | 4 ++-- qom/object.c | 4 ---- target/ppc/cpu-models.c | 10 ++++++---- 3 files changed, 8 insertions(+), 10 deletions(-)hw/ppc/spapr_cpu_core.c +2
-2@@ -389,9 +389,9 @@ static const TypeInfo spapr_cpu_core_type_infos[] = {DEFINE_SPAPR_CPU_CORE_TYPE ("970_v2.2" ),DEFINE_SPAPR_CPU_CORE_TYPE ("970mp_v1.0" ),DEFINE_SPAPR_CPU_CORE_TYPE ("970mp_v1.1" ), -DEFINE_SPAPR_CPU_CORE_TYPE ("power5+_v2.1" ), +DEFINE_SPAPR_CPU_CORE_TYPE ("power5p_v2.1" ),DEFINE_SPAPR_CPU_CORE_TYPE ("power7_v2.3" ), -DEFINE_SPAPR_CPU_CORE_TYPE ("power7+_v2.1" ), +DEFINE_SPAPR_CPU_CORE_TYPE ("power7p_v2.1" ),DEFINE_SPAPR_CPU_CORE_TYPE ("power8_v2.0" ),DEFINE_SPAPR_CPU_CORE_TYPE ("power8e_v2.1" ), DEFINE_SPAPR_CPU_CORE_TYPE("power8nvl_v1.0"),qom/object.c +0
-4@@ -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;target/ppc/cpu-models.c +6
-4@@ -716,11 +716,11 @@ "PowerPC 970MP v1.0") POWERPC_DEF("970mp_v1.1", CPU_POWERPC_970MP_v11, 970, "PowerPC 970MP v1.1") - POWERPC_DEF("power5+_v2.1", CPU_POWERPC_POWER5P_v21, POWER5P, + POWERPC_DEF("power5p_v2.1", CPU_POWERPC_POWER5P_v21, POWER5P, "POWER5+ v2.1") POWERPC_DEF("power7_v2.3", CPU_POWERPC_POWER7_v23, POWER7, "POWER7 v2.3") - POWERPC_DEF("power7+_v2.1", CPU_POWERPC_POWER7P_v21, POWER7, + POWERPC_DEF("power7p_v2.1", CPU_POWERPC_POWER7P_v21, POWER7, "POWER7+ v2.1")POWERPC_DEF ("power8e_v2.1" , CPU_POWERPC_POWER8E_v21,POWER8 ,"POWER8E v2.1" )@@ -902,10 +902,12 @@ PowerPCCPUAlias ppc_cpu_aliases[] = { { "970", "970_v2.2" }, { "970fx", "970fx_v3.1" }, { "970mp", "970mp_v1.1" }, - { "power5+", "power5+_v2.1" }, + { "power5+", "power5p_v2.1" }, + { "power5+_v2.1", "power5p_v2.1" }, { "power5gs", "power5+_v2.1" }, { "power7", "power7_v2.3" }, - { "power7+", "power7+_v2.1" }, + { "power7+", "power7p_v2.1" }, + { "power7+_v2.1", "power7p_v2.1" }, { "power8e", "power8e_v2.1" }, { "power8", "power8_v2.0" }, { "power8nvl", "power8nvl_v1.0" },
PATCH v2 2/2 docs/about: Deprecate the old "power5+" and "power7+" CPU names
In reply to Thomas HuthFor consistency we should drop the names with a "+" in it in the long run.
--- docs/about/deprecated.rst | 9 +++++++++ 1 file changed, 9 insertions(+)
docs/about/deprecated.rst +9 -0
@@ -217,6 +217,15 @@ Nios II CPU (since 8.2) The Nios II architecture is orphan. The ``nios2`` guest CPU support is deprecated and will be removed in a future version of QEMU. +``power5+`` and ``power7+`` CPU names (since 9.0) +''''''''''''''''''''''''''''''''''''''''''''''''' + +The character "+" in device (and thus also CPU) names is not allowed +in the QEMU object model anymore. ``power5+``, ``power5+_v2.1``, +``power7+`` and ``power7+_v2.1`` are currently still supported via +an alias, but for consistency these will get removed in a future +release, too. Use ``power5p_v2.1`` and ``power7p_v2.1`` instead. + System emulator machines ------------------------
Signature · 1 line
2.43.0
Re: [PATCH v2 2/2] docs/about: Deprecate the old "power5+" and "power7+" CPU names
Quoted 7 lines · Thomas Huth
For consistency we should drop the names with a "+" in it in the long run.
Signed-off-by Thomas Huth <[email protected]>--- docs/about/deprecated.rst | 9 +++++++++ 1 file changed, 9 insertions(+)
Re: [PATCH v2 2/2] docs/about: Deprecate the old "power5+" and "power7+" CPU names
In reply to Thomas HuthQuoted 4 lines · Thomas Huth
For consistency we should drop the names with a "+" in it in the long run.
Signed-off-by Thomas Huth <[email protected]>
Thanks,
C.
Quoted 24 lines
--- docs/about/deprecated.rst | 9 +++++++++ 1 file changed, 9 insertions(+)docs/about/deprecated.rst +9
-0@@ -217,6 +217,15 @@ Nios II CPU (since 8.2) The Nios II architecture is orphan. The ``nios2`` guest CPU support is deprecated and will be removed in a future version of QEMU. +``power5+`` and ``power7+`` CPU names (since 9.0) +''''''''''''''''''''''''''''''''''''''''''''''''' + +The character "+" in device (and thus also CPU) names is not allowed +in the QEMU object model anymore. ``power5+``, ``power5+_v2.1``, +``power7+`` and ``power7+_v2.1`` are currently still supported via +an alias, but for consistency these will get removed in a future +release, too. Use ``power5p_v2.1`` and ``power7p_v2.1`` instead. + System emulator machines ------------------------
Re: [PATCH v2 2/2] docs/about: Deprecate the old "power5+" and "power7+" CPU names
In reply to Thomas HuthQuoted 4 lines · Thomas Huth
For consistency we should drop the names with a "+" in it in the long run.
Signed-off-by Thomas Huth <[email protected]>
Quoted 24 lines
--- docs/about/deprecated.rst | 9 +++++++++ 1 file changed, 9 insertions(+)docs/about/deprecated.rst +9
-0@@ -217,6 +217,15 @@ Nios II CPU (since 8.2) The Nios II architecture is orphan. The ``nios2`` guest CPU support is deprecated and will be removed in a future version of QEMU. +``power5+`` and ``power7+`` CPU names (since 9.0) +''''''''''''''''''''''''''''''''''''''''''''''''' + +The character "+" in device (and thus also CPU) names is not allowed +in the QEMU object model anymore. ``power5+``, ``power5+_v2.1``, +``power7+`` and ``power7+_v2.1`` are currently still supported via +an alias, but for consistency these will get removed in a future +release, too. Use ``power5p_v2.1`` and ``power7p_v2.1`` instead. + System emulator machines ------------------------