mbox series

[0/7] cli: Remove mentions of legacy '-machine foo, accel=bar' command line

Message ID 20241203092153.60590-1-philmd@linaro.org
Headers show
Series cli: Remove mentions of legacy '-machine foo, accel=bar' command line | expand

Message

Philippe Mathieu-Daudé Dec. 3, 2024, 9:21 a.m. UTC
Thomas told '-machine foo,accel=bar' is sugar and almost
deprecated. Rather than having bad examples in the tree,
remove the legacy form and update to the new '-accel bar'
one.

Xen uses via MachineClass::default_machine_opts left for later:

hw/i386/pc_piix.c:818:    m->default_machine_opts = "accel=xen,suppress-vmdesc=on";
hw/i386/pc_piix.c:830:    m->default_machine_opts = "accel=xen,suppress-vmdesc=on";
hw/xen/xen-pvh-common.c:381:    mc->default_machine_opts = "accel=xen";
hw/xenpv/xen_machine_pv.c:69:    mc->default_machine_opts = "accel=xen";

Philippe Mathieu-Daudé (7):
  tests/functional/test_ppc64_hv: Remove legacy '-machine foo,accel=bar'
  tests/functional/test_virtio_gpu: Remove legacy '-machine
    foo,accel=bar'
  tests/qtest/fuzz: Remove legacy '-machine foo,accel=bar'
  scripts/device-crash-test: Remove legacy '-machine foo,accel=bar'
  accel/tcg: Remove mentions of legacy '-machine foo,accel=bar'
  accel/kvm: Remove mentions of legacy '-machine foo,accel=bar'
  qemu-options: Remove mentions of legacy '-machine foo,accel=bar'

 docs/about/removed-features.rst                |  2 +-
 docs/bypass-iommu.txt                          |  3 ++-
 docs/nvdimm.txt                                |  2 +-
 docs/specs/tpm.rst                             |  2 +-
 docs/system/arm/cpu-features.rst               |  2 +-
 docs/system/cpu-hotplug.rst                    |  2 +-
 docs/system/ppc/powernv.rst                    |  2 +-
 docs/system/ppc/pseries.rst                    |  4 ++--
 linux-user/s390x/target_proc.h                 |  2 +-
 accel/tcg/monitor.c                            |  4 ++--
 system/vl.c                                    |  2 +-
 tests/qtest/fuzz/generic_fuzz.c                |  2 +-
 tests/qtest/fuzz/i440fx_fuzz.c                 |  2 +-
 tests/qtest/fuzz/qos_fuzz.c                    |  2 +-
 tests/qtest/qmp-cmd-test.c                     |  2 +-
 qemu-options.hx                                |  9 ---------
 scripts/device-crash-test                      | 11 ++++++++---
 scripts/oss-fuzz/output_reproducer.py          |  2 --
 scripts/oss-fuzz/reorder_fuzzer_qtest_trace.py |  6 +++---
 tests/functional/test_ppc64_hv.py              |  3 ++-
 tests/functional/test_virtio_gpu.py            |  6 ++++--
 21 files changed, 35 insertions(+), 37 deletions(-)

Comments

Daniel P. Berrangé Dec. 3, 2024, 9:34 a.m. UTC | #1
On Tue, Dec 03, 2024 at 10:21:47AM +0100, Philippe Mathieu-Daudé wrote:
> Since commit 6f6e1698a68 ("vl: configure accelerators from -accel
> options") we prefer the '-accel bar' command line option.
> 
> Replace '-machine foo,accel=bar' -> '-machine foo -accel bar' in
> functional tests.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  tests/functional/test_ppc64_hv.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
Daniel P. Berrangé Dec. 3, 2024, 9:35 a.m. UTC | #2
On Tue, Dec 03, 2024 at 10:21:49AM +0100, Philippe Mathieu-Daudé wrote:
> Since commit 6f6e1698a68 ("vl: configure accelerators from -accel
> options") we prefer the '-accel bar' command line option.
> 
> Replace '-machine foo,accel=bar' -> '-machine foo -accel bar' in
> fuzzer scripts and tests.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  tests/qtest/fuzz/generic_fuzz.c                | 2 +-
>  tests/qtest/fuzz/i440fx_fuzz.c                 | 2 +-
>  tests/qtest/fuzz/qos_fuzz.c                    | 2 +-
>  scripts/oss-fuzz/output_reproducer.py          | 2 --
>  scripts/oss-fuzz/reorder_fuzzer_qtest_trace.py | 6 +++---
>  5 files changed, 6 insertions(+), 8 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
Daniel P. Berrangé Dec. 3, 2024, 9:42 a.m. UTC | #3
On Tue, Dec 03, 2024 at 10:21:51AM +0100, Philippe Mathieu-Daudé wrote:
> Since commit 6f6e1698a68 ("vl: configure accelerators from -accel
> options") we prefer the '-accel bar' command line option.
> 
> Update the documentation when TCG is referred to.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  docs/about/removed-features.rst | 2 +-
>  linux-user/s390x/target_proc.h  | 2 +-
>  accel/tcg/monitor.c             | 4 ++--
>  system/vl.c                     | 2 +-
>  tests/qtest/qmp-cmd-test.c      | 2 +-
>  5 files changed, 6 insertions(+), 6 deletions(-)

> diff --git a/system/vl.c b/system/vl.c
> index 54998fdbc7e..c056fcb740c 100644
> --- a/system/vl.c
> +++ b/system/vl.c
> @@ -2385,7 +2385,7 @@ static void configure_accelerators(const char *progname)
>          for (tmp = accel_list; *tmp; tmp++) {
>              /*
>               * Filter invalid accelerators here, to prevent obscenities
> -             * such as "-machine accel=tcg,,thread=single".
> +             * such as "-accel tcg,,thread=single".
>               */

I'm not sure I understand what the old message was trying to archive, but
at the same time I'm even less convinced it makes sense to change the
comment.

>              if (accel_find(*tmp)) {
>                  qemu_opts_parse_noisily(qemu_find_opts("accel"), *tmp, true);

For all of the patch, except for that chunk above:

  Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
Thomas Huth Dec. 3, 2024, 10:20 a.m. UTC | #4
On 03/12/2024 10.21, Philippe Mathieu-Daudé wrote:
> Since commit 6f6e1698a68 ("vl: configure accelerators from -accel
> options") we prefer the '-accel bar' command line option.
> 
> Replace '-machine foo,accel=bar' -> '-machine foo -accel bar' in
> functional tests.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   tests/functional/test_ppc64_hv.py | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/functional/test_ppc64_hv.py b/tests/functional/test_ppc64_hv.py
> index 312248bbfe4..536a433b993 100755
> --- a/tests/functional/test_ppc64_hv.py
> +++ b/tests/functional/test_ppc64_hv.py
> @@ -138,7 +138,8 @@ def do_test_kvm(self, hpt=False):
>           else:
>               append = ''
>           exec_command(self, 'qemu-system-ppc64 -nographic -smp 2 -m 1g '
> -                           '-machine pseries,x-vof=on,accel=kvm '
> +                           '-accel kvm '
> +                           '-machine pseries,x-vof=on '
>                              '-machine cap-cfpc=broken,cap-sbbc=broken,'
>                                       'cap-ibs=broken,cap-ccf-assist=off '
>                              '-drive file=/dev/nvme0n1,format=raw,readonly=on '

Reviewed-by: Thomas Huth <thuth@redhat.com>
Thomas Huth Dec. 3, 2024, 10:25 a.m. UTC | #5
On 03/12/2024 10.21, Philippe Mathieu-Daudé wrote:
> Since commit 6f6e1698a68 ("vl: configure accelerators from -accel
> options") we prefer the '-accel bar' command line option.
> 
> Replace '-machine foo,accel=bar' -> '-machine foo -accel bar' in
> fuzzer scripts and tests.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   tests/qtest/fuzz/generic_fuzz.c                | 2 +-
>   tests/qtest/fuzz/i440fx_fuzz.c                 | 2 +-
>   tests/qtest/fuzz/qos_fuzz.c                    | 2 +-
>   scripts/oss-fuzz/output_reproducer.py          | 2 --
>   scripts/oss-fuzz/reorder_fuzzer_qtest_trace.py | 6 +++---
>   5 files changed, 6 insertions(+), 8 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>