Skip to contentSkip to conversation

Remove deprecated command line options

PATCH In review Thomas Huth 3 participants 7 messages Jan 18, 2024

lore
Share & tools
lore
#0 lore raw

v2 cover Remove deprecated command line options

The -no-hpet, -no-acpi, -async-teardown and -chroot options have been deprecated for at least two releases, so it should be fine if we remove them now.

v2:
- Rework some more occurances of -no-acpi in the second patch (Markus)
- Collected Reviewed-bys from v1
- Drop the -singlestep patch since this is handled by Philippe's series:
https://lore.kernel.org/qemu-devel/[email protected]/

Thomas Huth (4):
qemu-options: Remove the deprecated -no-hpet option
qemu-options: Remove the deprecated -no-acpi option
qemu-options: Remove the deprecated -async-teardown option
qemu-options: Remove the deprecated -chroot option

 docs/about/deprecated.rst       | 22 -------------------
 docs/about/removed-features.rst | 23 ++++++++++++++++++++
 docs/specs/tpm.rst              |  4 ++--
 hw/i386/pc.c                    |  4 ++--
 system/vl.c                     | 19 -----------------
 qemu-options.hx                 | 38 ---------------------------------
 6 files changed, 27 insertions(+), 83 deletions(-)
Signature · 1 line
2.43.0
#1 lore raw

PATCH v2 1/4 qemu-options: Remove the deprecated -no-hpet option

It's been marked as deprecated since QEMU 8.0, so it should be fine to remove this now.

---
 docs/about/deprecated.rst       | 6 ------
 docs/about/removed-features.rst | 8 ++++++++
 system/vl.c                     | 4 ----
 qemu-options.hx                 | 7 -------
 4 files changed, 8 insertions(+), 17 deletions(-)
docs/about/deprecated.rst +0 -6
index f48fc83d85..bf2150f00c 100644
@@ -63,12 +63,6 @@ as short-form boolean values, and passed to plugins as ``arg_name=on``.
 However, short-form booleans are deprecated and full explicit ``arg_name=on``
 form is preferred.
 
-``-no-hpet`` (since 8.0)
-''''''''''''''''''''''''
-
-The HPET setting has been turned into a machine property.
-Use ``-machine hpet=off`` instead.
-
 ``-no-acpi`` (since 8.0)
 ''''''''''''''''''''''''
 
docs/about/removed-features.rst +8 -0
index f04036987b..52d240ade9 100644
@@ -460,6 +460,14 @@ in this case.
 Note that the default audio backend must be configured on the command
 line if the ``-nodefaults`` options is used.
 
+``-no-hpet`` (removed in 9.0)
+'''''''''''''''''''''''''''''
+
+The HPET setting has been turned into a machine property.
+Use ``-machine hpet=off`` instead.
+
+
+
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
 
system/vl.c +0 -4
index 53850a1daf..f08c4c8193 100644
@@ -3373,10 +3373,6 @@ void qemu_init(int argc, char **argv)
                 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:
-                warn_report("-no-hpet is deprecated, use '-machine hpet=off' instead");
-                qdict_put_str(machine_opts_dict, "hpet", "off");
-                break;
             case QEMU_OPTION_no_reboot:
                 olist = qemu_find_opts("action");
                 qemu_opts_parse_noisily(olist, "reboot=shutdown", false);
qemu-options.hx +0 -7
index b66570ae00..57e447065a 100644
@@ -2654,13 +2654,6 @@ SRST
     machine only).
 ERST
 
-DEF("no-hpet", 0, QEMU_OPTION_no_hpet,
-    "-no-hpet        disable HPET\n", QEMU_ARCH_I386)
-SRST
-``-no-hpet``
-    Disable HPET support. Deprecated, use '-machine hpet=off' instead.
-ERST
-
 DEF("acpitable", HAS_ARG, QEMU_OPTION_acpitable,
     "-acpitable [sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n][,asl_compiler_id=str][,asl_compiler_rev=n][,{data|file}=file1[:file2]...]\n"
     "                ACPI table description\n", QEMU_ARCH_I386)
Signature · 1 line
2.43.0
#2 lore raw

PATCH v2 2/4 qemu-options: Remove the deprecated -no-acpi option

In reply to Thomas Huth

It's been marked as deprecated since QEMU 8.0, so it should be fine to remove this now.

---
 docs/about/deprecated.rst       | 6 ------
 docs/about/removed-features.rst | 5 +++++
 docs/specs/tpm.rst              | 4 ++--
 hw/i386/pc.c                    | 4 ++--
 system/vl.c                     | 4 ----
 qemu-options.hx                 | 9 ---------
 6 files changed, 9 insertions(+), 23 deletions(-)
docs/about/deprecated.rst +0 -6
index bf2150f00c..3f8e505df6 100644
@@ -63,12 +63,6 @@ as short-form boolean values, and passed to plugins as ``arg_name=on``.
 However, short-form booleans are deprecated and full explicit ``arg_name=on``
 form is preferred.
 
-``-no-acpi`` (since 8.0)
-''''''''''''''''''''''''
-
-The ``-no-acpi`` setting has been turned into a machine property.
-Use ``-machine acpi=off`` instead.
-
 ``-async-teardown`` (since 8.1)
 '''''''''''''''''''''''''''''''
 
docs/about/removed-features.rst +5 -0
index 52d240ade9..ae728b6130 100644
@@ -466,6 +466,11 @@ line if the ``-nodefaults`` options is used.
 The HPET setting has been turned into a machine property.
 Use ``-machine hpet=off`` instead.
 
+``-no-acpi`` (removed in 9.0)
+'''''''''''''''''''''''''''''
+
+The ``-no-acpi`` setting has been turned into a machine property.
+Use ``-machine acpi=off`` instead.
 
 
 QEMU Machine Protocol (QMP) commands
docs/specs/tpm.rst +2 -2
index c96776a369..68cb8cf7e6 100644
@@ -343,9 +343,9 @@ In case an Arm virt machine is emulated, use the following command line:
 
 .. code-block:: console
 
-  qemu-system-aarch64 -machine virt,gic-version=3,accel=kvm \
+  qemu-system-aarch64 -machine virt,gic-version=3,acpi=off \
     -cpu host -m 4G \
-    -nographic -no-acpi \
+    -nographic -accel kvm \
     -chardev socket,id=chrtpm,path=/tmp/mytpm1/swtpm-sock \
     -tpmdev emulator,id=tpm0,chardev=chrtpm \
     -device tpm-tis-device,tpmdev=tpm0 \
hw/i386/pc.c +2 -2
index 496498df3a..058d7fce9f 100644
@@ -1348,7 +1348,7 @@ static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
     Error *local_err = NULL;
 
     /*
-     * When -no-acpi is used with Q35 machine type, no ACPI is built,
+     * When "-M acpi=off" is used with Q35 machine type, no ACPI is built,
      * but pcms->acpi_dev is still created. Check !acpi_enabled in
      * addition to cover this case.
      */
@@ -1396,7 +1396,7 @@ static void pc_memory_unplug_request(HotplugHandler *hotplug_dev,
     X86MachineState *x86ms = X86_MACHINE(hotplug_dev);
 
     /*
-     * When -no-acpi is used with Q35 machine type, no ACPI is built,
+     * When "-M acpi=off" is used with Q35 machine type, no ACPI is built,
      * but pcms->acpi_dev is still created. Check !acpi_enabled in
      * addition to cover this case.
      */
system/vl.c +0 -4
index f08c4c8193..7e258889f3 100644
@@ -3369,10 +3369,6 @@ void qemu_init(int argc, char **argv)
                 display_remote++;
                 break;
 #endif
-            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_reboot:
                 olist = qemu_find_opts("action");
                 qemu_opts_parse_noisily(olist, "reboot=shutdown", false);
qemu-options.hx +0 -9
index 57e447065a..dafecf47d6 100644
@@ -2645,15 +2645,6 @@ SRST
     needed to boot from old floppy disks.
 ERST
 
-DEF("no-acpi", 0, QEMU_OPTION_no_acpi,
-           "-no-acpi        disable ACPI\n", QEMU_ARCH_I386 | QEMU_ARCH_ARM)
-SRST
-``-no-acpi``
-    Disable ACPI (Advanced Configuration and Power Interface) support.
-    Use it if your guest OS complains about ACPI problems (PC target
-    machine only).
-ERST
-
 DEF("acpitable", HAS_ARG, QEMU_OPTION_acpitable,
     "-acpitable [sig=str][,rev=n][,oem_id=str][,oem_table_id=str][,oem_rev=n][,asl_compiler_id=str][,asl_compiler_rev=n][,{data|file}=file1[:file2]...]\n"
     "                ACPI table description\n", QEMU_ARCH_I386)
Signature · 1 line
2.43.0
Reviewed-by on v2 2/4
#3 lore raw

Re: [PATCH v2 2/4] qemu-options: Remove the deprecated -no-acpi option

18.01.2024 13:37, Thomas Huth:
..

hw/i386/pc.c static void pc_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, · line 1352

Quoted 4 lines
      /*
hw/i386/pc.c +1 -1
-     * When -no-acpi is used with Q35 machine type, no ACPI is built,
+     * When "-M acpi=off" is used with Q35 machine type, no ACPI is built,
       * but pcms->acpi_dev is still created. Check !acpi_enabled in

FWIW, it's easier to use "When acpi=off is used with Q35 machine type.." instead, since acpi=off is a machine property and here we talk about machine, so the context is quite clear. Here and in the next similar commit. Just a nitpick, works either way for me.

/mjt

#5 lore raw

PATCH v2 3/4 qemu-options: Remove the deprecated -async-teardown option

In reply to Thomas Huth

It's been marked as deprecated since QEMU 8.1 (and was only available since QEMU 8.0 anyway), so it should be fine to remove this now.

---
 docs/about/deprecated.rst       |  5 -----
 docs/about/removed-features.rst |  5 +++++
 system/vl.c                     |  6 ------
 qemu-options.hx                 | 10 ----------
 4 files changed, 5 insertions(+), 21 deletions(-)
docs/about/deprecated.rst +0 -5
index 3f8e505df6..89ca4490d7 100644
@@ -63,11 +63,6 @@ as short-form boolean values, and passed to plugins as ``arg_name=on``.
 However, short-form booleans are deprecated and full explicit ``arg_name=on``
 form is preferred.
 
-``-async-teardown`` (since 8.1)
-'''''''''''''''''''''''''''''''
-
-Use ``-run-with async-teardown=on`` instead.
-
 ``-chroot`` (since 8.1)
 '''''''''''''''''''''''
 
docs/about/removed-features.rst +5 -0
index ae728b6130..43f64a26ba 100644
@@ -472,6 +472,11 @@ Use ``-machine hpet=off`` instead.
 The ``-no-acpi`` setting has been turned into a machine property.
 Use ``-machine acpi=off`` instead.
 
+``-async-teardown`` (removed in 9.0)
+''''''''''''''''''''''''''''''''''''
+
+Use ``-run-with async-teardown=on`` instead.
+
 
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
system/vl.c +0 -6
index 7e258889f3..924356f864 100644
@@ -3600,12 +3600,6 @@ void qemu_init(int argc, char **argv)
             case QEMU_OPTION_daemonize:
                 os_set_daemonize(true);
                 break;
-#if defined(CONFIG_LINUX)
-            /* deprecated */
-            case QEMU_OPTION_asyncteardown:
-                init_async_teardown();
-                break;
-#endif
             case QEMU_OPTION_run_with: {
                 const char *str;
                 opts = qemu_opts_parse_noisily(qemu_find_opts("run-with"),
qemu-options.hx +0 -10
index dafecf47d6..10c952ba3f 100644
@@ -4975,16 +4975,6 @@ HXCOMM Internal use
 DEF("qtest", HAS_ARG, QEMU_OPTION_qtest, "", QEMU_ARCH_ALL)
 DEF("qtest-log", HAS_ARG, QEMU_OPTION_qtest_log, "", QEMU_ARCH_ALL)
 
-#ifdef __linux__
-DEF("async-teardown", 0, QEMU_OPTION_asyncteardown,
-    "-async-teardown enable asynchronous teardown\n",
-    QEMU_ARCH_ALL)
-SRST
-``-async-teardown``
-    This option is deprecated and should no longer be used. The new option
-    ``-run-with async-teardown=on`` is a replacement.
-ERST
-#endif
 #ifdef CONFIG_POSIX
 DEF("run-with", HAS_ARG, QEMU_OPTION_run_with,
     "-run-with [async-teardown=on|off][,chroot=dir]\n"
Signature · 1 line
2.43.0
#6 lore raw

PATCH v2 4/4 qemu-options: Remove the deprecated -chroot option

In reply to Thomas Huth

It's been marked as deprecated since QEMU 8.1, so it should be fine to remove this now.

---
 docs/about/deprecated.rst       |  5 -----
 docs/about/removed-features.rst |  5 +++++
 system/vl.c                     |  5 -----
 qemu-options.hx                 | 12 ------------
 4 files changed, 5 insertions(+), 22 deletions(-)
docs/about/deprecated.rst +0 -5
index 89ca4490d7..004c6421fe 100644
@@ -63,11 +63,6 @@ as short-form boolean values, and passed to plugins as ``arg_name=on``.
 However, short-form booleans are deprecated and full explicit ``arg_name=on``
 form is preferred.
 
-``-chroot`` (since 8.1)
-'''''''''''''''''''''''
-
-Use ``-run-with chroot=dir`` instead.
-
 ``-singlestep`` (since 8.1)
 '''''''''''''''''''''''''''
 
docs/about/removed-features.rst +5 -0
index 43f64a26ba..a8546f4787 100644
@@ -477,6 +477,11 @@ Use ``-machine acpi=off`` instead.
 
 Use ``-run-with async-teardown=on`` instead.
 
+``-chroot`` (removed in 9.0)
+''''''''''''''''''''''''''''
+
+Use ``-run-with chroot=dir`` instead.
+
 
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
system/vl.c +0 -5
index 924356f864..c125fb9079 100644
@@ -3592,11 +3592,6 @@ void qemu_init(int argc, char **argv)
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_chroot:
-                warn_report("option is deprecated,"
-                            " use '-run-with chroot=...' instead");
-                os_set_chroot(optarg);
-                break;
             case QEMU_OPTION_daemonize:
                 os_set_daemonize(true);
                 break;
qemu-options.hx +0 -12
index 10c952ba3f..9be6beb5a0 100644
@@ -4790,18 +4790,6 @@ SRST
     ``-nodefaults`` option will disable all those default devices.
 ERST
 
-#ifndef _WIN32
-DEF("chroot", HAS_ARG, QEMU_OPTION_chroot, \
-    "-chroot dir     chroot to dir just before starting the VM (deprecated)\n",
-    QEMU_ARCH_ALL)
-#endif
-SRST
-``-chroot dir``
-    Deprecated, use '-run-with chroot=...' instead.
-    Immediately before starting guest execution, chroot to the specified
-    directory. Especially useful in combination with -runas.
-ERST
-
 #ifndef _WIN32
 DEF("runas", HAS_ARG, QEMU_OPTION_runas, \
     "-runas user     change to user id user just before starting the VM\n" \
Signature · 1 line
2.43.0