[PATCH v2] Deprecate the "-no-acpi" command line switch

Thomas Huth posted 1 patch 1 year, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230224090543.1129677-1-thuth@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>
docs/about/deprecated.rst | 6 ++++++
softmmu/vl.c              | 1 +
2 files changed, 7 insertions(+)
[PATCH v2] Deprecate the "-no-acpi" command line switch
Posted by Thomas Huth 1 year, 2 months ago
Similar to "-no-hpet", the "-no-acpi" switch is a legacy command
line option that should be replaced with the "acpi" machine parameter
nowadays.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 v2: Fixed stypid copy-n-paste bug (Thanks to Sunil for spotting it!)

 docs/about/deprecated.rst | 6 ++++++
 softmmu/vl.c              | 1 +
 2 files changed, 7 insertions(+)

diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index ee95bcb1a6..15084f7bea 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -99,6 +99,12 @@ form is preferred.
 The HPET setting has been turned into a machine property.
 Use ``-machine hpet=off`` instead.
 
+``-no-acpi`` (since 8.0)
+''''''''''''''''''''''''
+
+The ``-no-acpi`` setting has been turned into a machine property.
+Use ``-machine acpi=off`` instead.
+
 ``-accel hax`` (since 8.0)
 ''''''''''''''''''''''''''
 
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 459588aa7d..a3c59b5462 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -3271,6 +3271,7 @@ void qemu_init(int argc, char **argv)
                 vnc_parse(optarg);
                 break;
             case QEMU_OPTION_no_acpi:
+                warn_report("-no-acpi is deprecated, use '-machine acpi=off' instead");
                 qdict_put_str(machine_opts_dict, "acpi", "off");
                 break;
             case QEMU_OPTION_no_hpet:
-- 
2.31.1
Re: [PATCH v2] Deprecate the "-no-acpi" command line switch
Posted by Igor Mammedov 1 year, 2 months ago
On Fri, 24 Feb 2023 10:05:43 +0100
Thomas Huth <thuth@redhat.com> wrote:

> Similar to "-no-hpet", the "-no-acpi" switch is a legacy command
> line option that should be replaced with the "acpi" machine parameter
> nowadays.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Reviewed-by: Igor Mammedov <imammedo@redhat.com>

> ---
>  v2: Fixed stypid copy-n-paste bug (Thanks to Sunil for spotting it!)
> 
>  docs/about/deprecated.rst | 6 ++++++
>  softmmu/vl.c              | 1 +
>  2 files changed, 7 insertions(+)
> 
> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
> index ee95bcb1a6..15084f7bea 100644
> --- a/docs/about/deprecated.rst
> +++ b/docs/about/deprecated.rst
> @@ -99,6 +99,12 @@ form is preferred.
>  The HPET setting has been turned into a machine property.
>  Use ``-machine hpet=off`` instead.
>  
> +``-no-acpi`` (since 8.0)
> +''''''''''''''''''''''''
> +
> +The ``-no-acpi`` setting has been turned into a machine property.
> +Use ``-machine acpi=off`` instead.
> +
>  ``-accel hax`` (since 8.0)
>  ''''''''''''''''''''''''''
>  
> diff --git a/softmmu/vl.c b/softmmu/vl.c
> index 459588aa7d..a3c59b5462 100644
> --- a/softmmu/vl.c
> +++ b/softmmu/vl.c
> @@ -3271,6 +3271,7 @@ void qemu_init(int argc, char **argv)
>                  vnc_parse(optarg);
>                  break;
>              case QEMU_OPTION_no_acpi:
> +                warn_report("-no-acpi is deprecated, use '-machine acpi=off' instead");
>                  qdict_put_str(machine_opts_dict, "acpi", "off");
>                  break;
>              case QEMU_OPTION_no_hpet:
Re: [PATCH v2] Deprecate the "-no-acpi" command line switch
Posted by Philippe Mathieu-Daudé 1 year, 2 months ago
On 24/2/23 10:05, Thomas Huth wrote:
> Similar to "-no-hpet", the "-no-acpi" switch is a legacy command
> line option that should be replaced with the "acpi" machine parameter
> nowadays.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   v2: Fixed stypid copy-n-paste bug (Thanks to Sunil for spotting it!)
> 
>   docs/about/deprecated.rst | 6 ++++++
>   softmmu/vl.c              | 1 +
>   2 files changed, 7 insertions(+)

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

Re: [PATCH v2] Deprecate the "-no-acpi" command line switch
Posted by Peter Krempa 1 year, 2 months ago
On Fri, Feb 24, 2023 at 10:05:43 +0100, Thomas Huth wrote:
> Similar to "-no-hpet", the "-no-acpi" switch is a legacy command
> line option that should be replaced with the "acpi" machine parameter
> nowadays.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  v2: Fixed stypid copy-n-paste bug (Thanks to Sunil for spotting it!)
> 
>  docs/about/deprecated.rst | 6 ++++++
>  softmmu/vl.c              | 1 +
>  2 files changed, 7 insertions(+)

For now libvirt is still using '-no-acpi' but it will be an easy fix.
I'll send patches on monday. On behalf of libvirt:

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Re: [PATCH v2] Deprecate the "-no-acpi" command line switch
Posted by Sunil V L 1 year, 2 months ago
On Fri, Feb 24, 2023 at 10:05:43AM +0100, Thomas Huth wrote:
> Similar to "-no-hpet", the "-no-acpi" switch is a legacy command
> line option that should be replaced with the "acpi" machine parameter
> nowadays.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  v2: Fixed stypid copy-n-paste bug (Thanks to Sunil for spotting it!)
> 
>  docs/about/deprecated.rst | 6 ++++++
>  softmmu/vl.c              | 1 +
>  2 files changed, 7 insertions(+)
> 
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>