mbox series

[0/3] Remove useless architecture prefix from the CPU list

Message ID 20240420054606.13353-1-thuth@redhat.com (mailing list archive)
Headers show
Series Remove useless architecture prefix from the CPU list | expand

Message

Thomas Huth April 20, 2024, 5:46 a.m. UTC
Printing an architecture prefix in front of each CPU name is not helpful
at all: It is confusing for the users since they don't know whether they
have to specify these letters for the "-cpu" parameter, too, and it also
takes some precious space in the dense output of the CPU entries. Let's
simply remove those now.

Thomas Huth (3):
  target/i386/cpu: Remove "x86" prefix from the CPU list
  target/s390x/cpu_models: Rework the output of "-cpu help"
  target/ppc/cpu_init: Remove "PowerPC" prefix from the CPU list

 target/i386/cpu.c         | 2 +-
 target/ppc/cpu_init.c     | 9 +++++----
 target/s390x/cpu_models.c | 9 +++++----
 3 files changed, 11 insertions(+), 9 deletions(-)

Comments

David Hildenbrand April 20, 2024, 2:40 p.m. UTC | #1
On 20.04.24 07:46, Thomas Huth wrote:
> Printing an architecture prefix in front of each CPU name is not helpful
> at all: It is confusing for the users since they don't know whether they
> have to specify these letters for the "-cpu" parameter, too, and it also
> takes some precious space in the dense output of the CPU entries. Let's
> simply remove those now.

Yes, I also never really understood the purpose.
Richard Henderson April 20, 2024, 4:26 p.m. UTC | #2
On 4/19/24 22:46, Thomas Huth wrote:
> Thomas Huth (3):
>    target/i386/cpu: Remove "x86" prefix from the CPU list
>    target/s390x/cpu_models: Rework the output of "-cpu help"
>    target/ppc/cpu_init: Remove "PowerPC" prefix from the CPU list

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
Michael Tokarev April 20, 2024, 4:53 p.m. UTC | #3
20.04.2024 08:46, Thomas Huth:
> Printing an architecture prefix in front of each CPU name is not helpful
> at all: It is confusing for the users since they don't know whether they
> have to specify these letters for the "-cpu" parameter, too, and it also
> takes some precious space in the dense output of the CPU entries. Let's
> simply remove those now.
> 
> Thomas Huth (3):
>    target/i386/cpu: Remove "x86" prefix from the CPU list
>    target/s390x/cpu_models: Rework the output of "-cpu help"
>    target/ppc/cpu_init: Remove "PowerPC" prefix from the CPU list

Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>

I'll pick it up for trivial-patches after 9.0 is out.

This also reminded me about https://gitlab.com/qemu-project/qemu/-/issues/2141

/mjt
Daniel P. Berrangé April 22, 2024, 8:03 a.m. UTC | #4
On Sat, Apr 20, 2024 at 07:46:03AM +0200, Thomas Huth wrote:
> Printing an architecture prefix in front of each CPU name is not helpful
> at all: It is confusing for the users since they don't know whether they
> have to specify these letters for the "-cpu" parameter, too, and it also
> takes some precious space in the dense output of the CPU entries. Let's
> simply remove those now.

Could it be said that this arch prefix is about to finally become useful
with Philippe's patches to add a 'qemu-system-any' command covering
multiple arches ?

With regards,
Daniel
Thomas Huth April 22, 2024, 8:22 a.m. UTC | #5
On 22/04/2024 10.03, Daniel P. Berrangé wrote:
> On Sat, Apr 20, 2024 at 07:46:03AM +0200, Thomas Huth wrote:
>> Printing an architecture prefix in front of each CPU name is not helpful
>> at all: It is confusing for the users since they don't know whether they
>> have to specify these letters for the "-cpu" parameter, too, and it also
>> takes some precious space in the dense output of the CPU entries. Let's
>> simply remove those now.
> 
> Could it be said that this arch prefix is about to finally become useful
> with Philippe's patches to add a 'qemu-system-any' command covering
> multiple arches ?

I don't think so: In that case we'd rather print it once at the beginning of 
a list ("Available x86 CPUs:") instead of printing it in each and every line.

  Thomas
Mario Casquero April 26, 2024, 9:13 a.m. UTC | #6
This series has been successfully tested in x86. Execute the cpu help
command and check in the list the x86 prefix is no longer present.

Tested-by: Mario Casquero <mcasquer@redhat.com>

On Sat, Apr 20, 2024 at 7:47 AM Thomas Huth <thuth@redhat.com> wrote:
>
> Printing an architecture prefix in front of each CPU name is not helpful
> at all: It is confusing for the users since they don't know whether they
> have to specify these letters for the "-cpu" parameter, too, and it also
> takes some precious space in the dense output of the CPU entries. Let's
> simply remove those now.
>
> Thomas Huth (3):
>   target/i386/cpu: Remove "x86" prefix from the CPU list
>   target/s390x/cpu_models: Rework the output of "-cpu help"
>   target/ppc/cpu_init: Remove "PowerPC" prefix from the CPU list
>
>  target/i386/cpu.c         | 2 +-
>  target/ppc/cpu_init.c     | 9 +++++----
>  target/s390x/cpu_models.c | 9 +++++----
>  3 files changed, 11 insertions(+), 9 deletions(-)
>
> --
> 2.44.0
>
>
Philippe Mathieu-Daudé April 29, 2024, 10:26 a.m. UTC | #7
On 22/4/24 10:22, Thomas Huth wrote:
> On 22/04/2024 10.03, Daniel P. Berrangé wrote:
>> On Sat, Apr 20, 2024 at 07:46:03AM +0200, Thomas Huth wrote:
>>> Printing an architecture prefix in front of each CPU name is not helpful
>>> at all: It is confusing for the users since they don't know whether they
>>> have to specify these letters for the "-cpu" parameter, too, and it also
>>> takes some precious space in the dense output of the CPU entries. Let's
>>> simply remove those now.
>>
>> Could it be said that this arch prefix is about to finally become useful
>> with Philippe's patches to add a 'qemu-system-any' command covering
>> multiple arches ?
> 
> I don't think so: In that case we'd rather print it once at the 
> beginning of a list ("Available x86 CPUs:") instead of printing it in 
> each and every line.

Yes that is correct. Hopefully we won't have the same CPU name used
by different architectures...

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>