mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
target/ppc/cpu-models: Rename power5+ and power7+ for new QOM naming rules
The character "+" is now forbidden in QOM device names (see commit
b447378e12
- "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>
This commit is contained in:
parent
8b09b7fe47
commit
5bfb75f152
3 changed files with 8 additions and 10 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue