[Qemu-commits] [qemu/qemu] 6b568e: target/sparc/cpu: Rename the CPU models with a "+"...

2024-05-06 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 6b568e3f1dc22e839cd56b47e22c2aa5ece21367
  
https://github.com/qemu/qemu/commit/6b568e3f1dc22e839cd56b47e22c2aa5ece21367
  Author: Thomas Huth 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M qom/object.c
M target/sparc/cpu.c

  Log Message:
  ---
  target/sparc/cpu: Rename the CPU models with a "+" in their names

Commit b447378e12 ("qom/object: Limit type names to alphanumerical ...")
cut down the amount of allowed characters for QOM types to a saner set.
The "+" character was meant to be included in this set, so we had to
add a hack there to still allow the legacy names of POWER and Sparc64
CPUs. However, instead of putting such a hack in the common QOM code,
there is a much better place to do this: The sparc_cpu_class_by_name()
function which is used to look up the names of all Sparc CPUs.
Thus let's finally get rid of the "+" in the Sparc CPU names, and provide
backward compatibility for the old names via some simple checks in the
sparc_cpu_class_by_name() function.

Reviewed-by: Mark Cave-Ayland 
Signed-off-by: Thomas Huth 
Reviewed-by: Richard Henderson 
Message-Id: <20240419084812.504779-2-th...@redhat.com>
Signed-off-by: Mark Cave-Ayland 


  Commit: 4a7bdec3a6f3f6d9f75715e420a4c826135a1065
  
https://github.com/qemu/qemu/commit/4a7bdec3a6f3f6d9f75715e420a4c826135a1065
  Author: Thomas Huth 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M target/sparc/cpu.c

  Log Message:
  ---
  target/sparc/cpu: Avoid spaces by default in the CPU names

The output of "-cpu help" is currently rather confusing to the users:
It might not be fully clear which part of the output defines the CPU
names since the CPU names contain white spaces (which we later have to
convert into dashes internally). At best it's at least a nuisance since
the users might need to specify the CPU names with quoting on the command
line if they are not aware of the fact that the CPU names could be written
with dashes instead. So let's finally clean up this mess by using dashes
instead of white spaces for the CPU names, like we're doing it internally
later (and like we're doing it in most other targets of QEMU).
Note that it is still possible to pass the CPU names with spaces to the
"-cpu" option, since sparc_cpu_type_name() still translates those to "-".

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2141
Reviewed-by: Richard Henderson 
Reviewed-by: Mark Cave-Ayland 
Signed-off-by: Thomas Huth 
Message-Id: <20240419084812.504779-3-th...@redhat.com>
Signed-off-by: Mark Cave-Ayland 


  Commit: 49ce37e3d024260072bdfa4c5569859d1f338cb2
  
https://github.com/qemu/qemu/commit/49ce37e3d024260072bdfa4c5569859d1f338cb2
  Author: Thomas Huth 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M docs/system/target-sparc.rst

  Log Message:
  ---
  docs/system/target-sparc: Improve the Sparc documentation

Add some words about how to enable or disable boolean features,
and remove the note about a Linux kernel being available on the
QEMU website (they have been removed long ago already), and the
note about NetBSD and OpenBSD still having issues (they should
work fine nowadays).

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2141
Signed-off-by: Thomas Huth 
Reviewed-by: Mark Cave-Ayland 
Reviewed-by: Richard Henderson 
Message-Id: <20240419084812.504779-4-th...@redhat.com>
Signed-off-by: Mark Cave-Ayland 


  Commit: 029171b5d62fe11a0dce52f64efb356f7fea144d
  
https://github.com/qemu/qemu/commit/029171b5d62fe11a0dce52f64efb356f7fea144d
  Author: Thomas Huth 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M docs/about/deprecated.rst

  Log Message:
  ---
  docs/about: Deprecate the old "UltraSparc" CPU names that contain a "+"

For consistency we should drop the names with a "+" in it in the
long run.

Reviewed-by: Mark Cave-Ayland 
Signed-off-by: Thomas Huth 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240419084812.504779-5-th...@redhat.com>
Signed-off-by: Mark Cave-Ayland 


  Commit: 7c420a4d7c080002018af20aed56ceb0bf81ad43
  
https://github.com/qemu/qemu/commit/7c420a4d7c080002018af20aed56ceb0bf81ad43
  Author: Mark Cave-Ayland 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M hw/sparc64/sun4u.c

  Log Message:
  ---
  hw/sparc64: set iommu_platform=on for virtio devices attached to the sun4u 
machine

The sun4u machine has an IOMMU and therefore it is possible to program it such
that the virtio-device IOVA does not map directly to the CPU physical address.

This is not a problem with Linux which always maps the IOVA directly to the CPU
physical address, however it is required for the NetBSD virtio driver where this
is not the case.

Set the sun4u machine defaults for all virtio devices so that disable-legacy=on
and iommu_platform=on to ensure a default configuration will allow virtio

[Qemu-commits] [qemu/qemu] 6b568e: target/sparc/cpu: Rename the CPU models with a "+"...

2024-05-06 Thread Richard Henderson via Qemu-commits
  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 6b568e3f1dc22e839cd56b47e22c2aa5ece21367
  
https://github.com/qemu/qemu/commit/6b568e3f1dc22e839cd56b47e22c2aa5ece21367
  Author: Thomas Huth 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M qom/object.c
M target/sparc/cpu.c

  Log Message:
  ---
  target/sparc/cpu: Rename the CPU models with a "+" in their names

Commit b447378e12 ("qom/object: Limit type names to alphanumerical ...")
cut down the amount of allowed characters for QOM types to a saner set.
The "+" character was meant to be included in this set, so we had to
add a hack there to still allow the legacy names of POWER and Sparc64
CPUs. However, instead of putting such a hack in the common QOM code,
there is a much better place to do this: The sparc_cpu_class_by_name()
function which is used to look up the names of all Sparc CPUs.
Thus let's finally get rid of the "+" in the Sparc CPU names, and provide
backward compatibility for the old names via some simple checks in the
sparc_cpu_class_by_name() function.

Reviewed-by: Mark Cave-Ayland 
Signed-off-by: Thomas Huth 
Reviewed-by: Richard Henderson 
Message-Id: <20240419084812.504779-2-th...@redhat.com>
Signed-off-by: Mark Cave-Ayland 


  Commit: 4a7bdec3a6f3f6d9f75715e420a4c826135a1065
  
https://github.com/qemu/qemu/commit/4a7bdec3a6f3f6d9f75715e420a4c826135a1065
  Author: Thomas Huth 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M target/sparc/cpu.c

  Log Message:
  ---
  target/sparc/cpu: Avoid spaces by default in the CPU names

The output of "-cpu help" is currently rather confusing to the users:
It might not be fully clear which part of the output defines the CPU
names since the CPU names contain white spaces (which we later have to
convert into dashes internally). At best it's at least a nuisance since
the users might need to specify the CPU names with quoting on the command
line if they are not aware of the fact that the CPU names could be written
with dashes instead. So let's finally clean up this mess by using dashes
instead of white spaces for the CPU names, like we're doing it internally
later (and like we're doing it in most other targets of QEMU).
Note that it is still possible to pass the CPU names with spaces to the
"-cpu" option, since sparc_cpu_type_name() still translates those to "-".

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2141
Reviewed-by: Richard Henderson 
Reviewed-by: Mark Cave-Ayland 
Signed-off-by: Thomas Huth 
Message-Id: <20240419084812.504779-3-th...@redhat.com>
Signed-off-by: Mark Cave-Ayland 


  Commit: 49ce37e3d024260072bdfa4c5569859d1f338cb2
  
https://github.com/qemu/qemu/commit/49ce37e3d024260072bdfa4c5569859d1f338cb2
  Author: Thomas Huth 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M docs/system/target-sparc.rst

  Log Message:
  ---
  docs/system/target-sparc: Improve the Sparc documentation

Add some words about how to enable or disable boolean features,
and remove the note about a Linux kernel being available on the
QEMU website (they have been removed long ago already), and the
note about NetBSD and OpenBSD still having issues (they should
work fine nowadays).

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2141
Signed-off-by: Thomas Huth 
Reviewed-by: Mark Cave-Ayland 
Reviewed-by: Richard Henderson 
Message-Id: <20240419084812.504779-4-th...@redhat.com>
Signed-off-by: Mark Cave-Ayland 


  Commit: 029171b5d62fe11a0dce52f64efb356f7fea144d
  
https://github.com/qemu/qemu/commit/029171b5d62fe11a0dce52f64efb356f7fea144d
  Author: Thomas Huth 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M docs/about/deprecated.rst

  Log Message:
  ---
  docs/about: Deprecate the old "UltraSparc" CPU names that contain a "+"

For consistency we should drop the names with a "+" in it in the
long run.

Reviewed-by: Mark Cave-Ayland 
Signed-off-by: Thomas Huth 
Reviewed-by: Philippe Mathieu-Daudé 
Reviewed-by: Richard Henderson 
Message-Id: <20240419084812.504779-5-th...@redhat.com>
Signed-off-by: Mark Cave-Ayland 


  Commit: 7c420a4d7c080002018af20aed56ceb0bf81ad43
  
https://github.com/qemu/qemu/commit/7c420a4d7c080002018af20aed56ceb0bf81ad43
  Author: Mark Cave-Ayland 
  Date:   2024-05-05 (Sun, 05 May 2024)

  Changed paths:
M hw/sparc64/sun4u.c

  Log Message:
  ---
  hw/sparc64: set iommu_platform=on for virtio devices attached to the sun4u 
machine

The sun4u machine has an IOMMU and therefore it is possible to program it such
that the virtio-device IOVA does not map directly to the CPU physical address.

This is not a problem with Linux which always maps the IOVA directly to the CPU
physical address, however it is required for the NetBSD virtio driver where this
is not the case.

Set the sun4u machine defaults for all virtio devices so that disable-legacy=on
and iommu_platform=on to ensure a default configuration will allow virtio