Skip to contentSkip to conversation

deprecations: remove many old deprecations

PATCH Superseded Daniel P. Berrangé 13 participants 48 messages Feb 24, 2021 – Mar 15, 2021 Block layer

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover deprecations: remove many old deprecations

The following features have been deprecated for well over the 2 release cycle we promise

``-usbdevice`` (since 2.10.0)
``-drive file=3Djson:{...{'driver':'file'}}`` (since 3.0) ``-vnc acl`` (since 4.0.0)
``-mon ...,control=3Dreadline,pretty=3Don|off`` (since 4.1) ``migrate_set_downtime`` and ``migrate_set_speed`` (since 2.8.0) ``query-named-block-nodes`` result ``encryption_key_missing`` (since 2.10.0) ``query-block`` result ``inserted.encryption_key_missing`` (since 2.10.0) ``migrate-set-cache-size`` and ``query-migrate-cache-size`` (since 2.11.0) ``query-named-block-nodes`` and ``query-block`` result dirty-bitmaps[i].sta=
tus (ince 4.0)
``query-cpus`` (since 2.12.0)
``query-cpus-fast`` ``arch`` output member (since 3.0.0) ``query-events`` (since 4.0)
chardev client socket with ``wait`` option (since 4.0) ``acl_show``, ``acl_reset``, ``acl_policy``, ``acl_add``, ``acl_remove`` (s=
ince 4.0.0)
``ide-drive`` (since 4.2)
``scsi-disk`` (since 4.2)

AFAICT, libvirt has ceased to use all of these too.

There are many more similarly old deprecations not (yet) tackled.

Daniel P. Berrang=C3=A9 (14):
ui, monitor: remove deprecated VNC ACL option and HMP commands
monitor: raise error when 'pretty' option is used with HMP
monitor: remove 'query-events' QMP command
softmmu: remove '-usbdevice' command line option
migrate: remove QMP/HMP commands for speed, downtime and cache size
machine: remove 'query-cpus' QMP command
machine: remove 'arch' field from 'query-cpus-fast' QMP command
chardev: reject use of 'wait' flag for socket client chardevs hw/ide: remove 'ide-drive' device
hw/scsi: remove 'scsi-disk' device
block: remove 'encryption_key_missing' flag from QAPI
block: remove dirty bitmaps 'status' field
block: remove 'dirty-bitmaps' field from 'BlockInfo' struct
block: remove support for using "file" driver with block/char devices

 block/dirty-bitmap.c                       |  38 ---
 block/file-posix.c                         |  17 +-
 block/qapi.c                               |   6 -
 chardev/char-socket.c                      |  12 +-
 docs/devel/migration.rst                   |   2 +-
 docs/qdev-device-use.txt                   |   2 +-
 docs/rdma.txt                              |   2 +-
 docs/system/deprecated.rst                 | 117 -------
 docs/system/removed-features.rst           | 123 +++++++
 docs/xbzrle.txt                            |   5 -
 hmp-commands-info.hx                       |  13 -
 hmp-commands.hx                            | 121 -------
 hw/core/machine-hmp-cmds.c                 |   8 +-
 hw/core/machine-qmp-cmds.c                 | 120 -------
 hw/i386/pc.c                               |   2 -
 hw/ide/qdev.c                              |  38 ---
 hw/ppc/mac_newworld.c                      |  13 -
 hw/ppc/mac_oldworld.c                      |  13 -
 hw/scsi/scsi-disk.c                        |  62 ----
 hw/sparc64/sun4u.c                         |  15 -
 include/block/dirty-bitmap.h               |   1 -
 include/monitor/hmp.h                      |   4 -
 migration/migration.c                      |  45 ---
 migration/ram.c                            |   2 +-
 monitor/hmp-cmds.c                         |  34 --
 monitor/misc.c                             | 187 ----------
 monitor/monitor.c                          |   4 +-
 monitor/qmp-cmds-control.c                 |  24 --
 qapi/block-core.json                       |  64 +---
 qapi/control.json                          |  45 ---
 qapi/machine.json                          | 181 +---------
 qapi/migration.json                        |  98 ------
 qemu-options.hx                            |   5 +-
 scripts/device-crash-test                  |   2 -
 softmmu/vl.c                               |  43 ---
 tests/acceptance/pc_cpu_hotplug_props.py   |   2 +-
 tests/acceptance/x86_cpu_model_versions.py |   2 +-
 tests/migration/guestperf/engine.py        |  18 +-
 tests/qemu-iotests/051                     |   4 -
 tests/qemu-iotests/051.pc.out              |  20 --
 tests/qemu-iotests/124                     |   4 -
 tests/qemu-iotests/181                     |   2 +-
 tests/qemu-iotests/184.out                 |   6 +-
 tests/qemu-iotests/191.out                 |  48 +--
 tests/qemu-iotests/194                     |   4 +-
 tests/qemu-iotests/194.out                 |   4 +-
 tests/qemu-iotests/226.out                 |  10 +-
 tests/qemu-iotests/236                     |   2 +-
 tests/qemu-iotests/236.out                 |  42 +--
 tests/qemu-iotests/246                     |   3 +-
 tests/qemu-iotests/246.out                 |  66 ++--
 tests/qemu-iotests/254                     |   2 +-
 tests/qemu-iotests/254.out                 |   9 +-
 tests/qemu-iotests/257.out                 | 378 +++++++--------------
 tests/qemu-iotests/260                     |   5 +-
 tests/qemu-iotests/273.out                 |  15 +-
 tests/qtest/migration-test.c               |  48 ---
 tests/qtest/numa-test.c                    |   6 +-
 tests/qtest/qmp-test.c                     |   6 +-
 tests/qtest/test-hmp.c                     |   6 +-
 tests/qtest/test-x86-cpuid-compat.c        |   4 +-
 tests/qtest/vhost-user-test.c              |   8 +-
 ui/vnc.c                                   |  38 ---
 63 files changed, 380 insertions(+), 1850 deletions(-)

--=20
2.29.2

#1 lore raw

PATCH 1/14 ui, monitor: remove deprecated VNC ACL option and HMP commands

The VNC ACL concept has been replaced by the pluggable "authz" framework which does not use monitor commands.

---
 docs/system/deprecated.rst       |  16 ---
 docs/system/removed-features.rst |  13 +++
 hmp-commands.hx                  |  76 -------------
 monitor/misc.c                   | 187 -------------------------------
 ui/vnc.c                         |  38 -------
 5 files changed, 13 insertions(+), 317 deletions(-)
docs/system/deprecated.rst +0 -16
index 2fcac7861e..786b997fe7 100644
@@ -37,12 +37,6 @@ The 'file' driver for drives is no longer appropriate for character or host
 devices and will only accept regular files (S_IFREG). The correct driver
 for these file types is 'host_cdrom' or 'host_device' as appropriate.
 
-``-vnc acl`` (since 4.0.0)
-''''''''''''''''''''''''''
-
-The ``acl`` option to the ``-vnc`` argument has been replaced
-by the ``tls-authz`` and ``sasl-authz`` options.
-
 ``QEMU_AUDIO_`` environment variables and ``-audio-help`` (since 4.0)
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
@@ -254,16 +248,6 @@ Use the more generic commands ``block-export-add`` and ``block-export-del``
 instead.  As part of this deprecation, where ``nbd-server-add`` used a
 single ``bitmap``, the new ``block-export-add`` uses a list of ``bitmaps``.
 
-Human Monitor Protocol (HMP) commands
--------------------------------------
-
-``acl_show``, ``acl_reset``, ``acl_policy``, ``acl_add``, ``acl_remove`` (since 4.0.0)
-''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-The ``acl_show``, ``acl_reset``, ``acl_policy``, ``acl_add``, and
-``acl_remove`` commands are deprecated with no replacement. Authorization
-for VNC should be performed using the pluggable QAuthZ objects.
-
 System emulator CPUS
 --------------------
 
docs/system/removed-features.rst +13 -0
index c8481cafbd..0424b9a89d 100644
@@ -38,6 +38,12 @@ or ``-display default,show-cursor=on`` instead.
 QEMU 5.0 introduced an alternative syntax to specify the size of the translation
 block cache, ``-accel tcg,tb-size=``.
 
+``-vnc acl`` (removed in 6.0)
+'''''''''''''''''''''''''''''
+
+The ``acl`` option to the ``-vnc`` argument has been replaced
+by the ``tls-authz`` and ``sasl-authz`` options.
+
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
 
@@ -79,6 +85,13 @@ documentation of ``query-hotpluggable-cpus`` for additional details.
 No replacement.  The ``change vnc password`` and ``change DEVICE MEDIUM``
 commands are not affected.
 
+``acl_show``, ``acl_reset``, ``acl_policy``, ``acl_add``, ``acl_remove`` (removed in 6.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+The ``acl_show``, ``acl_reset``, ``acl_policy``, ``acl_add``, and
+``acl_remove`` commands were removed with no replacement. Authorization
+for VNC should be performed using the pluggable QAuthZ objects.
+
 Guest Emulator ISAs
 -------------------
 
hmp-commands.hx +0 -76

82 lines not on this page · raw message

monitor/misc.c +0 -187

193 lines not on this page · raw message

ui/vnc.c +0 -38
index 16bb3be770..edb100dfbc 100644
@@ -3481,9 +3481,6 @@ static QemuOptsList qemu_vnc_opts = {
         },{
             .name = "sasl",
             .type = QEMU_OPT_BOOL,
-        },{
-            .name = "acl",
-            .type = QEMU_OPT_BOOL,
         },{
             .name = "tls-authz",
             .type = QEMU_OPT_STRING,
@@ -3935,7 +3932,6 @@ void vnc_display_open(const char *id, Error **errp)
     bool reverse = false;
     const char *credid;
     bool sasl = false;
-    int acl = 0;
     const char *tlsauthz;
     const char *saslauthz;
     int lock_key_sync = 1;
@@ -4010,29 +4006,13 @@ void vnc_display_open(const char *id, Error **errp)
             goto fail;
         }
     }
-    if (qemu_opt_get(opts, "acl")) {
-        error_report("The 'acl' option to -vnc is deprecated. "
-                     "Please use the 'tls-authz' and 'sasl-authz' "
-                     "options instead");
-    }
-    acl = qemu_opt_get_bool(opts, "acl", false);
     tlsauthz = qemu_opt_get(opts, "tls-authz");
-    if (acl && tlsauthz) {
-        error_setg(errp, "'acl' option is mutually exclusive with the "
-                   "'tls-authz' option");
-        goto fail;
-    }
     if (tlsauthz && !vd->tlscreds) {
         error_setg(errp, "'tls-authz' provided but TLS is not enabled");
         goto fail;
     }
 
     saslauthz = qemu_opt_get(opts, "sasl-authz");
-    if (acl && saslauthz) {
-        error_setg(errp, "'acl' option is mutually exclusive with the "
-                   "'sasl-authz' option");
-        goto fail;
-    }
     if (saslauthz && !sasl) {
         error_setg(errp, "'sasl-authz' provided but SASL auth is not enabled");
         goto fail;
@@ -4070,29 +4050,11 @@ void vnc_display_open(const char *id, Error **errp)
 
     if (tlsauthz) {
         vd->tlsauthzid = g_strdup(tlsauthz);
-    } else if (acl) {
-        if (strcmp(vd->id, "default") == 0) {
-            vd->tlsauthzid = g_strdup("vnc.x509dname");
-        } else {
-            vd->tlsauthzid = g_strdup_printf("vnc.%s.x509dname", vd->id);
-        }
-        vd->tlsauthz = QAUTHZ(qauthz_list_new(vd->tlsauthzid,
-                                              QAUTHZ_LIST_POLICY_DENY,
-                                              &error_abort));
     }
 #ifdef CONFIG_VNC_SASL
     if (sasl) {
         if (saslauthz) {
             vd->sasl.authzid = g_strdup(saslauthz);
-        } else if (acl) {
-            if (strcmp(vd->id, "default") == 0) {
-                vd->sasl.authzid = g_strdup("vnc.username");
-            } else {
-                vd->sasl.authzid = g_strdup_printf("vnc.%s.username", vd->id);
-            }
-            vd->sasl.authz = QAUTHZ(qauthz_list_new(vd->sasl.authzid,
-                                                    QAUTHZ_LIST_POLICY_DENY,
-                                                    &error_abort));
         }
     }
 #endif
Signature · 1 line
2.29.2
Reviewed-by on v1 1/14
#2 lore raw

Re: [PATCH 01/14] ui, monitor: remove deprecated VNC ACL option and HMP commands

Quoted 5 lines · Daniel P. Berrangé

The VNC ACL concept has been replaced by the pluggable "authz" framework which does not use monitor commands.

Quoted 7 lines
---
  docs/system/deprecated.rst       |  16 ---
  docs/system/removed-features.rst |  13 +++
  hmp-commands.hx                  |  76 -------------
  monitor/misc.c                   | 187 -------------------------------
  ui/vnc.c                         |  38 -------
  5 files changed, 13 insertions(+), 317 deletions(-)

If I run:

grep -r vnc.*acl *

I also see some lines in tests/check-block-qdict.c ... are they related and should be removed, too?

Apart from that, patch looks fine to me:

#3 lore raw

Re: [PATCH 01/14] ui, monitor: remove deprecated VNC ACL option and HMP commands

Quoted 14 lines · Thomas Huth
Quoted 5 lines · Daniel P. Berrangé

The VNC ACL concept has been replaced by the pluggable "authz" framework which does not use monitor commands.

Quoted 7 lines
---
  docs/system/deprecated.rst       |  16 ---
  docs/system/removed-features.rst |  13 +++
  hmp-commands.hx                  |  76 -------------
  monitor/misc.c                   | 187 -------------------------------
  ui/vnc.c                         |  38 -------
  5 files changed, 13 insertions(+), 317 deletions(-)
Quoted 6 lines

If I run:

grep -r vnc.*acl *

I also see some lines in tests/check-block-qdict.c ... are they related and should be removed, too?

Yes & no. This test is using the vnc ACL syntax as example input for validating the qdict parsing, but isn't functionally connected to the actual VNC ACL impl.

Quoted 2 lines

Apart from that, patch looks fine to me:

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#4 lore raw

PATCH 2/14 monitor: raise error when 'pretty' option is used with HMP

In reply to Daniel P. Berrangé

This is only semantically useful for QMP.

---
 docs/system/deprecated.rst       | 7 -------
 docs/system/removed-features.rst | 6 ++++++
 monitor/monitor.c                | 4 ++--
 qemu-options.hx                  | 5 +++--
 4 files changed, 11 insertions(+), 11 deletions(-)
docs/system/deprecated.rst +0 -7
index 786b997fe7..dfd8a8c497 100644
@@ -62,13 +62,6 @@ needs two devices (``-device intel-hda -device hda-duplex``) and
 ``pcspk`` which can be activated using ``-machine
 pcspk-audiodev=<name>``.
 
-``-mon ...,control=readline,pretty=on|off`` (since 4.1)
-'''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-The ``pretty=on|off`` switch has no effect for HMP monitors, but is
-silently ignored. Using the switch with HMP monitors will become an
-error in the future.
-
 RISC-V ``-bios`` (since 5.1)
 ''''''''''''''''''''''''''''
 
docs/system/removed-features.rst +6 -0
index 0424b9a89d..3ca13d2844 100644
@@ -44,6 +44,12 @@ block cache, ``-accel tcg,tb-size=``.
 The ``acl`` option to the ``-vnc`` argument has been replaced
 by the ``tls-authz`` and ``sasl-authz`` options.
 
+``-mon ...,control=readline,pretty=on|off`` (removed in 6.0)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+The ``pretty=on|off`` switch has no effect for HMP monitors and
+its use is rejected.
+
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
 
monitor/monitor.c +2 -2
index e94f532cf5..515efb015e 100644
@@ -720,8 +720,8 @@ int monitor_init(MonitorOptions *opts, bool allow_hmp, Error **errp)
             return -1;
         }
         if (opts->pretty) {
-            warn_report("'pretty' is deprecated for HMP monitors, it has no "
-                        "effect and will be removed in future versions");
+            error_setg(errp, "'pretty' is not compatible with HMP monitors");
+            return -1;
         }
         monitor_init_hmp(chr, true, &local_err);
         break;
qemu-options.hx +3 -2
index 6c34c7050f..a934d5c787 100644
@@ -3702,8 +3702,9 @@ DEF("mon", HAS_ARG, QEMU_OPTION_mon, \
     "-mon [chardev=]name[,mode=readline|control][,pretty[=on|off]]\n", QEMU_ARCH_ALL)
 SRST
 ``-mon [chardev=]name[,mode=readline|control][,pretty[=on|off]]``
-    Setup monitor on chardev name. ``pretty`` turns on JSON pretty
-    printing easing human reading and debugging.
+    Setup monitor on chardev name. ``pretty`` is only valid when
+    ``mode=control``, turning on JSON pretty printing to ease
+    human reading and debugging.
 ERST
 
 DEF("debugcon", HAS_ARG, QEMU_OPTION_debugcon, \
Signature · 1 line
2.29.2
Reviewed-by on v1 2/14
#5 lore raw

Re: [PATCH 02/14] monitor: raise error when 'pretty' option is used with HMP

Quoted 3 lines · * Daniel P. Berrangé ([email protected]) wrote:

This is only semantically useful for QMP.

Quoted 76 lines
---
 docs/system/deprecated.rst       | 7 -------
 docs/system/removed-features.rst | 6 ++++++
 monitor/monitor.c                | 4 ++--
 qemu-options.hx                  | 5 +++--
 4 files changed, 11 insertions(+), 11 deletions(-)
docs/system/deprecated.rst +0 -7
index 786b997fe7..dfd8a8c497 100644
@@ -62,13 +62,6 @@ needs two devices (``-device intel-hda -device hda-duplex``) and
 ``pcspk`` which can be activated using ``-machine
 pcspk-audiodev=<name>``.
 
-``-mon ...,control=readline,pretty=on|off`` (since 4.1)
-'''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-The ``pretty=on|off`` switch has no effect for HMP monitors, but is
-silently ignored. Using the switch with HMP monitors will become an
-error in the future.
-
 RISC-V ``-bios`` (since 5.1)
 ''''''''''''''''''''''''''''
 
docs/system/removed-features.rst +6 -0
index 0424b9a89d..3ca13d2844 100644
@@ -44,6 +44,12 @@ block cache, ``-accel tcg,tb-size=``.
 The ``acl`` option to the ``-vnc`` argument has been replaced
 by the ``tls-authz`` and ``sasl-authz`` options.
 
+``-mon ...,control=readline,pretty=on|off`` (removed in 6.0)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+The ``pretty=on|off`` switch has no effect for HMP monitors and
+its use is rejected.
+
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
 
monitor/monitor.c +2 -2
index e94f532cf5..515efb015e 100644
@@ -720,8 +720,8 @@ int monitor_init(MonitorOptions *opts, bool allow_hmp, Error **errp)
             return -1;
         }
         if (opts->pretty) {
-            warn_report("'pretty' is deprecated for HMP monitors, it has no "
-                        "effect and will be removed in future versions");
+            error_setg(errp, "'pretty' is not compatible with HMP monitors");
+            return -1;
         }
         monitor_init_hmp(chr, true, &local_err);
         break;
qemu-options.hx +3 -2
index 6c34c7050f..a934d5c787 100644
@@ -3702,8 +3702,9 @@ DEF("mon", HAS_ARG, QEMU_OPTION_mon, \
     "-mon [chardev=]name[,mode=readline|control][,pretty[=on|off]]\n", QEMU_ARCH_ALL)
 SRST
 ``-mon [chardev=]name[,mode=readline|control][,pretty[=on|off]]``
-    Setup monitor on chardev name. ``pretty`` turns on JSON pretty
-    printing easing human reading and debugging.
+    Setup monitor on chardev name. ``pretty`` is only valid when
+    ``mode=control``, turning on JSON pretty printing to ease
+    human reading and debugging.
 ERST
 
 DEF("debugcon", HAS_ARG, QEMU_OPTION_debugcon, \
Signature · 1 line
2.29.2
Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK
#6 lore raw

PATCH 3/14 monitor: remove 'query-events' QMP command

In reply to Daniel P. Berrangé

The code comment suggests removing QAPIEvent_(str|lookup) symbols too, however, these are both auto-generated as standard for any enum in QAPI. As such it they'll exist whether we use them or not.

---
 docs/system/deprecated.rst       |  6 -----
 docs/system/removed-features.rst |  6 +++++
 monitor/qmp-cmds-control.c       | 24 -----------------
 qapi/control.json                | 45 --------------------------------
 4 files changed, 6 insertions(+), 75 deletions(-)
docs/system/deprecated.rst +0 -6
index dfd8a8c497..611adf60f7 100644
@@ -222,12 +222,6 @@ The ``query-cpus`` command is replaced by the ``query-cpus-fast`` command.
 The ``arch`` output member of the ``query-cpus-fast`` command is
 replaced by the ``target`` output member.
 
-``query-events`` (since 4.0)
-''''''''''''''''''''''''''''
-
-The ``query-events`` command has been superseded by the more powerful
-and accurate ``query-qmp-schema`` command.
-
 chardev client socket with ``wait`` option (since 4.0)
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
docs/system/removed-features.rst +6 -0
index 3ca13d2844..dc63581fe5 100644
@@ -70,6 +70,12 @@ documentation of ``query-hotpluggable-cpus`` for additional details.
 
 Use ``blockdev-change-medium`` or ``change-vnc-password`` instead.
 
+``query-events`` (removed in 6.0)
+'''''''''''''''''''''''''''''''''
+
+The ``query-events`` command has been superseded by the more powerful
+and accurate ``query-qmp-schema`` command.
+
 Human Monitor Protocol (HMP) commands
 -------------------------------------
 
monitor/qmp-cmds-control.c +0 -24
index 509ae870bd..513b547233 100644
@@ -130,30 +130,6 @@ CommandInfoList *qmp_query_commands(Error **errp)
     return list;
 }
 
-EventInfoList *qmp_query_events(Error **errp)
-{
-    /*
-     * TODO This deprecated command is the only user of
-     * QAPIEvent_str() and QAPIEvent_lookup[].  When the command goes,
-     * they should go, too.
-     */
-    EventInfoList *ev_list = NULL;
-    QAPIEvent e;
-
-    for (e = 0 ; e < QAPI_EVENT__MAX ; e++) {
-        const char *event_name = QAPIEvent_str(e);
-        EventInfo *info;
-
-        assert(event_name != NULL);
-        info = g_malloc0(sizeof(*info));
-        info->name = g_strdup(event_name);
-
-        QAPI_LIST_PREPEND(ev_list, info);
-    }
-
-    return ev_list;
-}
-
 /*
  * Minor hack: generated marshalling suppressed for this command
  * ('gen': false in the schema) so we can parse the JSON string
qapi/control.json +0 -45

51 lines not on this page · raw message

Signature · 1 line
2.29.2
Reviewed-by on v1 3/14
#7 lore raw

Re: [PATCH 03/14] monitor: remove 'query-events' QMP command

Quoted 11 lines · Daniel P. Berrangé

The code comment suggests removing QAPIEvent_(str|lookup) symbols too, however, these are both auto-generated as standard for any enum in QAPI. As such it they'll exist whether we use them or not.

---
  docs/system/deprecated.rst       |  6 -----
  docs/system/removed-features.rst |  6 +++++
  monitor/qmp-cmds-control.c       | 24 -----------------
  qapi/control.json                | 45 --------------------------------
  4 files changed, 6 insertions(+), 75 deletions(-)
#8 lore raw

PATCH 4/14 softmmu: remove '-usbdevice' command line option

In reply to Daniel P. Berrangé

This was replaced by the '-device usb-DEV' option.

---
 docs/system/deprecated.rst       |  9 -------
 docs/system/removed-features.rst |  9 +++++++
 softmmu/vl.c                     | 42 --------------------------------
 3 files changed, 9 insertions(+), 51 deletions(-)
docs/system/deprecated.rst +0 -9
index 611adf60f7..c577cc97c4 100644
@@ -21,15 +21,6 @@ deprecated.
 System emulator command line arguments
 --------------------------------------
 
-``-usbdevice`` (since 2.10.0)
-'''''''''''''''''''''''''''''
-
-The ``-usbdevice DEV`` argument is now a synonym for setting
-the ``-device usb-DEV`` argument instead. The deprecated syntax
-would automatically enable USB support on the machine type.
-If using the new syntax, USB support must be explicitly
-enabled via the ``-machine usb=on`` argument.
-
 ``-drive file=json:{...{'driver':'file'}}`` (since 3.0)
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
docs/system/removed-features.rst +9 -0
index dc63581fe5..74d022babf 100644
@@ -50,6 +50,15 @@ by the ``tls-authz`` and ``sasl-authz`` options.
 The ``pretty=on|off`` switch has no effect for HMP monitors and
 its use is rejected.
 
+``-usbdevice`` (removed in 6.0)
+'''''''''''''''''''''''''''''''
+
+The ``-usbdevice DEV`` argument was now a synonym for setting
+the ``-device usb-DEV`` argument instead. The removed syntax
+would automatically enable USB support on the machine type.
+When using the new syntax, USB support must be explicitly
+enabled via the ``-machine usb=on`` argument.
+
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
 
softmmu/vl.c +0 -42

66 lines not on this page · raw message

Signature · 1 line
2.29.2
#9 lore raw

Re: [PATCH 04/14] softmmu: remove '-usbdevice' command line option

Quoted 3 lines · Daniel P. Berrangé

This was replaced by the '-device usb-DEV' option.

This is probably used in many tutorial as "-usbdevice tablet" (for example https://wiki.gentoo.org/wiki/QEMU/Options).

Paolo

Quoted 121 lines
---
  docs/system/deprecated.rst       |  9 -------
  docs/system/removed-features.rst |  9 +++++++
  softmmu/vl.c                     | 42 --------------------------------
  3 files changed, 9 insertions(+), 51 deletions(-)
docs/system/deprecated.rst +0 -9
index 611adf60f7..c577cc97c4 100644
@@ -21,15 +21,6 @@ deprecated.
  System emulator command line arguments
  --------------------------------------
 
-``-usbdevice`` (since 2.10.0)
-'''''''''''''''''''''''''''''
-
-The ``-usbdevice DEV`` argument is now a synonym for setting
-the ``-device usb-DEV`` argument instead. The deprecated syntax
-would automatically enable USB support on the machine type.
-If using the new syntax, USB support must be explicitly
-enabled via the ``-machine usb=on`` argument.
-
  ``-drive file=json:{...{'driver':'file'}}`` (since 3.0)
  '''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
docs/system/removed-features.rst +9 -0
index dc63581fe5..74d022babf 100644
@@ -50,6 +50,15 @@ by the ``tls-authz`` and ``sasl-authz`` options.
  The ``pretty=on|off`` switch has no effect for HMP monitors and
  its use is rejected.
 
+``-usbdevice`` (removed in 6.0)
+'''''''''''''''''''''''''''''''
+
+The ``-usbdevice DEV`` argument was now a synonym for setting
+the ``-device usb-DEV`` argument instead. The removed syntax
+would automatically enable USB support on the machine type.
+When using the new syntax, USB support must be explicitly
+enabled via the ``-machine usb=on`` argument.
+
  QEMU Machine Protocol (QMP) commands
  ------------------------------------
 
softmmu/vl.c +0 -42
index b219ce1f35..c31061cc09 100644
@@ -743,34 +743,6 @@ static void configure_msg(QemuOpts *opts)
  }
 
 
-/***********************************************************/
-/* USB devices */
-
-static int usb_device_add(const char *devname)
-{
-    USBDevice *dev = NULL;
-
-    if (!machine_usb(current_machine)) {
-        return -1;
-    }
-
-    dev = usbdevice_create(devname);
-    if (!dev)
-        return -1;
-
-    return 0;
-}
-
-static int usb_parse(const char *cmdline)
-{
-    int r;
-    r = usb_device_add(cmdline);
-    if (r < 0) {
-        error_report("could not add USB device '%s'", cmdline);
-    }
-    return r;
-}
-
  /***********************************************************/
  /* machine registration */
 
@@ -1267,7 +1239,6 @@ static void monitor_parse(const char *optarg, const char *mode, bool pretty)
 
  struct device_config {
      enum {
-        DEV_USB,       /* -usbdevice     */
          DEV_SERIAL,    /* -serial        */
          DEV_PARALLEL,  /* -parallel      */
          DEV_DEBUGCON,  /* -debugcon */
@@ -2484,12 +2455,6 @@ static void qemu_create_cli_devices(void)
      qemu_opts_foreach(qemu_find_opts("fw_cfg"),
                        parse_fw_cfg, fw_cfg_find(), &error_fatal);
 
-    /* init USB devices */
-    if (machine_usb(current_machine)) {
-        if (foreach_device_config(DEV_USB, usb_parse) < 0)
-            exit(1);
-    }
-
      /* init generic devices */
      rom_set_order_override(FW_CFG_ORDER_OVERRIDE_DEVICE);
      qemu_opts_foreach(qemu_find_opts("device"),
@@ -3182,13 +3147,6 @@ void qemu_init(int argc, char **argv, char **envp)
                  olist = qemu_find_opts("machine");
                  qemu_opts_parse_noisily(olist, "usb=on", false);
                  break;
-            case QEMU_OPTION_usbdevice:
-                error_report("'-usbdevice' is deprecated, please use "
-                             "'-device usb-...' instead");
-                olist = qemu_find_opts("machine");
-                qemu_opts_parse_noisily(olist, "usb=on", false);
-                add_device_config(DEV_USB, optarg);
-                break;
              case QEMU_OPTION_device:
                  if (!qemu_opts_parse_noisily(qemu_find_opts("device"),
                                               optarg, true)) {
author Reviewed-by Paolo Bonzini
#10 lore raw

Re: [PATCH 04/14] softmmu: remove '-usbdevice' command line option

Quoted 7 lines · Paolo Bonzini
Quoted 3 lines · Daniel P. Berrangé

This was replaced by the '-device usb-DEV' option.

This is probably used in many tutorial as "-usbdevice tablet" (for example
https://wiki.gentoo.org/wiki/QEMU/Options).

It has been deprecated, printing a warning message, for almost 4 years now, and had your ack originally :-)

commit a358a3af4558a24398a541951cad7a6c458df72b
Author: Thomas Huth <[email protected]>
Date: Fri May 19 08:35:16 2017 +0200

usb: Deprecate the legacy -usbdevice option

The '-usbdevice' option is considered as deprecated nowadays and we might want to remove these options in a future version of QEMU. So mark this options as deprecated in the documenation and print out a warning if it is used to tell the user what to use instead. While we're at it, improve also some other minor USB-related spots in qemu-options.hx that were not up to date anymore.

Message-id: [email protected]

There's some tradeoff to be had. The 3rd party docs will be unlikely to be updated to the new syntax as long as the old syntax still works. So we get ourselves into a chicken & egg scenario.

Overall the -usbdevice doesn't add significant syntax sugar benefits over -device, as compared benefits of other syntax sugar args we have.

Quoted 5 lines
Quoted 5 lines
---
  docs/system/deprecated.rst       |  9 -------
  docs/system/removed-features.rst |  9 +++++++
  softmmu/vl.c                     | 42 --------------------------------
  3 files changed, 9 insertions(+), 51 deletions(-)

It seems this is incomplete though, I missed qemu-options.hx, docs/qdev-device-use.txt and hw/usb/bus.c updates to remove associated cruft.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#11 lore raw

Re: [PATCH 04/14] softmmu: remove '-usbdevice' command line option

In reply to Daniel P. Berrangé
Quoted 8 lines · Daniel P. Berrangé

This was replaced by the '-device usb-DEV' option.

---
  docs/system/deprecated.rst       |  9 -------
  docs/system/removed-features.rst |  9 +++++++
  softmmu/vl.c                     | 42 --------------------------------
  3 files changed, 9 insertions(+), 51 deletions(-)

Last time I tried to remove -usbdevice, there was some concerns that -usbdevice braille might still be useful for some people, see the thread that started here:

https://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg00651.html

(and Gerd's summary here: https://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg01520.html )

So we might need a new "sugared" option like "-braille" instead before we can fully remove -usbdevice? ... or we just keep -usbdevice as a bittersweet remainder?

Thomas

#12 lore raw

Re: [PATCH 04/14] softmmu: remove '-usbdevice' command line option

Quoted 10 lines · Thomas Huth
Quoted 8 lines · Daniel P. Berrangé

This was replaced by the '-device usb-DEV' option.

---
  docs/system/deprecated.rst       |  9 -------
  docs/system/removed-features.rst |  9 +++++++
  softmmu/vl.c                     | 42 --------------------------------
  3 files changed, 9 insertions(+), 51 deletions(-)
Quoted 8 lines

Last time I tried to remove -usbdevice, there was some concerns that -usbdevice braille might still be useful for some people, see the thread that started here:

https://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg00651.html

(and Gerd's summary here:
https://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg01520.html )

Urgh, so the current deprecation docs are a bit misleading by saying -usbdevice is directly mapped to -device.

Quoted 3 lines

So we might need a new "sugared" option like "-braille" instead before we can fully remove -usbdevice? ... or we just keep -usbdevice as a bittersweet remainder?

I'm not going to implement new CLI options, and if that's needed, we ought to re-start the clock on the deprecation at that point. So this points towards just removing the deprecation warning that exists today. Or alternatively drop support for -usbdevice, except for the braille type.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#13 lore raw

Re: [PATCH 04/14] softmmu: remove '-usbdevice' command line option

Quoted 27 lines · Daniel P. Berrangé
Quoted 10 lines · Thomas Huth
Quoted 8 lines · Daniel P. Berrangé

This was replaced by the '-device usb-DEV' option.

---
   docs/system/deprecated.rst       |  9 -------
   docs/system/removed-features.rst |  9 +++++++
   softmmu/vl.c                     | 42 --------------------------------
   3 files changed, 9 insertions(+), 51 deletions(-)
Quoted 8 lines

Last time I tried to remove -usbdevice, there was some concerns that -usbdevice braille might still be useful for some people, see the thread that started here:

https://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg00651.html

(and Gerd's summary here:
https://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg01520.html )

Urgh, so the current deprecation docs are a bit misleading by saying -usbdevice is directly mapped to -device.

Quoted 3 lines

So we might need a new "sugared" option like "-braille" instead before we can fully remove -usbdevice? ... or we just keep -usbdevice as a bittersweet remainder?

Quoted 5 lines

I'm not going to implement new CLI options, and if that's needed, we ought to re-start the clock on the deprecation at that point. So this points towards just removing the deprecation warning that exists today. Or alternatively drop support for -usbdevice, except for the braille type.

After that discussion in 2018, I've removed all of the "annoying" -usbdevice parameters already (see commit 99761176eeaf8525). I then more or less waited for someone to step up and implement "-braille", but it never happened and I forgot about the removal of the remaining -usbdevice parameters. Thinking about this again, replacing "-usbdevice braille" with a "-braille usb" does indeed not buy us much, so I think the best is maybe to keep the simple devices and braille around, update our documentation and remove the deprecation warning instead.

Thomas

#14 lore raw

PATCH 5/14 migrate: remove QMP/HMP commands for speed, downtime and cache size

In reply to Daniel P. Berrangé

The generic 'migrate_set_parameters' command handle all types of param.

Only the QMP commands were documented in the deprecations page, but the rationale for deprecating applies equally to HMP, and the replacements exist. Furthermore the HMP commands are just shims to the QMP commands, so removing the latter breaks the former unless they get re-implemented.

---
 docs/devel/migration.rst            |  2 +-
 docs/rdma.txt                       |  2 +-
 docs/system/deprecated.rst          | 10 ---
 docs/system/removed-features.rst    | 20 ++++++
 docs/xbzrle.txt                     |  5 --
 hmp-commands-info.hx                | 13 ----
 hmp-commands.hx                     | 45 -------------
 include/monitor/hmp.h               |  4 --
 migration/migration.c               | 45 -------------
 migration/ram.c                     |  2 +-
 monitor/hmp-cmds.c                  | 34 ----------
 qapi/migration.json                 | 98 -----------------------------
 tests/migration/guestperf/engine.py | 16 ++---
 tests/qemu-iotests/181              |  2 +-
 tests/qtest/migration-test.c        | 48 --------------
 tests/qtest/test-hmp.c              |  6 +-
 tests/qtest/vhost-user-test.c       |  8 +--
 17 files changed, 40 insertions(+), 320 deletions(-)
docs/devel/migration.rst +1 -1
index ad381b89b2..19c3d4f3ea 100644
@@ -641,7 +641,7 @@ time per vCPU.
 
 .. note::
   During the postcopy phase, the bandwidth limits set using
-  ``migrate_set_speed`` is ignored (to avoid delaying requested pages that
+  ``migrate_set_parameter`` is ignored (to avoid delaying requested pages that
   the destination is waiting for).
 
 Postcopy device transfer
docs/rdma.txt +1 -1
index 49dc9f8bca..2b4cdea1d8 100644
@@ -89,7 +89,7 @@ RUNNING:
 First, set the migration speed to match your hardware's capabilities:
 
 QEMU Monitor Command:
-$ migrate_set_speed 40g # or whatever is the MAX of your RDMA device
+$ migrate_set_parameter max_bandwidth 40g # or whatever is the MAX of your RDMA device
 
 Next, on the destination machine, add the following to the QEMU command line:
 
docs/system/deprecated.rst +0 -10
index c577cc97c4..e214f0a9cf 100644
@@ -147,11 +147,6 @@ Use argument ``id`` instead.
 
 Use argument ``id`` instead.
 
-``migrate_set_downtime`` and ``migrate_set_speed`` (since 2.8.0)
-''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-Use ``migrate-set-parameters`` instead.
-
 ``query-named-block-nodes`` result ``encryption_key_missing`` (since 2.10.0)
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
@@ -167,11 +162,6 @@ Always false.
 
 Use argument value ``null`` instead.
 
-``migrate-set-cache-size`` and ``query-migrate-cache-size`` (since 2.11.0)
-''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-Use ``migrate-set-parameters`` and ``query-migrate-parameters`` instead.
-
 ``block-commit`` arguments ``base`` and ``top`` (since 3.1.0)
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
docs/system/removed-features.rst +20 -0
index 74d022babf..2c5513dcc7 100644
@@ -85,6 +85,16 @@ Use ``blockdev-change-medium`` or ``change-vnc-password`` instead.
 The ``query-events`` command has been superseded by the more powerful
 and accurate ``query-qmp-schema`` command.
 
+``migrate_set_cache_size`` and ``query-migrate-cache-size`` (removed in 6.0)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+Use ``migrate_set_parameter`` and ``info migrate_parameters`` instead.
+
+``migrate_set_downtime`` and ``migrate_set_speed`` (removed in 6.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+Use ``migrate_set_parameter`` instead.
+
 Human Monitor Protocol (HMP) commands
 -------------------------------------
 
@@ -113,6 +123,16 @@ The ``acl_show``, ``acl_reset``, ``acl_policy``, ``acl_add``, and
 ``acl_remove`` commands were removed with no replacement. Authorization
 for VNC should be performed using the pluggable QAuthZ objects.
 
+``migrate-set-cache-size`` and ``info migrate-cache-size`` (removed in 6.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+Use ``migrate-set-parameters`` and ``info migrate-parameters`` instead.
+
+``migrate_set_downtime`` and ``migrate_set_speed`` (removed in 6.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+Use ``migrate-set-parameters`` instead.
+
 Guest Emulator ISAs
 -------------------
 
docs/xbzrle.txt +0 -5
index 6bd1828f34..bcb3f0c901 100644
@@ -90,11 +90,6 @@ Usage
 
 3. Set the XBZRLE cache size - the cache size is in MBytes and should be a
 power of 2. The cache default value is 64MBytes. (on source only)
-    {qemu} migrate_set_cache_size 256m
-
-Commit 73af8dd8d7 "migration: Make xbzrle_cache_size a migration parameter"
-(v2.11.0) deprecated migrate-set-cache-size, therefore, the new parameter
-is recommended.
     {qemu} migrate_set_parameter xbzrle-cache-size 256m
 
 4. Start outgoing migration
hmp-commands-info.hx +0 -13
index 117ba25f91..ab0c7aa5ee 100644
@@ -567,19 +567,6 @@ SRST
     Show current migration parameters.
 ERST
 
-    {
-        .name       = "migrate_cache_size",
-        .args_type  = "",
-        .params     = "",
-        .help       = "show current migration xbzrle cache size",
-        .cmd        = hmp_info_migrate_cache_size,
-    },
-
-SRST
-  ``info migrate_cache_size``
-    Show current migration xbzrle cache size.
-ERST
-
     {
         .name       = "balloon",
         .args_type  = "",
hmp-commands.hx +0 -45

51 lines not on this page · raw message

include/monitor/hmp.h +0 -4
index ed2913fd18..605d57287a 100644
@@ -28,7 +28,6 @@ void hmp_info_mice(Monitor *mon, const QDict *qdict);
 void hmp_info_migrate(Monitor *mon, const QDict *qdict);
 void hmp_info_migrate_capabilities(Monitor *mon, const QDict *qdict);
 void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict);
-void hmp_info_migrate_cache_size(Monitor *mon, const QDict *qdict);
 void hmp_info_cpus(Monitor *mon, const QDict *qdict);
 void hmp_info_vnc(Monitor *mon, const QDict *qdict);
 void hmp_info_spice(Monitor *mon, const QDict *qdict);
@@ -64,11 +63,8 @@ void hmp_migrate_continue(Monitor *mon, const QDict *qdict);
 void hmp_migrate_incoming(Monitor *mon, const QDict *qdict);
 void hmp_migrate_recover(Monitor *mon, const QDict *qdict);
 void hmp_migrate_pause(Monitor *mon, const QDict *qdict);
-void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict);
-void hmp_migrate_set_speed(Monitor *mon, const QDict *qdict);
 void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict);
 void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict);
-void hmp_migrate_set_cache_size(Monitor *mon, const QDict *qdict);
 void hmp_client_migrate_info(Monitor *mon, const QDict *qdict);
 void hmp_migrate_start_postcopy(Monitor *mon, const QDict *qdict);
 void hmp_x_colo_lost_heartbeat(Monitor *mon, const QDict *qdict);
migration/migration.c +0 -45

51 lines not on this page · raw message

migration/ram.c +1 -1
index 72143da0ac..a569b87875 100644
@@ -121,7 +121,7 @@ static void XBZRLE_cache_unlock(void)
 /**
  * xbzrle_cache_resize: resize the xbzrle cache
  *
- * This function is called from qmp_migrate_set_cache_size in main
+ * This function is called from migrate_params_apply in main
  * thread, possibly while a migration is in progress.  A running
  * migration may be using the cache and might finish during this call,
  * hence changes to the cache are protected by XBZRLE.lock().
monitor/hmp-cmds.c +0 -34
index 3c88a4faef..8a47ba8fbb 100644
@@ -518,12 +518,6 @@ void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict)
     qapi_free_MigrationParameters(params);
 }
 
-void hmp_info_migrate_cache_size(Monitor *mon, const QDict *qdict)
-{
-    monitor_printf(mon, "xbzrel cache size: %" PRId64 " kbytes\n",
-                   qmp_query_migrate_cache_size(NULL) >> 10);
-}
-
 
 #ifdef CONFIG_VNC
 /* Helper for hmp_info_vnc_clients, _servers */
@@ -1226,34 +1220,6 @@ void hmp_migrate_pause(Monitor *mon, const QDict *qdict)
     hmp_handle_error(mon, err);
 }
 
-/* Kept for backwards compatibility */
-void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict)
-{
-    Error *err = NULL;
-
-    double value = qdict_get_double(qdict, "value");
-    qmp_migrate_set_downtime(value, &err);
-    hmp_handle_error(mon, err);
-}
-
-void hmp_migrate_set_cache_size(Monitor *mon, const QDict *qdict)
-{
-    int64_t value = qdict_get_int(qdict, "value");
-    Error *err = NULL;
-
-    qmp_migrate_set_cache_size(value, &err);
-    hmp_handle_error(mon, err);
-}
-
-/* Kept for backwards compatibility */
-void hmp_migrate_set_speed(Monitor *mon, const QDict *qdict)
-{
-    Error *err = NULL;
-
-    int64_t value = qdict_get_int(qdict, "value");
-    qmp_migrate_set_speed(value, &err);
-    hmp_handle_error(mon, err);
-}
 
 void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict)
 {
qapi/migration.json +0 -98

104 lines not on this page · raw message

tests/migration/guestperf/engine.py +9 -7
index 83bfc3b6bb..5161e4ff81 100644
@@ -149,11 +149,11 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri):
                                      "state": True }
                                ])
 
-        resp = src.command("migrate_set_speed",
-                           value=scenario._bandwidth * 1024 * 1024)
+        resp = src.command("migrate-set-parameters",
+                           max_bandwidth=scenario._bandwidth * 1024 * 1024)
 
-        resp = src.command("migrate_set_downtime",
-                           value=scenario._downtime / 1024.0)
+        resp = src.command("migrate-set-parameters",
+                           downtime_limit=scenario._downtime / 1024.0)
 
         if scenario._compression_mt:
             resp = src.command("migrate-set-capabilities",
@@ -182,9 +182,11 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri):
                                    { "capability": "xbzrle",
                                      "state": True }
                                ])
-            resp = src.command("migrate-set-cache-size",
-                               value=(hardware._mem * 1024 * 1024 * 1024 / 100 *
-                                      scenario._compression_xbzrle_cache))
+            resp = src.command("migrate-set-parameters",
+                               xbzrle_cache_size=(
+                                   hardware._mem *
+                                   1024 * 1024 * 1024 / 100 *
+                                   scenario._compression_xbzrle_cache))
 
         resp = src.command("migrate", uri=connect_uri)
 
tests/qemu-iotests/181 +1 -1
index 820c53ef35..cb96d09ae5 100755
@@ -109,7 +109,7 @@ if [ ${QEMU_STATUS[$dest]} -lt 0 ]; then
     _notrun 'Postcopy is not supported'
 fi
 
-_send_qemu_cmd $src 'migrate_set_speed 4k' "(qemu)"
+_send_qemu_cmd $src 'migrate_set_parameter max_bandwidth 4k' "(qemu)"
 _send_qemu_cmd $src 'migrate_set_capability postcopy-ram on' "(qemu)"
 _send_qemu_cmd $src "migrate -d unix:${MIG_SOCKET}" "(qemu)"
 _send_qemu_cmd $src 'migrate_start_postcopy' "(qemu)"
tests/qtest/migration-test.c +0 -48

60 lines not on this page · raw message

tests/qtest/test-hmp.c +3 -3
index 94a8023173..413eb95d2a 100644
@@ -45,9 +45,9 @@ static const char *hmp_cmds[] = {
     "log all",
     "log none",
     "memsave 0 4096 \"/dev/null\"",
-    "migrate_set_cache_size 1",
-    "migrate_set_downtime 1",
-    "migrate_set_speed 1",
+    "migrate_set_parameter xbzrle_cache_size 1",
+    "migrate_set_parameter downtime_limit 1",
+    "migrate_set_parameter max_bandwidth 1",
     "netdev_add user,id=net1",
     "set_link net1 off",
     "set_link net1 on",
tests/qtest/vhost-user-test.c +4 -4
index 1a5f5313ff..3d6337fb5c 100644
@@ -756,8 +756,8 @@ static void test_migrate(void *obj, void *arg, QGuestAllocator *alloc)
 
     /* slow down migration to have time to fiddle with log */
     /* TODO: qtest could learn to break on some places */
-    rsp = qmp("{ 'execute': 'migrate_set_speed',"
-              "'arguments': { 'value': 10 } }");
+    rsp = qmp("{ 'execute': 'migrate-set-parameters',"
+              "'arguments': { 'max-bandwidth': 10 } }");
     g_assert(qdict_haskey(rsp, "return"));
     qobject_unref(rsp);
 
@@ -776,8 +776,8 @@ static void test_migrate(void *obj, void *arg, QGuestAllocator *alloc)
     munmap(log, size);
 
     /* speed things up */
-    rsp = qmp("{ 'execute': 'migrate_set_speed',"
-              "'arguments': { 'value': 0 } }");
+    rsp = qmp("{ 'execute': 'migrate-set-parameters',"
+              "'arguments': { 'max-bandwidth': 0 } }");
     g_assert(qdict_haskey(rsp, "return"));
     qobject_unref(rsp);
 
Signature · 1 line
2.29.2
Reviewed-by on v1 5/14
#15 lore raw

Re: [PATCH 05/14] migrate: remove QMP/HMP commands for speed, downtime and cache size

Quoted 8 lines · * Daniel P. Berrangé ([email protected]) wrote:

The generic 'migrate_set_parameters' command handle all types of param.

Only the QMP commands were documented in the deprecations page, but the rationale for deprecating applies equally to HMP, and the replacements exist. Furthermore the HMP commands are just shims to the QMP commands, so removing the latter breaks the former unless they get re-implemented.

Yes OK; ouch that's going to break my 7 years of instinctive 'migrate_set_speed 10G' typing, but it's probably the right thing to do.

Quoted 622 lines
---
 docs/devel/migration.rst            |  2 +-
 docs/rdma.txt                       |  2 +-
 docs/system/deprecated.rst          | 10 ---
 docs/system/removed-features.rst    | 20 ++++++
 docs/xbzrle.txt                     |  5 --
 hmp-commands-info.hx                | 13 ----
 hmp-commands.hx                     | 45 -------------
 include/monitor/hmp.h               |  4 --
 migration/migration.c               | 45 -------------
 migration/ram.c                     |  2 +-
 monitor/hmp-cmds.c                  | 34 ----------
 qapi/migration.json                 | 98 -----------------------------
 tests/migration/guestperf/engine.py | 16 ++---
 tests/qemu-iotests/181              |  2 +-
 tests/qtest/migration-test.c        | 48 --------------
 tests/qtest/test-hmp.c              |  6 +-
 tests/qtest/vhost-user-test.c       |  8 +--
 17 files changed, 40 insertions(+), 320 deletions(-)
docs/devel/migration.rst +1 -1
index ad381b89b2..19c3d4f3ea 100644
@@ -641,7 +641,7 @@ time per vCPU.
 
 .. note::
   During the postcopy phase, the bandwidth limits set using
-  ``migrate_set_speed`` is ignored (to avoid delaying requested pages that
+  ``migrate_set_parameter`` is ignored (to avoid delaying requested pages that
   the destination is waiting for).
 
 Postcopy device transfer
docs/rdma.txt +1 -1
index 49dc9f8bca..2b4cdea1d8 100644
@@ -89,7 +89,7 @@ RUNNING:
 First, set the migration speed to match your hardware's capabilities:
 
 QEMU Monitor Command:
-$ migrate_set_speed 40g # or whatever is the MAX of your RDMA device
+$ migrate_set_parameter max_bandwidth 40g # or whatever is the MAX of your RDMA device
 
 Next, on the destination machine, add the following to the QEMU command line:
 
docs/system/deprecated.rst +0 -10
index c577cc97c4..e214f0a9cf 100644
@@ -147,11 +147,6 @@ Use argument ``id`` instead.
 
 Use argument ``id`` instead.
 
-``migrate_set_downtime`` and ``migrate_set_speed`` (since 2.8.0)
-''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-Use ``migrate-set-parameters`` instead.
-
 ``query-named-block-nodes`` result ``encryption_key_missing`` (since 2.10.0)
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
@@ -167,11 +162,6 @@ Always false.
 
 Use argument value ``null`` instead.
 
-``migrate-set-cache-size`` and ``query-migrate-cache-size`` (since 2.11.0)
-''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-Use ``migrate-set-parameters`` and ``query-migrate-parameters`` instead.
-
 ``block-commit`` arguments ``base`` and ``top`` (since 3.1.0)
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
docs/system/removed-features.rst +20 -0
index 74d022babf..2c5513dcc7 100644
@@ -85,6 +85,16 @@ Use ``blockdev-change-medium`` or ``change-vnc-password`` instead.
 The ``query-events`` command has been superseded by the more powerful
 and accurate ``query-qmp-schema`` command.
 
+``migrate_set_cache_size`` and ``query-migrate-cache-size`` (removed in 6.0)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+Use ``migrate_set_parameter`` and ``info migrate_parameters`` instead.
+
+``migrate_set_downtime`` and ``migrate_set_speed`` (removed in 6.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+Use ``migrate_set_parameter`` instead.
+
 Human Monitor Protocol (HMP) commands
 -------------------------------------
 
@@ -113,6 +123,16 @@ The ``acl_show``, ``acl_reset``, ``acl_policy``, ``acl_add``, and
 ``acl_remove`` commands were removed with no replacement. Authorization
 for VNC should be performed using the pluggable QAuthZ objects.
 
+``migrate-set-cache-size`` and ``info migrate-cache-size`` (removed in 6.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+Use ``migrate-set-parameters`` and ``info migrate-parameters`` instead.
+
+``migrate_set_downtime`` and ``migrate_set_speed`` (removed in 6.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+Use ``migrate-set-parameters`` instead.
+
 Guest Emulator ISAs
 -------------------
 
docs/xbzrle.txt +0 -5
index 6bd1828f34..bcb3f0c901 100644
@@ -90,11 +90,6 @@ Usage
 
 3. Set the XBZRLE cache size - the cache size is in MBytes and should be a
 power of 2. The cache default value is 64MBytes. (on source only)
-    {qemu} migrate_set_cache_size 256m
-
-Commit 73af8dd8d7 "migration: Make xbzrle_cache_size a migration parameter"
-(v2.11.0) deprecated migrate-set-cache-size, therefore, the new parameter
-is recommended.
     {qemu} migrate_set_parameter xbzrle-cache-size 256m
 
 4. Start outgoing migration
hmp-commands-info.hx +0 -13
index 117ba25f91..ab0c7aa5ee 100644
@@ -567,19 +567,6 @@ SRST
     Show current migration parameters.
 ERST
 
-    {
-        .name       = "migrate_cache_size",
-        .args_type  = "",
-        .params     = "",
-        .help       = "show current migration xbzrle cache size",
-        .cmd        = hmp_info_migrate_cache_size,
-    },
-
-SRST
-  ``info migrate_cache_size``
-    Show current migration xbzrle cache size.
-ERST
-
     {
         .name       = "balloon",
         .args_type  = "",
hmp-commands.hx +0 -45
index b500b8526d..2bbe133bb6 100644
@@ -979,51 +979,6 @@ SRST
   Pause an ongoing migration.  Currently it only supports postcopy.
 ERST
 
-    {
-        .name       = "migrate_set_cache_size",
-        .args_type  = "value:o",
-        .params     = "value",
-        .help       = "set cache size (in bytes) for XBZRLE migrations,"
-                      "the cache size will be rounded down to the nearest "
-                      "power of 2.\n"
-                      "The cache size affects the number of cache misses."
-                      "In case of a high cache miss ratio you need to increase"
-                      " the cache size",
-        .cmd        = hmp_migrate_set_cache_size,
-    },
-
-SRST
-``migrate_set_cache_size`` *value*
-  Set cache size to *value* (in bytes) for xbzrle migrations.
-ERST
-
-    {
-        .name       = "migrate_set_speed",
-        .args_type  = "value:o",
-        .params     = "value",
-        .help       = "set maximum speed (in bytes) for migrations. "
-	"Defaults to MB if no size suffix is specified, ie. B/K/M/G/T",
-        .cmd        = hmp_migrate_set_speed,
-    },
-
-SRST
-``migrate_set_speed`` *value*
-  Set maximum speed to *value* (in bytes) for migrations.
-ERST
-
-    {
-        .name       = "migrate_set_downtime",
-        .args_type  = "value:T",
-        .params     = "value",
-        .help       = "set maximum tolerated downtime (in seconds) for migrations",
-        .cmd        = hmp_migrate_set_downtime,
-    },
-
-SRST
-``migrate_set_downtime`` *second*
-  Set maximum tolerated downtime (in seconds) for migration.
-ERST
-
     {
         .name       = "migrate_set_capability",
         .args_type  = "capability:s,state:b",
include/monitor/hmp.h +0 -4
index ed2913fd18..605d57287a 100644
@@ -28,7 +28,6 @@ void hmp_info_mice(Monitor *mon, const QDict *qdict);
 void hmp_info_migrate(Monitor *mon, const QDict *qdict);
 void hmp_info_migrate_capabilities(Monitor *mon, const QDict *qdict);
 void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict);
-void hmp_info_migrate_cache_size(Monitor *mon, const QDict *qdict);
 void hmp_info_cpus(Monitor *mon, const QDict *qdict);
 void hmp_info_vnc(Monitor *mon, const QDict *qdict);
 void hmp_info_spice(Monitor *mon, const QDict *qdict);
@@ -64,11 +63,8 @@ void hmp_migrate_continue(Monitor *mon, const QDict *qdict);
 void hmp_migrate_incoming(Monitor *mon, const QDict *qdict);
 void hmp_migrate_recover(Monitor *mon, const QDict *qdict);
 void hmp_migrate_pause(Monitor *mon, const QDict *qdict);
-void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict);
-void hmp_migrate_set_speed(Monitor *mon, const QDict *qdict);
 void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict);
 void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict);
-void hmp_migrate_set_cache_size(Monitor *mon, const QDict *qdict);
 void hmp_client_migrate_info(Monitor *mon, const QDict *qdict);
 void hmp_migrate_start_postcopy(Monitor *mon, const QDict *qdict);
 void hmp_x_colo_lost_heartbeat(Monitor *mon, const QDict *qdict);
migration/migration.c +0 -45
index a5ddf43559..5408367eda 100644
@@ -2318,51 +2318,6 @@ void qmp_migrate_continue(MigrationStatus state, Error **errp)
     qemu_sem_post(&s->pause_sem);
 }
 
-void qmp_migrate_set_cache_size(int64_t value, Error **errp)
-{
-    MigrateSetParameters p = {
-        .has_xbzrle_cache_size = true,
-        .xbzrle_cache_size = value,
-    };
-
-    qmp_migrate_set_parameters(&p, errp);
-}
-
-uint64_t qmp_query_migrate_cache_size(Error **errp)
-{
-    return migrate_xbzrle_cache_size();
-}
-
-void qmp_migrate_set_speed(int64_t value, Error **errp)
-{
-    MigrateSetParameters p = {
-        .has_max_bandwidth = true,
-        .max_bandwidth = value,
-    };
-
-    qmp_migrate_set_parameters(&p, errp);
-}
-
-void qmp_migrate_set_downtime(double value, Error **errp)
-{
-    if (value < 0 || value > MAX_MIGRATE_DOWNTIME_SECONDS) {
-        error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
-                   "downtime_limit",
-                   "an integer in the range of 0 to "
-                    stringify(MAX_MIGRATE_DOWNTIME_SECONDS)" seconds");
-        return;
-    }
-
-    value *= 1000; /* Convert to milliseconds */
-
-    MigrateSetParameters p = {
-        .has_downtime_limit = true,
-        .downtime_limit = (int64_t)value,
-    };
-
-    qmp_migrate_set_parameters(&p, errp);
-}
-
 bool migrate_release_ram(void)
 {
     MigrationState *s;
migration/ram.c +1 -1
index 72143da0ac..a569b87875 100644
@@ -121,7 +121,7 @@ static void XBZRLE_cache_unlock(void)
 /**
  * xbzrle_cache_resize: resize the xbzrle cache
  *
- * This function is called from qmp_migrate_set_cache_size in main
+ * This function is called from migrate_params_apply in main
  * thread, possibly while a migration is in progress.  A running
  * migration may be using the cache and might finish during this call,
  * hence changes to the cache are protected by XBZRLE.lock().
monitor/hmp-cmds.c +0 -34
index 3c88a4faef..8a47ba8fbb 100644
@@ -518,12 +518,6 @@ void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict)
     qapi_free_MigrationParameters(params);
 }
 
-void hmp_info_migrate_cache_size(Monitor *mon, const QDict *qdict)
-{
-    monitor_printf(mon, "xbzrel cache size: %" PRId64 " kbytes\n",
-                   qmp_query_migrate_cache_size(NULL) >> 10);
-}
-
 
 #ifdef CONFIG_VNC
 /* Helper for hmp_info_vnc_clients, _servers */
@@ -1226,34 +1220,6 @@ void hmp_migrate_pause(Monitor *mon, const QDict *qdict)
     hmp_handle_error(mon, err);
 }
 
-/* Kept for backwards compatibility */
-void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict)
-{
-    Error *err = NULL;
-
-    double value = qdict_get_double(qdict, "value");
-    qmp_migrate_set_downtime(value, &err);
-    hmp_handle_error(mon, err);
-}
-
-void hmp_migrate_set_cache_size(Monitor *mon, const QDict *qdict)
-{
-    int64_t value = qdict_get_int(qdict, "value");
-    Error *err = NULL;
-
-    qmp_migrate_set_cache_size(value, &err);
-    hmp_handle_error(mon, err);
-}
-
-/* Kept for backwards compatibility */
-void hmp_migrate_set_speed(Monitor *mon, const QDict *qdict)
-{
-    Error *err = NULL;
-
-    int64_t value = qdict_get_int(qdict, "value");
-    qmp_migrate_set_speed(value, &err);
-    hmp_handle_error(mon, err);
-}
 
 void hmp_migrate_set_capability(Monitor *mon, const QDict *qdict)
 {
qapi/migration.json +0 -98
index 6e5943fbb4..9bf0bc4d25 100644
@@ -1398,104 +1398,6 @@
 ##
 { 'command': 'migrate-continue', 'data': {'state': 'MigrationStatus'} }
 
-##
-# @migrate_set_downtime:
-#
-# Set maximum tolerated downtime for migration.
-#
-# @value: maximum downtime in seconds
-#
-# Features:
-# @deprecated: This command is deprecated.  Use
-#              'migrate-set-parameters' instead.
-#
-# Returns: nothing on success
-#
-# Since: 0.14
-#
-# Example:
-#
-# -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'migrate_set_downtime', 'data': {'value': 'number'},
-  'features': [ 'deprecated' ] }
-
-##
-# @migrate_set_speed:
-#
-# Set maximum speed for migration.
-#
-# @value: maximum speed in bytes per second.
-#
-# Features:
-# @deprecated: This command is deprecated.  Use
-#              'migrate-set-parameters' instead.
-#
-# Returns: nothing on success
-#
-# Since: 0.14
-#
-# Example:
-#
-# -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'migrate_set_speed', 'data': {'value': 'int'},
-  'features': [ 'deprecated' ] }
-
-##
-# @migrate-set-cache-size:
-#
-# Set cache size to be used by XBZRLE migration
-#
-# @value: cache size in bytes
-#
-# Features:
-# @deprecated: This command is deprecated.  Use
-#              'migrate-set-parameters' instead.
-#
-# The size will be rounded down to the nearest power of 2.
-# The cache size can be modified before and during ongoing migration
-#
-# Returns: nothing on success
-#
-# Since: 1.2
-#
-# Example:
-#
-# -> { "execute": "migrate-set-cache-size",
-#      "arguments": { "value": 536870912 } }
-# <- { "return": {} }
-#
-##
-{ 'command': 'migrate-set-cache-size', 'data': {'value': 'int'},
-  'features': [ 'deprecated' ] }
-
-##
-# @query-migrate-cache-size:
-#
-# Query migration XBZRLE cache size
-#
-# Features:
-# @deprecated: This command is deprecated.  Use
-#              'query-migrate-parameters' instead.
-#
-# Returns: XBZRLE cache size in bytes
-#
-# Since: 1.2
-#
-# Example:
-#
-# -> { "execute": "query-migrate-cache-size" }
-# <- { "return": 67108864 }
-#
-##
-{ 'command': 'query-migrate-cache-size', 'returns': 'size',
-  'features': [ 'deprecated' ] }
-
 ##
 # @migrate:
 #
tests/migration/guestperf/engine.py +9 -7
index 83bfc3b6bb..5161e4ff81 100644
@@ -149,11 +149,11 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri):
                                      "state": True }
                                ])
 
-        resp = src.command("migrate_set_speed",
-                           value=scenario._bandwidth * 1024 * 1024)
+        resp = src.command("migrate-set-parameters",
+                           max_bandwidth=scenario._bandwidth * 1024 * 1024)
 
-        resp = src.command("migrate_set_downtime",
-                           value=scenario._downtime / 1024.0)
+        resp = src.command("migrate-set-parameters",
+                           downtime_limit=scenario._downtime / 1024.0)
 
         if scenario._compression_mt:
             resp = src.command("migrate-set-capabilities",
@@ -182,9 +182,11 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri):
                                    { "capability": "xbzrle",
                                      "state": True }
                                ])
-            resp = src.command("migrate-set-cache-size",
-                               value=(hardware._mem * 1024 * 1024 * 1024 / 100 *
-                                      scenario._compression_xbzrle_cache))
+            resp = src.command("migrate-set-parameters",
+                               xbzrle_cache_size=(
+                                   hardware._mem *
+                                   1024 * 1024 * 1024 / 100 *
+                                   scenario._compression_xbzrle_cache))
 
         resp = src.command("migrate", uri=connect_uri)
 
tests/qemu-iotests/181 +1 -1
index 820c53ef35..cb96d09ae5 100755
@@ -109,7 +109,7 @@ if [ ${QEMU_STATUS[$dest]} -lt 0 ]; then
     _notrun 'Postcopy is not supported'
 fi
 
-_send_qemu_cmd $src 'migrate_set_speed 4k' "(qemu)"
+_send_qemu_cmd $src 'migrate_set_parameter max_bandwidth 4k' "(qemu)"
 _send_qemu_cmd $src 'migrate_set_capability postcopy-ram on' "(qemu)"
 _send_qemu_cmd $src "migrate -d unix:${MIG_SOCKET}" "(qemu)"
 _send_qemu_cmd $src 'migrate_start_postcopy' "(qemu)"
tests/qtest/migration-test.c +0 -48
index f2142fbd3c..3a711bb492 100644
@@ -658,53 +658,6 @@ static void test_migrate_end(QTestState *from, QTestState *to, bool test_dest)
     cleanup("dest_serial");
 }
 
-static void deprecated_set_downtime(QTestState *who, const double value)
-{
-    QDict *rsp;
-
-    rsp = qtest_qmp(who,
-                    "{ 'execute': 'migrate_set_downtime',"
-                    " 'arguments': { 'value': %f } }", value);
-    g_assert(qdict_haskey(rsp, "return"));
-    qobject_unref(rsp);
-    migrate_check_parameter_int(who, "downtime-limit", value * 1000);
-}
-
-static void deprecated_set_speed(QTestState *who, long long value)
-{
-    QDict *rsp;
-
-    rsp = qtest_qmp(who, "{ 'execute': 'migrate_set_speed',"
-                          "'arguments': { 'value': %lld } }", value);
-    g_assert(qdict_haskey(rsp, "return"));
-    qobject_unref(rsp);
-    migrate_check_parameter_int(who, "max-bandwidth", value);
-}
-
-static void deprecated_set_cache_size(QTestState *who, long long value)
-{
-    QDict *rsp;
-
-    rsp = qtest_qmp(who, "{ 'execute': 'migrate-set-cache-size',"
-                         "'arguments': { 'value': %lld } }", value);
-    g_assert(qdict_haskey(rsp, "return"));
-    qobject_unref(rsp);
-    migrate_check_parameter_int(who, "xbzrle-cache-size", value);
-}
-
-static void test_deprecated(void)
-{
-    QTestState *from;
-
-    from = qtest_init("-machine none");
-
-    deprecated_set_downtime(from, 0.12345);
-    deprecated_set_speed(from, 12345);
-    deprecated_set_cache_size(from, 4096);
-
-    qtest_quit(from);
-}
-
 static int migrate_postcopy_prepare(QTestState **from_ptr,
                                     QTestState **to_ptr,
                                     MigrateStart *args)
@@ -1486,7 +1439,6 @@ int main(int argc, char **argv)
 
     qtest_add_func("/migration/postcopy/unix", test_postcopy);
     qtest_add_func("/migration/postcopy/recovery", test_postcopy_recovery);
-    qtest_add_func("/migration/deprecated", test_deprecated);
     qtest_add_func("/migration/bad_dest", test_baddest);
     qtest_add_func("/migration/precopy/unix", test_precopy_unix);
     qtest_add_func("/migration/precopy/tcp", test_precopy_tcp);
tests/qtest/test-hmp.c +3 -3
index 94a8023173..413eb95d2a 100644
@@ -45,9 +45,9 @@ static const char *hmp_cmds[] = {
     "log all",
     "log none",
     "memsave 0 4096 \"/dev/null\"",
-    "migrate_set_cache_size 1",
-    "migrate_set_downtime 1",
-    "migrate_set_speed 1",
+    "migrate_set_parameter xbzrle_cache_size 1",
+    "migrate_set_parameter downtime_limit 1",
+    "migrate_set_parameter max_bandwidth 1",
     "netdev_add user,id=net1",
     "set_link net1 off",
     "set_link net1 on",
tests/qtest/vhost-user-test.c +4 -4
index 1a5f5313ff..3d6337fb5c 100644
@@ -756,8 +756,8 @@ static void test_migrate(void *obj, void *arg, QGuestAllocator *alloc)
 
     /* slow down migration to have time to fiddle with log */
     /* TODO: qtest could learn to break on some places */
-    rsp = qmp("{ 'execute': 'migrate_set_speed',"
-              "'arguments': { 'value': 10 } }");
+    rsp = qmp("{ 'execute': 'migrate-set-parameters',"
+              "'arguments': { 'max-bandwidth': 10 } }");
     g_assert(qdict_haskey(rsp, "return"));
     qobject_unref(rsp);
 
@@ -776,8 +776,8 @@ static void test_migrate(void *obj, void *arg, QGuestAllocator *alloc)
     munmap(log, size);
 
     /* speed things up */
-    rsp = qmp("{ 'execute': 'migrate_set_speed',"
-              "'arguments': { 'value': 0 } }");
+    rsp = qmp("{ 'execute': 'migrate-set-parameters',"
+              "'arguments': { 'max-bandwidth': 0 } }");
     g_assert(qdict_haskey(rsp, "return"));
     qobject_unref(rsp);
 
Signature · 1 line
2.29.2
Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK
#16 lore raw

Re: [PATCH 05/14] migrate: remove QMP/HMP commands for speed, downtime and cache size

Quoted 8 lines · Dr. David Alan Gilbert
Quoted 7 lines · * Daniel P. Berrangé ([email protected]) wrote:

The generic 'migrate_set_parameters' command handle all types of param.

Only the QMP commands were documented in the deprecations page, but the rationale for deprecating applies equally to HMP, and the replacements exist. Furthermore the HMP commands are just shims to the QMP commands, so removing the latter breaks the former unless they get re-implemented.

Quoted 4 lines
Quoted 1 line

Yes OK; ouch that's going to break my 7 years of instinctive 'migrate_set_speed 10G' typing, but it's probably the right thing to do.

migrate_set_speed should remain if it is not changed to have a sane default.

Paolo

#17 lore raw

Re: [PATCH 05/14] migrate: remove QMP/HMP commands for speed, downtime and cache size

Quoted 9 lines · Paolo Bonzini
Quoted 8 lines · Dr. David Alan Gilbert
Quoted 7 lines · * Daniel P. Berrangé ([email protected]) wrote:

The generic 'migrate_set_parameters' command handle all types of param.

Only the QMP commands were documented in the deprecations page, but the rationale for deprecating applies equally to HMP, and the replacements exist. Furthermore the HMP commands are just shims to the QMP commands, so removing the latter breaks the former unless they get re-implemented.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Yes OK; ouch that's going to break my 7 years of instinctive 'migrate_set_speed 10G' typing, but it's probably the right thing to do.

migrate_set_speed should remain if it is not changed to have a sane default.

Define sane ? The default is 1 Gib/s since:

commit 7590a2ae091fde8bb72d5df93977ab9707e23242
Author: Laurent Vivier <[email protected]>
Date: Mon Sep 21 16:49:57 2020 +0200

migration: increase max-bandwidth to 128 MiB/s (1 Gib/s)

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#18 lore raw

Re: [PATCH 05/14] migrate: remove QMP/HMP commands for speed, downtime and cache size

Quoted 17 lines · Daniel P. Berrangé
Quoted 9 lines · Paolo Bonzini
Quoted 8 lines · Dr. David Alan Gilbert
Quoted 7 lines · * Daniel P. Berrangé ([email protected]) wrote:

The generic 'migrate_set_parameters' command handle all types of param.

Only the QMP commands were documented in the deprecations page, but the rationale for deprecating applies equally to HMP, and the replacements exist. Furthermore the HMP commands are just shims to the QMP commands, so removing the latter breaks the former unless they get re-implemented.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Yes OK; ouch that's going to break my 7 years of instinctive 'migrate_set_speed 10G' typing, but it's probably the right thing to do.

migrate_set_speed should remain if it is not changed to have a sane default.

Quoted 7 lines

Define sane ? The default is 1 Gib/s since:

commit 7590a2ae091fde8bb72d5df93977ab9707e23242
Author: Laurent Vivier <[email protected]>
Date: Mon Sep 21 16:49:57 2020 +0200

migration: increase max-bandwidth to 128 MiB/s (1 Gib/s)

Oh, I missed that! I was still thinking of the old 32 MiB/s value.

Paolo

#19 lore raw

PATCH 6/14 machine: remove 'query-cpus' QMP command

In reply to Daniel P. Berrangé

The newer 'query-cpus-fast' command avoids side effects on the guest execution. Note that some of the field names are different in the 'query-cpus-fast' command.

---
 docs/system/deprecated.rst                 |   5 -
 docs/system/removed-features.rst           |   5 +
 hw/core/machine-hmp-cmds.c                 |   8 +-
 hw/core/machine-qmp-cmds.c                 |  79 ----------
 qapi/machine.json                          | 161 +--------------------
 tests/acceptance/pc_cpu_hotplug_props.py   |   2 +-
 tests/acceptance/x86_cpu_model_versions.py |   2 +-
 tests/migration/guestperf/engine.py        |   2 +-
 tests/qtest/numa-test.c                    |   6 +-
 tests/qtest/qmp-test.c                     |   6 +-
 tests/qtest/test-x86-cpuid-compat.c        |   4 +-
 11 files changed, 22 insertions(+), 258 deletions(-)
docs/system/deprecated.rst +0 -5
index e214f0a9cf..484f017119 100644
@@ -192,11 +192,6 @@ Since the ``dirty-bitmaps`` field is optionally present in both the old and
 new locations, clients must use introspection to learn where to anticipate
 the field if/when it does appear in command output.
 
-``query-cpus`` (since 2.12.0)
-'''''''''''''''''''''''''''''
-
-The ``query-cpus`` command is replaced by the ``query-cpus-fast`` command.
-
 ``query-cpus-fast`` ``arch`` output member (since 3.0.0)
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
docs/system/removed-features.rst +5 -0
index 2c5513dcc7..ad146daf9b 100644
@@ -95,6 +95,11 @@ Use ``migrate_set_parameter`` and ``info migrate_parameters`` instead.
 
 Use ``migrate_set_parameter`` instead.
 
+``query-cpus`` (removed in 6.0)
+'''''''''''''''''''''''''''''''
+
+The ``query-cpus`` command is replaced by the ``query-cpus-fast`` command.
+
 Human Monitor Protocol (HMP) commands
 -------------------------------------
 
hw/core/machine-hmp-cmds.c +4 -4
index 6357be9c6b..58248cffa3 100644
@@ -130,7 +130,7 @@ void hmp_info_numa(Monitor *mon, const QDict *qdict)
 {
     int i, nb_numa_nodes;
     NumaNodeMem *node_mem;
-    CpuInfoList *cpu_list, *cpu;
+    CpuInfoFastList *cpu_list, *cpu;
     MachineState *ms = MACHINE(qdev_get_machine());
 
     nb_numa_nodes = ms->numa_state ? ms->numa_state->num_nodes : 0;
@@ -139,7 +139,7 @@ void hmp_info_numa(Monitor *mon, const QDict *qdict)
         return;
     }
 
-    cpu_list = qmp_query_cpus(&error_abort);
+    cpu_list = qmp_query_cpus_fast(&error_abort);
     node_mem = g_new0(NumaNodeMem, nb_numa_nodes);
 
     query_numa_node_mem(node_mem, ms);
@@ -148,7 +148,7 @@ void hmp_info_numa(Monitor *mon, const QDict *qdict)
         for (cpu = cpu_list; cpu; cpu = cpu->next) {
             if (cpu->value->has_props && cpu->value->props->has_node_id &&
                 cpu->value->props->node_id == i) {
-                monitor_printf(mon, " %" PRIi64, cpu->value->CPU);
+                monitor_printf(mon, " %" PRIi64, cpu->value->cpu_index);
             }
         }
         monitor_printf(mon, "\n");
@@ -157,6 +157,6 @@ void hmp_info_numa(Monitor *mon, const QDict *qdict)
         monitor_printf(mon, "node %d plugged: %" PRId64 " MB\n", i,
                        node_mem[i].node_plugged_mem >> 20);
     }
-    qapi_free_CpuInfoList(cpu_list);
+    qapi_free_CpuInfoFastList(cpu_list);
     g_free(node_mem);
 }
hw/core/machine-qmp-cmds.c +0 -79

85 lines not on this page · raw message

qapi/machine.json +2 -159

185 lines not on this page · raw message

tests/acceptance/pc_cpu_hotplug_props.py +1 -1
index e49bf33fc5..f48f68fc6b 100644
@@ -32,4 +32,4 @@ def test_no_die_id(self):
         self.vm.add_args('-cpu', 'qemu64')
         self.vm.add_args('-device', 'qemu64-x86_64-cpu,socket-id=1,core-id=0,thread-id=0')
         self.vm.launch()
-        self.assertEquals(len(self.vm.command('query-cpus')), 2)
+        self.assertEquals(len(self.vm.command('query-cpus-fast')), 2)
tests/acceptance/x86_cpu_model_versions.py +1 -1
index 2b7461bb41..77ed8597a4 100644
@@ -246,7 +246,7 @@ class CascadelakeArchCapabilities(avocado_qemu.Test):
     :avocado: tags=arch:x86_64
     """
     def get_cpu_prop(self, prop):
-        cpu_path = self.vm.command('query-cpus')[0].get('qom_path')
+        cpu_path = self.vm.command('query-cpus-fast')[0].get('qom-path')
         return self.vm.command('qom-get', path=cpu_path, property=prop)
 
     def test_4_1(self):
tests/migration/guestperf/engine.py +1 -1
index 5161e4ff81..5c965140f8 100644
@@ -110,7 +110,7 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri):
         src_vcpu_time = []
         src_pid = src.get_pid()
 
-        vcpus = src.command("query-cpus")
+        vcpus = src.command("query-cpus-fast")
         src_threads = []
         for vcpu in vcpus:
             src_threads.append(vcpu["thread_id"])
tests/qtest/numa-test.c +3 -3
index b25ebf97d8..dc0ec571ca 100644
@@ -72,7 +72,7 @@ static void test_mon_partial(const void *data)
 
 static QList *get_cpus(QTestState *qts, QDict **resp)
 {
-    *resp = qtest_qmp(qts, "{ 'execute': 'query-cpus' }");
+    *resp = qtest_qmp(qts, "{ 'execute': 'query-cpus-fast' }");
     g_assert(*resp);
     g_assert(qdict_haskey(*resp, "return"));
     return qdict_get_qlist(*resp, "return");
@@ -97,10 +97,10 @@ static void test_query_cpus(const void *data)
         int64_t cpu_idx, node;
 
         cpu = qobject_to(QDict, e);
-        g_assert(qdict_haskey(cpu, "CPU"));
+        g_assert(qdict_haskey(cpu, "cpu-index"));
         g_assert(qdict_haskey(cpu, "props"));
 
-        cpu_idx = qdict_get_int(cpu, "CPU");
+        cpu_idx = qdict_get_int(cpu, "cpu-index");
         props = qdict_get_qdict(cpu, "props");
         g_assert(qdict_haskey(props, "node-id"));
         node = qdict_get_int(props, "node-id");
tests/qtest/qmp-test.c +3 -3
index 11614bf63f..cd27fae3de 100644
@@ -252,7 +252,7 @@ static void test_qmp_oob(void)
      * Try any command that does not support OOB but with OOB flag. We
      * should get failure.
      */
-    resp = qtest_qmp(qts, "{ 'exec-oob': 'query-cpus' }");
+    resp = qtest_qmp(qts, "{ 'exec-oob': 'query-cpus-fast' }");
     g_assert(qdict_haskey(resp, "error"));
     qobject_unref(resp);
 
@@ -289,7 +289,7 @@ static void test_qmp_preconfig(void)
     g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-commands' }")));
 
     /* forbidden commands, expected error */
-    g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus' }")));
+    g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus-fast' }")));
 
     /* check that query-status returns preconfig state */
     rsp = qtest_qmp(qs, "{ 'execute': 'query-status' }");
@@ -313,7 +313,7 @@ static void test_qmp_preconfig(void)
     g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'x-exit-preconfig' }")));
 
     /* enabled commands, no error expected  */
-    g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus' }")));
+    g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus-fast' }")));
 
     qtest_quit(qs);
 }
tests/qtest/test-x86-cpuid-compat.c +2 -2
index 7ca1883a29..2ac169faf0 100644
@@ -13,12 +13,12 @@ static char *get_cpu0_qom_path(void)
     QDict *cpu0;
     char *path;
 
-    resp = qmp("{'execute': 'query-cpus', 'arguments': {}}");
+    resp = qmp("{'execute': 'query-cpus-fast', 'arguments': {}}");
     g_assert(qdict_haskey(resp, "return"));
     ret = qdict_get_qlist(resp, "return");
 
     cpu0 = qobject_to(QDict, qlist_peek(ret));
-    path = g_strdup(qdict_get_str(cpu0, "qom_path"));
+    path = g_strdup(qdict_get_str(cpu0, "qom-path"));
     qobject_unref(resp);
     return path;
 }
Signature · 1 line
2.29.2
Reviewed-by Tested-by on v1 6/14
#20 lore raw

Re: [PATCH 06/14] machine: remove 'query-cpus' QMP command

Hi,

Quoted 388 lines · Daniel P. Berrangé

The newer 'query-cpus-fast' command avoids side effects on the guest execution. Note that some of the field names are different in the 'query-cpus-fast' command.

---
  docs/system/deprecated.rst                 |   5 -
  docs/system/removed-features.rst           |   5 +
  hw/core/machine-hmp-cmds.c                 |   8 +-
  hw/core/machine-qmp-cmds.c                 |  79 ----------
  qapi/machine.json                          | 161 +--------------------
  tests/acceptance/pc_cpu_hotplug_props.py   |   2 +-
  tests/acceptance/x86_cpu_model_versions.py |   2 +-
  tests/migration/guestperf/engine.py        |   2 +-
  tests/qtest/numa-test.c                    |   6 +-
  tests/qtest/qmp-test.c                     |   6 +-
  tests/qtest/test-x86-cpuid-compat.c        |   4 +-
  11 files changed, 22 insertions(+), 258 deletions(-)
docs/system/deprecated.rst +0 -5
index e214f0a9cf..484f017119 100644
@@ -192,11 +192,6 @@ Since the ``dirty-bitmaps`` field is optionally present in both the old and
  new locations, clients must use introspection to learn where to anticipate
  the field if/when it does appear in command output.
 
-``query-cpus`` (since 2.12.0)
-'''''''''''''''''''''''''''''
-
-The ``query-cpus`` command is replaced by the ``query-cpus-fast`` command.
-
  ``query-cpus-fast`` ``arch`` output member (since 3.0.0)
  ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
docs/system/removed-features.rst +5 -0
index 2c5513dcc7..ad146daf9b 100644
@@ -95,6 +95,11 @@ Use ``migrate_set_parameter`` and ``info migrate_parameters`` instead.
 
  Use ``migrate_set_parameter`` instead.
 
+``query-cpus`` (removed in 6.0)
+'''''''''''''''''''''''''''''''
+
+The ``query-cpus`` command is replaced by the ``query-cpus-fast`` command.
+
  Human Monitor Protocol (HMP) commands
  -------------------------------------
 
hw/core/machine-hmp-cmds.c +4 -4
index 6357be9c6b..58248cffa3 100644
@@ -130,7 +130,7 @@ void hmp_info_numa(Monitor *mon, const QDict *qdict)
  {
      int i, nb_numa_nodes;
      NumaNodeMem *node_mem;
-    CpuInfoList *cpu_list, *cpu;
+    CpuInfoFastList *cpu_list, *cpu;
      MachineState *ms = MACHINE(qdev_get_machine());
 
      nb_numa_nodes = ms->numa_state ? ms->numa_state->num_nodes : 0;
@@ -139,7 +139,7 @@ void hmp_info_numa(Monitor *mon, const QDict *qdict)
          return;
      }
 
-    cpu_list = qmp_query_cpus(&error_abort);
+    cpu_list = qmp_query_cpus_fast(&error_abort);
      node_mem = g_new0(NumaNodeMem, nb_numa_nodes);
 
      query_numa_node_mem(node_mem, ms);
@@ -148,7 +148,7 @@ void hmp_info_numa(Monitor *mon, const QDict *qdict)
          for (cpu = cpu_list; cpu; cpu = cpu->next) {
              if (cpu->value->has_props && cpu->value->props->has_node_id &&
                  cpu->value->props->node_id == i) {
-                monitor_printf(mon, " %" PRIi64, cpu->value->CPU);
+                monitor_printf(mon, " %" PRIi64, cpu->value->cpu_index);
              }
          }
          monitor_printf(mon, "\n");
@@ -157,6 +157,6 @@ void hmp_info_numa(Monitor *mon, const QDict *qdict)
          monitor_printf(mon, "node %d plugged: %" PRId64 " MB\n", i,
                         node_mem[i].node_plugged_mem >> 20);
      }
-    qapi_free_CpuInfoList(cpu_list);
+    qapi_free_CpuInfoFastList(cpu_list);
      g_free(node_mem);
  }
hw/core/machine-qmp-cmds.c +0 -79
index 44e979e503..af60cd969d 100644
@@ -24,85 +24,6 @@
  #include "sysemu/runstate.h"
  #include "sysemu/sysemu.h"
 
-CpuInfoList *qmp_query_cpus(Error **errp)
-{
-    MachineState *ms = MACHINE(qdev_get_machine());
-    MachineClass *mc = MACHINE_GET_CLASS(ms);
-    CpuInfoList *head = NULL, **tail = &head;
-    CPUState *cpu;
-
-    CPU_FOREACH(cpu) {
-        CpuInfo *value;
-#if defined(TARGET_I386)
-        X86CPU *x86_cpu = X86_CPU(cpu);
-        CPUX86State *env = &x86_cpu->env;
-#elif defined(TARGET_PPC)
-        PowerPCCPU *ppc_cpu = POWERPC_CPU(cpu);
-        CPUPPCState *env = &ppc_cpu->env;
-#elif defined(TARGET_SPARC)
-        SPARCCPU *sparc_cpu = SPARC_CPU(cpu);
-        CPUSPARCState *env = &sparc_cpu->env;
-#elif defined(TARGET_RISCV)
-        RISCVCPU *riscv_cpu = RISCV_CPU(cpu);
-        CPURISCVState *env = &riscv_cpu->env;
-#elif defined(TARGET_MIPS)
-        MIPSCPU *mips_cpu = MIPS_CPU(cpu);
-        CPUMIPSState *env = &mips_cpu->env;
-#elif defined(TARGET_TRICORE)
-        TriCoreCPU *tricore_cpu = TRICORE_CPU(cpu);
-        CPUTriCoreState *env = &tricore_cpu->env;
-#elif defined(TARGET_S390X)
-        S390CPU *s390_cpu = S390_CPU(cpu);
-        CPUS390XState *env = &s390_cpu->env;
-#endif
-
-        cpu_synchronize_state(cpu);
-
-        value = g_malloc0(sizeof(*value));
-        value->CPU = cpu->cpu_index;
-        value->current = (cpu == first_cpu);
-        value->halted = cpu->halted;
-        value->qom_path = object_get_canonical_path(OBJECT(cpu));
-        value->thread_id = cpu->thread_id;
-#if defined(TARGET_I386)
-        value->arch = CPU_INFO_ARCH_X86;
-        value->u.x86.pc = env->eip + env->segs[R_CS].base;
-#elif defined(TARGET_PPC)
-        value->arch = CPU_INFO_ARCH_PPC;
-        value->u.ppc.nip = env->nip;
-#elif defined(TARGET_SPARC)
-        value->arch = CPU_INFO_ARCH_SPARC;
-        value->u.q_sparc.pc = env->pc;
-        value->u.q_sparc.npc = env->npc;
-#elif defined(TARGET_MIPS)
-        value->arch = CPU_INFO_ARCH_MIPS;
-        value->u.q_mips.PC = env->active_tc.PC;
-#elif defined(TARGET_TRICORE)
-        value->arch = CPU_INFO_ARCH_TRICORE;
-        value->u.tricore.PC = env->PC;
-#elif defined(TARGET_S390X)
-        value->arch = CPU_INFO_ARCH_S390;
-        value->u.s390.cpu_state = env->cpu_state;
-#elif defined(TARGET_RISCV)
-        value->arch = CPU_INFO_ARCH_RISCV;
-        value->u.riscv.pc = env->pc;
-#else
-        value->arch = CPU_INFO_ARCH_OTHER;
-#endif
-        value->has_props = !!mc->cpu_index_to_instance_props;
-        if (value->has_props) {
-            CpuInstanceProperties *props;
-            props = g_malloc0(sizeof(*props));
-            *props = mc->cpu_index_to_instance_props(ms, cpu->cpu_index);
-            value->props = props;
-        }
-
-        QAPI_LIST_APPEND(tail, value);
-    }
-
-    return head;
-}
-
  static CpuInfoArch sysemu_target_to_cpuinfo_arch(SysEmuTarget target)
  {
      /*
qapi/machine.json +2 -159
index 330189efe3..9811927504 100644
@@ -38,7 +38,7 @@
  # @CpuInfoArch:
  #
  # An enumeration of cpu types that enable additional information during
-# @query-cpus and @query-cpus-fast.
+# @query-cpus-fast.
  #
  # @s390: since 2.12
  #
@@ -49,114 +49,6 @@
  { 'enum': 'CpuInfoArch',
    'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 's390', 'riscv', 'other' ] }
 
-##
-# @CpuInfo:
-#
-# Information about a virtual CPU
-#
-# @CPU: the index of the virtual CPU
-#
-# @current: this only exists for backwards compatibility and should be ignored
-#
-# @halted: true if the virtual CPU is in the halt state.  Halt usually refers
-#          to a processor specific low power mode.
-#
-# @qom_path: path to the CPU object in the QOM tree (since 2.4)
-#
-# @thread_id: ID of the underlying host thread
-#
-# @props: properties describing to which node/socket/core/thread
-#         virtual CPU belongs to, provided if supported by board (since 2.10)
-#
-# @arch: architecture of the cpu, which determines which additional fields
-#        will be listed (since 2.6)
-#
-# Since: 0.14
-#
-# Notes: @halted is a transient state that changes frequently.  By the time the
-#        data is sent to the client, the guest may no longer be halted.
-##
-{ 'union': 'CpuInfo',
-  'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
-           'qom_path': 'str', 'thread_id': 'int',
-           '*props': 'CpuInstanceProperties', 'arch': 'CpuInfoArch' },
-  'discriminator': 'arch',
-  'data': { 'x86': 'CpuInfoX86',
-            'sparc': 'CpuInfoSPARC',
-            'ppc': 'CpuInfoPPC',
-            'mips': 'CpuInfoMIPS',
-            'tricore': 'CpuInfoTricore',
-            's390': 'CpuInfoS390',
-            'riscv': 'CpuInfoRISCV' } }
-
-##
-# @CpuInfoX86:
-#
-# Additional information about a virtual i386 or x86_64 CPU
-#
-# @pc: the 64-bit instruction pointer
-#
-# Since: 2.6
-##
-{ 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
-
-##
-# @CpuInfoSPARC:
-#
-# Additional information about a virtual SPARC CPU
-#
-# @pc: the PC component of the instruction pointer
-#
-# @npc: the NPC component of the instruction pointer
-#
-# Since: 2.6
-##
-{ 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
-
-##
-# @CpuInfoPPC:
-#
-# Additional information about a virtual PPC CPU
-#
-# @nip: the instruction pointer
-#
-# Since: 2.6
-##
-{ 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
-
-##
-# @CpuInfoMIPS:
-#
-# Additional information about a virtual MIPS CPU
-#
-# @PC: the instruction pointer
-#
-# Since: 2.6
-##
-{ 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
-
-##
-# @CpuInfoTricore:
-#
-# Additional information about a virtual Tricore CPU
-#
-# @PC: the instruction pointer
-#
-# Since: 2.6
-##
-{ 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
-
-##
-# @CpuInfoRISCV:
-#
-# Additional information about a virtual RISCV CPU
-#
-# @pc: the instruction pointer
-#
-# Since 2.12
-##
-{ 'struct': 'CpuInfoRISCV', 'data': { 'pc': 'int' } }
-
  ##
  # @CpuS390State:
  #
@@ -180,53 +72,6 @@
  ##
  { 'struct': 'CpuInfoS390', 'data': { 'cpu-state': 'CpuS390State' } }
 
-##
-# @query-cpus:
-#
-# Returns a list of information about each virtual CPU.
-#
-# This command causes vCPU threads to exit to userspace, which causes
-# a small interruption to guest CPU execution. This will have a negative
-# impact on realtime guests and other latency sensitive guest workloads.
-#
-# Features:
-# @deprecated: This command is deprecated, because it interferes with
-#              the guest.  Use 'query-cpus-fast' instead to avoid the vCPU
-#              interruption.
-#
-# Returns: a list of @CpuInfo for each virtual CPU
-#
-# Since: 0.14
-#
-# Example:
-#
-# -> { "execute": "query-cpus" }
-# <- { "return": [
-#          {
-#             "CPU":0,
-#             "current":true,
-#             "halted":false,
-#             "qom_path":"/machine/unattached/device[0]",
-#             "arch":"x86",
-#             "pc":3227107138,
-#             "thread_id":3134
-#          },
-#          {
-#             "CPU":1,
-#             "current":false,
-#             "halted":true,
-#             "qom_path":"/machine/unattached/device[2]",
-#             "arch":"x86",
-#             "pc":7108165,
-#             "thread_id":3135
-#          }
-#       ]
-#    }
-#
-##
-{ 'command': 'query-cpus', 'returns': ['CpuInfo'],
-  'features': [ 'deprecated' ] }
-
  ##
  # @CpuInfoFast:
  #
@@ -266,9 +111,7 @@
  ##
  # @query-cpus-fast:
  #
-# Returns information about all virtual CPUs. This command does not
-# incur a performance penalty and should be used in production
-# instead of query-cpus.
+# Returns information about all virtual CPUs.
  #
  # Returns: list of @CpuInfoFast
  #
tests/acceptance/pc_cpu_hotplug_props.py +1 -1
index e49bf33fc5..f48f68fc6b 100644
@@ -32,4 +32,4 @@ def test_no_die_id(self):
          self.vm.add_args('-cpu', 'qemu64')
          self.vm.add_args('-device', 'qemu64-x86_64-cpu,socket-id=1,core-id=0,thread-id=0')
          self.vm.launch()
-        self.assertEquals(len(self.vm.command('query-cpus')), 2)
+        self.assertEquals(len(self.vm.command('query-cpus-fast')), 2)
tests/acceptance/x86_cpu_model_versions.py +0 -0
index 2b7461bb41..77ed8597a4 100644

tests/acceptance/x86_cpu_model_versions.py class CascadelakeArchCapabilities(avocado_qemu.Test): · line 250

Quoted 6 lines
tests/acceptance/x86_cpu_model_versions.py +1 -1
@@ -246,7 +246,7 @@ class CascadelakeArchCapabilities(avocado_qemu.Test):
      :avocado: tags=arch:x86_64
      """
      def get_cpu_prop(self, prop):
-        cpu_path = self.vm.command('query-cpus')[0].get('qom_path')
+        cpu_path = self.vm.command('query-cpus-fast')[0].get('qom-path')
          return self.vm.command('qom-get', path=cpu_path, property=prop)

The changes for the two functional tests look good to me. Also I ran them locally and passed. So:

- Wainer

Quoted 91 lines
tests/acceptance/x86_cpu_model_versions.py +0 -0
      def test_4_1(self):
tests/migration/guestperf/engine.py +1 -1
index 5161e4ff81..5c965140f8 100644
@@ -110,7 +110,7 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri):
          src_vcpu_time = []
          src_pid = src.get_pid()
 
-        vcpus = src.command("query-cpus")
+        vcpus = src.command("query-cpus-fast")
          src_threads = []
          for vcpu in vcpus:
              src_threads.append(vcpu["thread_id"])
tests/qtest/numa-test.c +3 -3
index b25ebf97d8..dc0ec571ca 100644
@@ -72,7 +72,7 @@ static void test_mon_partial(const void *data)
 
  static QList *get_cpus(QTestState *qts, QDict **resp)
  {
-    *resp = qtest_qmp(qts, "{ 'execute': 'query-cpus' }");
+    *resp = qtest_qmp(qts, "{ 'execute': 'query-cpus-fast' }");
      g_assert(*resp);
      g_assert(qdict_haskey(*resp, "return"));
      return qdict_get_qlist(*resp, "return");
@@ -97,10 +97,10 @@ static void test_query_cpus(const void *data)
          int64_t cpu_idx, node;
 
          cpu = qobject_to(QDict, e);
-        g_assert(qdict_haskey(cpu, "CPU"));
+        g_assert(qdict_haskey(cpu, "cpu-index"));
          g_assert(qdict_haskey(cpu, "props"));
 
-        cpu_idx = qdict_get_int(cpu, "CPU");
+        cpu_idx = qdict_get_int(cpu, "cpu-index");
          props = qdict_get_qdict(cpu, "props");
          g_assert(qdict_haskey(props, "node-id"));
          node = qdict_get_int(props, "node-id");
tests/qtest/qmp-test.c +3 -3
index 11614bf63f..cd27fae3de 100644
@@ -252,7 +252,7 @@ static void test_qmp_oob(void)
       * Try any command that does not support OOB but with OOB flag. We
       * should get failure.
       */
-    resp = qtest_qmp(qts, "{ 'exec-oob': 'query-cpus' }");
+    resp = qtest_qmp(qts, "{ 'exec-oob': 'query-cpus-fast' }");
      g_assert(qdict_haskey(resp, "error"));
      qobject_unref(resp);
 
@@ -289,7 +289,7 @@ static void test_qmp_preconfig(void)
      g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-commands' }")));
 
      /* forbidden commands, expected error */
-    g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus' }")));
+    g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus-fast' }")));
 
      /* check that query-status returns preconfig state */
      rsp = qtest_qmp(qs, "{ 'execute': 'query-status' }");
@@ -313,7 +313,7 @@ static void test_qmp_preconfig(void)
      g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'x-exit-preconfig' }")));
 
      /* enabled commands, no error expected  */
-    g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus' }")));
+    g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus-fast' }")));
 
      qtest_quit(qs);
  }
tests/qtest/test-x86-cpuid-compat.c +2 -2
index 7ca1883a29..2ac169faf0 100644
@@ -13,12 +13,12 @@ static char *get_cpu0_qom_path(void)
      QDict *cpu0;
      char *path;
 
-    resp = qmp("{'execute': 'query-cpus', 'arguments': {}}");
+    resp = qmp("{'execute': 'query-cpus-fast', 'arguments': {}}");
      g_assert(qdict_haskey(resp, "return"));
      ret = qdict_get_qlist(resp, "return");
 
      cpu0 = qobject_to(QDict, qlist_peek(ret));
-    path = g_strdup(qdict_get_str(cpu0, "qom_path"));
+    path = g_strdup(qdict_get_str(cpu0, "qom-path"));
      qobject_unref(resp);
      return path;
  }
#21 lore raw

PATCH 7/14 machine: remove 'arch' field from 'query-cpus-fast' QMP command

In reply to Daniel P. Berrangé
---
 docs/system/deprecated.rst       |  6 -----
 docs/system/removed-features.rst |  6 +++++
 hw/core/machine-qmp-cmds.c       | 41 --------------------------------
 qapi/machine.json                | 22 -----------------
 4 files changed, 6 insertions(+), 69 deletions(-)
docs/system/deprecated.rst +0 -6
index 484f017119..78474f0845 100644
@@ -192,12 +192,6 @@ Since the ``dirty-bitmaps`` field is optionally present in both the old and
 new locations, clients must use introspection to learn where to anticipate
 the field if/when it does appear in command output.
 
-``query-cpus-fast`` ``arch`` output member (since 3.0.0)
-''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-The ``arch`` output member of the ``query-cpus-fast`` command is
-replaced by the ``target`` output member.
-
 chardev client socket with ``wait`` option (since 4.0)
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
docs/system/removed-features.rst +6 -0
index ad146daf9b..7942c2e513 100644
@@ -100,6 +100,12 @@ Use ``migrate_set_parameter`` instead.
 
 The ``query-cpus`` command is replaced by the ``query-cpus-fast`` command.
 
+``query-cpus-fast`` ``arch`` output member (removed in 6.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+The ``arch`` output member of the ``query-cpus-fast`` command is
+replaced by the ``target`` output member.
+
 Human Monitor Protocol (HMP) commands
 -------------------------------------
 
hw/core/machine-qmp-cmds.c +0 -41

53 lines not on this page · raw message

qapi/machine.json +0 -22
index 9811927504..c0c52aef10 100644
@@ -34,21 +34,6 @@
              'sh4eb', 'sparc', 'sparc64', 'tricore', 'unicore32',
              'x86_64', 'xtensa', 'xtensaeb' ] }
 
-##
-# @CpuInfoArch:
-#
-# An enumeration of cpu types that enable additional information during
-# @query-cpus-fast.
-#
-# @s390: since 2.12
-#
-# @riscv: since 2.12
-#
-# Since: 2.6
-##
-{ 'enum': 'CpuInfoArch',
-  'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 's390', 'riscv', 'other' ] }
-
 ##
 # @CpuS390State:
 #
@@ -86,14 +71,9 @@
 # @props: properties describing to which node/socket/core/thread
 #         virtual CPU belongs to, provided if supported by board
 #
-# @arch: base architecture of the cpu
-#
 # @target: the QEMU system emulation target, which determines which
 #          additional fields will be listed (since 3.0)
 #
-# Features:
-# @deprecated: Member @arch is deprecated.  Use @target instead.
-#
 # Since: 2.12
 #
 ##
@@ -102,8 +82,6 @@
                       'qom-path'     : 'str',
                       'thread-id'    : 'int',
                       '*props'       : 'CpuInstanceProperties',
-                      'arch'         : { 'type': 'CpuInfoArch',
-                                         'features': [ 'deprecated' ] },
                       'target'       : 'SysEmuTarget' },
   'discriminator' : 'target',
   'data'          : { 's390x'        : 'CpuInfoS390' } }
Signature · 1 line
2.29.2
#22 lore raw

Re: [PATCH 07/14] machine: remove 'arch' field from 'query-cpus-fast' QMP command

Ping for anyone willing to review this so I can get this in before freeze.

Quoted 154 lines · Daniel P. Berrangé
---
 docs/system/deprecated.rst       |  6 -----
 docs/system/removed-features.rst |  6 +++++
 hw/core/machine-qmp-cmds.c       | 41 --------------------------------
 qapi/machine.json                | 22 -----------------
 4 files changed, 6 insertions(+), 69 deletions(-)
docs/system/deprecated.rst +0 -6
index 484f017119..78474f0845 100644
@@ -192,12 +192,6 @@ Since the ``dirty-bitmaps`` field is optionally present in both the old and
 new locations, clients must use introspection to learn where to anticipate
 the field if/when it does appear in command output.
 
-``query-cpus-fast`` ``arch`` output member (since 3.0.0)
-''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-The ``arch`` output member of the ``query-cpus-fast`` command is
-replaced by the ``target`` output member.
-
 chardev client socket with ``wait`` option (since 4.0)
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
docs/system/removed-features.rst +6 -0
index ad146daf9b..7942c2e513 100644
@@ -100,6 +100,12 @@ Use ``migrate_set_parameter`` instead.
 
 The ``query-cpus`` command is replaced by the ``query-cpus-fast`` command.
 
+``query-cpus-fast`` ``arch`` output member (removed in 6.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+The ``arch`` output member of the ``query-cpus-fast`` command is
+replaced by the ``target`` output member.
+
 Human Monitor Protocol (HMP) commands
 -------------------------------------
 
hw/core/machine-qmp-cmds.c +0 -41
index af60cd969d..68a942595a 100644
@@ -24,46 +24,6 @@
 #include "sysemu/runstate.h"
 #include "sysemu/sysemu.h"
 
-static CpuInfoArch sysemu_target_to_cpuinfo_arch(SysEmuTarget target)
-{
-    /*
-     * The @SysEmuTarget -> @CpuInfoArch mapping below is based on the
-     * TARGET_ARCH -> TARGET_BASE_ARCH mapping in the "configure" script.
-     */
-    switch (target) {
-    case SYS_EMU_TARGET_I386:
-    case SYS_EMU_TARGET_X86_64:
-        return CPU_INFO_ARCH_X86;
-
-    case SYS_EMU_TARGET_PPC:
-    case SYS_EMU_TARGET_PPC64:
-        return CPU_INFO_ARCH_PPC;
-
-    case SYS_EMU_TARGET_SPARC:
-    case SYS_EMU_TARGET_SPARC64:
-        return CPU_INFO_ARCH_SPARC;
-
-    case SYS_EMU_TARGET_MIPS:
-    case SYS_EMU_TARGET_MIPSEL:
-    case SYS_EMU_TARGET_MIPS64:
-    case SYS_EMU_TARGET_MIPS64EL:
-        return CPU_INFO_ARCH_MIPS;
-
-    case SYS_EMU_TARGET_TRICORE:
-        return CPU_INFO_ARCH_TRICORE;
-
-    case SYS_EMU_TARGET_S390X:
-        return CPU_INFO_ARCH_S390;
-
-    case SYS_EMU_TARGET_RISCV32:
-    case SYS_EMU_TARGET_RISCV64:
-        return CPU_INFO_ARCH_RISCV;
-
-    default:
-        return CPU_INFO_ARCH_OTHER;
-    }
-}
-
 static void cpustate_to_cpuinfo_s390(CpuInfoS390 *info, const CPUState *cpu)
 {
 #ifdef TARGET_S390X
@@ -104,7 +64,6 @@ CpuInfoFastList *qmp_query_cpus_fast(Error **errp)
             value->props = props;
         }
 
-        value->arch = sysemu_target_to_cpuinfo_arch(target);
         value->target = target;
         if (target == SYS_EMU_TARGET_S390X) {
             cpustate_to_cpuinfo_s390(&value->u.s390x, cpu);
qapi/machine.json +0 -22
index 9811927504..c0c52aef10 100644
@@ -34,21 +34,6 @@
              'sh4eb', 'sparc', 'sparc64', 'tricore', 'unicore32',
              'x86_64', 'xtensa', 'xtensaeb' ] }
 
-##
-# @CpuInfoArch:
-#
-# An enumeration of cpu types that enable additional information during
-# @query-cpus-fast.
-#
-# @s390: since 2.12
-#
-# @riscv: since 2.12
-#
-# Since: 2.6
-##
-{ 'enum': 'CpuInfoArch',
-  'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 's390', 'riscv', 'other' ] }
-
 ##
 # @CpuS390State:
 #
@@ -86,14 +71,9 @@
 # @props: properties describing to which node/socket/core/thread
 #         virtual CPU belongs to, provided if supported by board
 #
-# @arch: base architecture of the cpu
-#
 # @target: the QEMU system emulation target, which determines which
 #          additional fields will be listed (since 3.0)
 #
-# Features:
-# @deprecated: Member @arch is deprecated.  Use @target instead.
-#
 # Since: 2.12
 #
 ##
@@ -102,8 +82,6 @@
                       'qom-path'     : 'str',
                       'thread-id'    : 'int',
                       '*props'       : 'CpuInstanceProperties',
-                      'arch'         : { 'type': 'CpuInfoArch',
-                                         'features': [ 'deprecated' ] },
                       'target'       : 'SysEmuTarget' },
   'discriminator' : 'target',
   'data'          : { 's390x'        : 'CpuInfoS390' } }
Signature · 1 line
2.29.2

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Reviewed-by on v1 7/14
#23 lore raw

Re: [PATCH 07/14] machine: remove 'arch' field from 'query-cpus-fast' QMP command

In reply to Daniel P. Berrangé
Quoted 7 lines · Daniel P. Berrangé
---
  docs/system/deprecated.rst       |  6 -----
  docs/system/removed-features.rst |  6 +++++
  hw/core/machine-qmp-cmds.c       | 41 --------------------------------
  qapi/machine.json                | 22 -----------------
  4 files changed, 6 insertions(+), 69 deletions(-)

Patch looks reasonable to me.

#24 lore raw

PATCH 8/14 chardev: reject use of 'wait' flag for socket client chardevs

In reply to Daniel P. Berrangé

This only makes sense conceptually when used with listener chardevs.

---
 chardev/char-socket.c            | 12 ++++--------
 docs/system/deprecated.rst       |  6 ------
 docs/system/removed-features.rst |  6 ++++++
 3 files changed, 10 insertions(+), 14 deletions(-)
chardev/char-socket.c +4 -8
index 9061981f6d..b24618b581 100644
@@ -1336,14 +1336,10 @@ static bool qmp_chardev_validate_socket(ChardevSocket *sock,
             return false;
         }
         if (sock->has_wait) {
-            warn_report("'wait' option is deprecated with "
-                        "socket in client connect mode");
-            if (sock->wait) {
-                error_setg(errp, "%s",
-                           "'wait' option is incompatible with "
-                           "socket in client connect mode");
-                return false;
-            }
+            error_setg(errp, "%s",
+                       "'wait' option is incompatible with "
+                       "socket in client connect mode");
+            return false;
         }
     }
 
docs/system/deprecated.rst +0 -6
index 78474f0845..c69887dca8 100644
@@ -192,12 +192,6 @@ Since the ``dirty-bitmaps`` field is optionally present in both the old and
 new locations, clients must use introspection to learn where to anticipate
 the field if/when it does appear in command output.
 
-chardev client socket with ``wait`` option (since 4.0)
-''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-Character devices creating sockets in client mode should not specify
-the 'wait' field, which is only applicable to sockets in server mode
-
 ``nbd-server-add`` and ``nbd-server-remove`` (since 5.2)
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
docs/system/removed-features.rst +6 -0
index 7942c2e513..870a222062 100644
@@ -106,6 +106,12 @@ The ``query-cpus`` command is replaced by the ``query-cpus-fast`` command.
 The ``arch`` output member of the ``query-cpus-fast`` command is
 replaced by the ``target`` output member.
 
+chardev client socket with ``wait`` option (removed in 6.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+Character devices creating sockets in client mode should not specify
+the 'wait' field, which is only applicable to sockets in server mode
+
 Human Monitor Protocol (HMP) commands
 -------------------------------------
 
Signature · 1 line
2.29.2
Reviewed-by on v1 8/14
#25 lore raw

Re: [PATCH 08/14] chardev: reject use of 'wait' flag for socket client chardevs

Quoted 4 lines · Daniel P. Berrangé

This only makes sense conceptually when used with listener chardevs.

---

Quoted 70 lines
 chardev/char-socket.c            | 12 ++++--------
 docs/system/deprecated.rst       |  6 ------
 docs/system/removed-features.rst |  6 ++++++
 3 files changed, 10 insertions(+), 14 deletions(-)
chardev/char-socket.c +4 -8
index 9061981f6d..b24618b581 100644
@@ -1336,14 +1336,10 @@ static bool
 qmp_chardev_validate_socket(ChardevSocket *sock,
             return false;
         }
         if (sock->has_wait) {
-            warn_report("'wait' option is deprecated with "
-                        "socket in client connect mode");
-            if (sock->wait) {
-                error_setg(errp, "%s",
-                           "'wait' option is incompatible with "
-                           "socket in client connect mode");
-                return false;
-            }
+            error_setg(errp, "%s",
+                       "'wait' option is incompatible with "
+                       "socket in client connect mode");
+            return false;
         }
     }
docs/system/deprecated.rst +0 -0
index 78474f0845..c69887dca8 100644
@@ -192,12 +192,6 @@ Since the ``dirty-bitmaps`` field is optionally

present in both the old and
new locations, clients must use introspection to learn where to anticipate the field if/when it does appear in command output.

docs/system/deprecated.rst +0 -6
-chardev client socket with ``wait`` option (since 4.0)
-''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-Character devices creating sockets in client mode should not specify
-the 'wait' field, which is only applicable to sockets in server mode
-
 ``nbd-server-add`` and ``nbd-server-remove`` (since 5.2)
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
docs/system/removed-features.rst +0 -0
index 7942c2e513..870a222062 100644
@@ -106,6 +106,12 @@ The ``query-cpus`` command is replaced by the

``query-cpus-fast`` command.
The ``arch`` output member of the ``query-cpus-fast`` command is replaced by the ``target`` output member.

docs/system/removed-features.rst +6 -1
+chardev client socket with ``wait`` option (removed in 6.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+Character devices creating sockets in client mode should not specify
+the 'wait' field, which is only applicable to sockets in server mode
+
 Human Monitor Protocol (HMP) commands
 -------------------------------------
 
--

2.29.2

#26 lore raw

PATCH 9/14 hw/ide: remove 'ide-drive' device

In reply to Daniel P. Berrangé

The 'ide-hd' and 'ide-cd' devices provide suitable alternatives.

---
 docs/qdev-device-use.txt         |  2 +-
 docs/system/deprecated.rst       |  6 -----
 docs/system/removed-features.rst |  9 ++++++++
 hw/i386/pc.c                     |  1 -
 hw/ide/qdev.c                    | 38 --------------------------------
 hw/ppc/mac_newworld.c            | 13 -----------
 hw/ppc/mac_oldworld.c            | 13 -----------
 hw/sparc64/sun4u.c               | 14 ------------
 scripts/device-crash-test        |  1 -
 softmmu/vl.c                     |  1 -
 tests/qemu-iotests/051           |  2 --
 tests/qemu-iotests/051.pc.out    | 10 ---------
 12 files changed, 10 insertions(+), 100 deletions(-)
docs/qdev-device-use.txt +1 -1
index 245cdf29c7..2408889334 100644
@@ -388,7 +388,7 @@ type.
 some DEVNAMEs:
 
     default device      suppressing DEVNAMEs
-    CD-ROM              ide-cd, ide-drive, ide-hd, scsi-cd, scsi-hd
+    CD-ROM              ide-cd, ide-hd, scsi-cd, scsi-hd
     floppy              floppy, isa-fdc
     parallel            isa-parallel
     serial              isa-serial
docs/system/deprecated.rst +0 -6
index c69887dca8..f5c82a46dc 100644
@@ -242,12 +242,6 @@ this CPU is also deprecated.
 System emulator devices
 -----------------------
 
-``ide-drive`` (since 4.2)
-'''''''''''''''''''''''''
-
-The 'ide-drive' device is deprecated. Users should use 'ide-hd' or
-'ide-cd' as appropriate to get an IDE hard disk or CD-ROM as needed.
-
 ``scsi-disk`` (since 4.2)
 '''''''''''''''''''''''''
 
docs/system/removed-features.rst +9 -0
index 870a222062..8fd3fafb32 100644
@@ -213,6 +213,15 @@ This machine has been renamed ``fuloong2e``.
 These machine types were very old and likely could not be used for live
 migration from old QEMU versions anymore. Use a newer machine type instead.
 
+System emulator devices
+-----------------------
+
+``ide-drive`` (removed in 6.0)
+''''''''''''''''''''''''''''''
+
+The 'ide-drive' device has been removed. Users should use 'ide-hd' or
+'ide-cd' as appropriate to get an IDE hard disk or CD-ROM as needed.
+
 Related binaries
 ----------------
 
hw/i386/pc.c +0 -1
index 8aa85dec54..828122e21e 100644
@@ -342,7 +342,6 @@ GlobalProperty pc_compat_1_4[] = {
     { "scsi-disk", "discard_granularity", "0" },
     { "ide-hd", "discard_granularity", "0" },
     { "ide-cd", "discard_granularity", "0" },
-    { "ide-drive", "discard_granularity", "0" },
     { "virtio-blk-pci", "discard_granularity", "0" },
     /* DEV_NVECTORS_UNSPECIFIED as a uint32_t string: */
     { "virtio-serial-pci", "vectors", "0xFFFFFFFF" },
hw/ide/qdev.c +0 -38
index 8cd19fa5e9..e70ebc83a0 100644
@@ -283,20 +283,6 @@ static void ide_cd_realize(IDEDevice *dev, Error **errp)
     ide_dev_initfn(dev, IDE_CD, errp);
 }
 
-static void ide_drive_realize(IDEDevice *dev, Error **errp)
-{
-    DriveInfo *dinfo = NULL;
-
-    warn_report("'ide-drive' is deprecated, "
-                "please use 'ide-hd' or 'ide-cd' instead");
-
-    if (dev->conf.blk) {
-        dinfo = blk_legacy_dinfo(dev->conf.blk);
-    }
-
-    ide_dev_initfn(dev, dinfo && dinfo->media_cd ? IDE_CD : IDE_HD, errp);
-}
-
 #define DEFINE_IDE_DEV_PROPERTIES()                     \
     DEFINE_BLOCK_PROPERTIES(IDEDrive, dev.conf),        \
     DEFINE_BLOCK_ERROR_PROPERTIES(IDEDrive, dev.conf),  \
@@ -355,29 +341,6 @@ static const TypeInfo ide_cd_info = {
     .class_init    = ide_cd_class_init,
 };
 
-static Property ide_drive_properties[] = {
-    DEFINE_IDE_DEV_PROPERTIES(),
-    DEFINE_PROP_END_OF_LIST(),
-};
-
-static void ide_drive_class_init(ObjectClass *klass, void *data)
-{
-    DeviceClass *dc = DEVICE_CLASS(klass);
-    IDEDeviceClass *k = IDE_DEVICE_CLASS(klass);
-
-    k->realize  = ide_drive_realize;
-    dc->fw_name = "drive";
-    dc->desc    = "virtual IDE disk or CD-ROM (legacy)";
-    device_class_set_props(dc, ide_drive_properties);
-}
-
-static const TypeInfo ide_drive_info = {
-    .name          = "ide-drive",
-    .parent        = TYPE_IDE_DEVICE,
-    .instance_size = sizeof(IDEDrive),
-    .class_init    = ide_drive_class_init,
-};
-
 static void ide_device_class_init(ObjectClass *klass, void *data)
 {
     DeviceClass *k = DEVICE_CLASS(klass);
@@ -402,7 +365,6 @@ static void ide_register_types(void)
     type_register_static(&ide_bus_info);
     type_register_static(&ide_hd_info);
     type_register_static(&ide_cd_info);
-    type_register_static(&ide_drive_info);
     type_register_static(&ide_device_type_info);
 }
 
hw/ppc/mac_newworld.c +0 -13
index e991db4add..2175962846 100644
@@ -539,8 +539,6 @@ static char *core99_fw_dev_path(FWPathProvider *p, BusState *bus,
                                 DeviceState *dev)
 {
     PCIDevice *pci;
-    IDEBus *ide_bus;
-    IDEState *ide_s;
     MACIOIDEState *macio_ide;
 
     if (!strcmp(object_get_typename(OBJECT(dev)), "macio-newworld")) {
@@ -553,17 +551,6 @@ static char *core99_fw_dev_path(FWPathProvider *p, BusState *bus,
         return g_strdup_printf("ata-3@%x", macio_ide->addr);
     }
 
-    if (!strcmp(object_get_typename(OBJECT(dev)), "ide-drive")) {
-        ide_bus = IDE_BUS(qdev_get_parent_bus(dev));
-        ide_s = idebus_active_if(ide_bus);
-
-        if (ide_s->drive_kind == IDE_CD) {
-            return g_strdup("cdrom");
-        }
-
-        return g_strdup("disk");
-    }
-
     if (!strcmp(object_get_typename(OBJECT(dev)), "ide-hd")) {
         return g_strdup("disk");
     }
hw/ppc/mac_oldworld.c +0 -13
index 44ee99be88..963d247f5f 100644
@@ -384,8 +384,6 @@ static char *heathrow_fw_dev_path(FWPathProvider *p, BusState *bus,
                                   DeviceState *dev)
 {
     PCIDevice *pci;
-    IDEBus *ide_bus;
-    IDEState *ide_s;
     MACIOIDEState *macio_ide;
 
     if (!strcmp(object_get_typename(OBJECT(dev)), "macio-oldworld")) {
@@ -398,17 +396,6 @@ static char *heathrow_fw_dev_path(FWPathProvider *p, BusState *bus,
         return g_strdup_printf("ata-3@%x", macio_ide->addr);
     }
 
-    if (!strcmp(object_get_typename(OBJECT(dev)), "ide-drive")) {
-        ide_bus = IDE_BUS(qdev_get_parent_bus(dev));
-        ide_s = idebus_active_if(ide_bus);
-
-        if (ide_s->drive_kind == IDE_CD) {
-            return g_strdup("cdrom");
-        }
-
-        return g_strdup("disk");
-    }
-
     if (!strcmp(object_get_typename(OBJECT(dev)), "ide-hd")) {
         return g_strdup("disk");
     }
hw/sparc64/sun4u.c +0 -14
index 0fa13a7330..d7c27144ba 100644
@@ -749,8 +749,6 @@ static char *sun4u_fw_dev_path(FWPathProvider *p, BusState *bus,
                                DeviceState *dev)
 {
     PCIDevice *pci;
-    IDEBus *ide_bus;
-    IDEState *ide_s;
     int bus_id;
 
     if (!strcmp(object_get_typename(OBJECT(dev)), "pbm-bridge")) {
@@ -764,18 +762,6 @@ static char *sun4u_fw_dev_path(FWPathProvider *p, BusState *bus,
         }
     }
 
-    if (!strcmp(object_get_typename(OBJECT(dev)), "ide-drive")) {
-         ide_bus = IDE_BUS(qdev_get_parent_bus(dev));
-         ide_s = idebus_active_if(ide_bus);
-         bus_id = ide_bus->bus_id;
-
-         if (ide_s->drive_kind == IDE_CD) {
-             return g_strdup_printf("ide@%x/cdrom", bus_id);
-         }
-
-         return g_strdup_printf("ide@%x/disk", bus_id);
-    }
-
     if (!strcmp(object_get_typename(OBJECT(dev)), "ide-hd")) {
         return g_strdup("disk");
     }
scripts/device-crash-test +0 -1
index ef1412ca59..3981209165 100755
@@ -76,7 +76,6 @@ ERROR_RULE_LIST = [
     {'device':'ics', 'expected':True},                     # ics_base_realize: required link 'xics' not found: Property '.xics' not found
     # "-device ide-cd" does work on more recent QEMU versions, so it doesn't have expected=True
     {'device':'ide-cd'},                                 # No drive specified
-    {'device':'ide-drive', 'expected':True},               # No drive specified
     {'device':'ide-hd', 'expected':True},                  # No drive specified
     {'device':'ipmi-bmc-extern', 'expected':True},         # IPMI external bmc requires chardev attribute
     {'device':'isa-debugcon', 'expected':True},            # Can't create serial device, empty char device
softmmu/vl.c +0 -1
index c31061cc09..fdabf68433 100644
@@ -177,7 +177,6 @@ static struct {
     { .driver = "floppy",               .flag = &default_floppy    },
     { .driver = "ide-cd",               .flag = &default_cdrom     },
     { .driver = "ide-hd",               .flag = &default_cdrom     },
-    { .driver = "ide-drive",            .flag = &default_cdrom     },
     { .driver = "scsi-cd",              .flag = &default_cdrom     },
     { .driver = "scsi-hd",              .flag = &default_cdrom     },
     { .driver = "VGA",                  .flag = &default_vga       },
tests/qemu-iotests/051 +0 -2
index 7cbd1415ce..8b334fe41d 100755
@@ -185,7 +185,6 @@ case "$QEMU_DEFAULT_MACHINE" in
     pc)
         run_qemu -drive if=none,id=disk -device ide-cd,drive=disk
         run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
-        run_qemu -drive if=none,id=disk -device ide-drive,drive=disk
         run_qemu -drive if=none,id=disk -device ide-hd,drive=disk
         run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
         run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
@@ -238,7 +237,6 @@ case "$QEMU_DEFAULT_MACHINE" in
     pc)
         run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-cd,drive=disk
         run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-cd,drive=disk
-        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-drive,drive=disk
         run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-hd,drive=disk
         run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk
         run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
tests/qemu-iotests/051.pc.out +0 -10
index f707471fb0..2e23a4caa0 100644
@@ -156,11 +156,6 @@ Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
 QEMU X.Y.Z monitor - type 'help' for more information
 (qemu) quit
 
-Testing: -drive if=none,id=disk -device ide-drive,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device ide-drive,drive=disk: warning: 'ide-drive' is deprecated, please use 'ide-hd' or 'ide-cd' instead
-QEMU_PROG: -device ide-drive,drive=disk: Device needs media, but drive is empty
-
 Testing: -drive if=none,id=disk -device ide-hd,drive=disk
 QEMU X.Y.Z monitor - type 'help' for more information
 (qemu) QEMU_PROG: -device ide-hd,drive=disk: Device needs media, but drive is empty
@@ -228,11 +223,6 @@ Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c
 QEMU X.Y.Z monitor - type 'help' for more information
 (qemu) quit
 
-Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-drive,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device ide-drive,drive=disk: warning: 'ide-drive' is deprecated, please use 'ide-hd' or 'ide-cd' instead
-QEMU_PROG: -device ide-drive,drive=disk: Block node is read-only
-
 Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-hd,drive=disk
 QEMU X.Y.Z monitor - type 'help' for more information
 (qemu) QEMU_PROG: -device ide-hd,drive=disk: Block node is read-only
Signature · 1 line
2.29.2
Reviewed-by on v1 9/14
#27 lore raw

Re: [PATCH 09/14] hw/ide: remove 'ide-drive' device

Quoted 91 lines · Daniel P. Berrangé

The 'ide-hd' and 'ide-cd' devices provide suitable alternatives.

---
  docs/qdev-device-use.txt         |  2 +-
  docs/system/deprecated.rst       |  6 -----
  docs/system/removed-features.rst |  9 ++++++++
  hw/i386/pc.c                     |  1 -
  hw/ide/qdev.c                    | 38 --------------------------------
  hw/ppc/mac_newworld.c            | 13 -----------
  hw/ppc/mac_oldworld.c            | 13 -----------
  hw/sparc64/sun4u.c               | 14 ------------
  scripts/device-crash-test        |  1 -
  softmmu/vl.c                     |  1 -
  tests/qemu-iotests/051           |  2 --
  tests/qemu-iotests/051.pc.out    | 10 ---------
  12 files changed, 10 insertions(+), 100 deletions(-)
docs/qdev-device-use.txt +1 -1
index 245cdf29c7..2408889334 100644
@@ -388,7 +388,7 @@ type.
  some DEVNAMEs:
 
      default device      suppressing DEVNAMEs
-    CD-ROM              ide-cd, ide-drive, ide-hd, scsi-cd, scsi-hd
+    CD-ROM              ide-cd, ide-hd, scsi-cd, scsi-hd
      floppy              floppy, isa-fdc
      parallel            isa-parallel
      serial              isa-serial
docs/system/deprecated.rst +0 -6
index c69887dca8..f5c82a46dc 100644
@@ -242,12 +242,6 @@ this CPU is also deprecated.
  System emulator devices
  -----------------------
 
-``ide-drive`` (since 4.2)
-'''''''''''''''''''''''''
-
-The 'ide-drive' device is deprecated. Users should use 'ide-hd' or
-'ide-cd' as appropriate to get an IDE hard disk or CD-ROM as needed.
-
  ``scsi-disk`` (since 4.2)
  '''''''''''''''''''''''''
 
docs/system/removed-features.rst +9 -0
index 870a222062..8fd3fafb32 100644
@@ -213,6 +213,15 @@ This machine has been renamed ``fuloong2e``.
  These machine types were very old and likely could not be used for live
  migration from old QEMU versions anymore. Use a newer machine type instead.
 
+System emulator devices
+-----------------------
+
+``ide-drive`` (removed in 6.0)
+''''''''''''''''''''''''''''''
+
+The 'ide-drive' device has been removed. Users should use 'ide-hd' or
+'ide-cd' as appropriate to get an IDE hard disk or CD-ROM as needed.
+
  Related binaries
  ----------------
 
hw/i386/pc.c +0 -1
index 8aa85dec54..828122e21e 100644
@@ -342,7 +342,6 @@ GlobalProperty pc_compat_1_4[] = {
      { "scsi-disk", "discard_granularity", "0" },
      { "ide-hd", "discard_granularity", "0" },
      { "ide-cd", "discard_granularity", "0" },
-    { "ide-drive", "discard_granularity", "0" },
      { "virtio-blk-pci", "discard_granularity", "0" },
      /* DEV_NVECTORS_UNSPECIFIED as a uint32_t string: */
      { "virtio-serial-pci", "vectors", "0xFFFFFFFF" },
hw/ide/qdev.c +0 -3
index 8cd19fa5e9..e70ebc83a0 100644
@@ -283,20 +283,6 @@ static void ide_cd_realize(IDEDevice *dev, Error **errp)
      ide_dev_initfn(dev, IDE_CD, errp);
  }
 
-static void ide_drive_realize(IDEDevice *dev, Error **errp)
-{
-    DriveInfo *dinfo = NULL;

hw/ide/qdev.c static void ide_cd_realize(IDEDevice *dev, Error **errp) · line 298

Quoted 10 lines
hw/ide/qdev.c +0 -10
-
-    warn_report("'ide-drive' is deprecated, "
-                "please use 'ide-hd' or 'ide-cd' instead");
-
-    if (dev->conf.blk) {
-        dinfo = blk_legacy_dinfo(dev->conf.blk);
-    }
-
-    ide_dev_initfn(dev, dinfo && dinfo->media_cd ? IDE_CD : IDE_HD, errp);
-}

I wonder whether we now could also make the "media" parameter of "-drive" as deprecated?

Anyway, for this patch:

#28 lore raw

PATCH 10/14 hw/scsi: remove 'scsi-disk' device

In reply to Daniel P. Berrangé

The 'scsi-hd' and 'scsi-cd' devices provide suitable alternatives.

---
 docs/system/deprecated.rst       |  9 -----
 docs/system/removed-features.rst |  6 ++++
 hw/i386/pc.c                     |  1 -
 hw/scsi/scsi-disk.c              | 62 --------------------------------
 hw/sparc64/sun4u.c               |  1 -
 scripts/device-crash-test        |  1 -
 tests/qemu-iotests/051           |  2 --
 tests/qemu-iotests/051.pc.out    | 10 ------
 8 files changed, 6 insertions(+), 86 deletions(-)
docs/system/deprecated.rst +0 -9
index f5c82a46dc..cb88fea94f 100644
@@ -239,15 +239,6 @@ The ``I7200`` guest CPU relies on the nanoMIPS ISA, which is deprecated
 (the ISA has never been upstreamed to a compiler toolchain). Therefore
 this CPU is also deprecated.
 
-System emulator devices
------------------------
-
-``scsi-disk`` (since 4.2)
-'''''''''''''''''''''''''
-
-The 'scsi-disk' device is deprecated. Users should use 'scsi-hd' or
-'scsi-cd' as appropriate to get a SCSI hard disk or CD-ROM as needed.
-
 System emulator machines
 ------------------------
 
docs/system/removed-features.rst +6 -0
index 8fd3fafb32..bb6bc8dfc8 100644
@@ -222,6 +222,12 @@ System emulator devices
 The 'ide-drive' device has been removed. Users should use 'ide-hd' or
 'ide-cd' as appropriate to get an IDE hard disk or CD-ROM as needed.
 
+``scsi-disk`` (removed in 6.0)
+''''''''''''''''''''''''''''''
+
+The 'scsi-disk' device is deprecated. Users should use 'scsi-hd' or
+'scsi-cd' as appropriate to get a SCSI hard disk or CD-ROM as needed.
+
 Related binaries
 ----------------
 
hw/i386/pc.c +0 -1
index 828122e21e..28a77df0d0 100644
@@ -339,7 +339,6 @@ GlobalProperty pc_compat_1_4[] = {
     PC_CPU_MODEL_IDS("1.4.0")
     { "scsi-hd", "discard_granularity", "0" },
     { "scsi-cd", "discard_granularity", "0" },
-    { "scsi-disk", "discard_granularity", "0" },
     { "ide-hd", "discard_granularity", "0" },
     { "ide-cd", "discard_granularity", "0" },
     { "virtio-blk-pci", "discard_granularity", "0" },
hw/scsi/scsi-disk.c +0 -62

80 lines not on this page · raw message

hw/sparc64/sun4u.c +0 -1
index d7c27144ba..cda7df36e3 100644
@@ -749,7 +749,6 @@ static char *sun4u_fw_dev_path(FWPathProvider *p, BusState *bus,
                                DeviceState *dev)
 {
     PCIDevice *pci;
-    int bus_id;
 
     if (!strcmp(object_get_typename(OBJECT(dev)), "pbm-bridge")) {
         pci = PCI_DEVICE(dev);
scripts/device-crash-test +0 -1
index 3981209165..6d809ac711 100755
@@ -93,7 +93,6 @@ ERROR_RULE_LIST = [
     {'device':'pci-bridge-seat', 'expected':True},         # Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0.
     {'device':'pxb', 'expected':True},                     # Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0.
     {'device':'scsi-block', 'expected':True},              # drive property not set
-    {'device':'scsi-disk', 'expected':True},               # drive property not set
     {'device':'scsi-generic', 'expected':True},            # drive property not set
     {'device':'scsi-hd', 'expected':True},                 # drive property not set
     {'device':'spapr-pci-host-bridge', 'expected':True},   # BUID not specified for PHB
tests/qemu-iotests/051 +0 -2
index 8b334fe41d..f92161d8ef 100755
@@ -186,7 +186,6 @@ case "$QEMU_DEFAULT_MACHINE" in
         run_qemu -drive if=none,id=disk -device ide-cd,drive=disk
         run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
         run_qemu -drive if=none,id=disk -device ide-hd,drive=disk
-        run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
         run_qemu -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
         ;;
      *)
@@ -238,7 +237,6 @@ case "$QEMU_DEFAULT_MACHINE" in
         run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-cd,drive=disk
         run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-cd,drive=disk
         run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device ide-hd,drive=disk
-        run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk
         run_qemu -drive file="$TEST_IMG",if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
         ;;
      *)
tests/qemu-iotests/051.pc.out +0 -10
index 2e23a4caa0..845fe0149f 100644
@@ -160,11 +160,6 @@ Testing: -drive if=none,id=disk -device ide-hd,drive=disk
 QEMU X.Y.Z monitor - type 'help' for more information
 (qemu) QEMU_PROG: -device ide-hd,drive=disk: Device needs media, but drive is empty
 
-Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device scsi-disk,drive=disk: warning: 'scsi-disk' is deprecated, please use 'scsi-hd' or 'scsi-cd' instead
-QEMU_PROG: -device scsi-disk,drive=disk: Device needs media, but drive is empty
-
 Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
 QEMU X.Y.Z monitor - type 'help' for more information
 (qemu) QEMU_PROG: -device scsi-hd,drive=disk: Device needs media, but drive is empty
@@ -227,11 +222,6 @@ Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-hd
 QEMU X.Y.Z monitor - type 'help' for more information
 (qemu) QEMU_PROG: -device ide-hd,drive=disk: Block node is read-only
 
-Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk
-QEMU X.Y.Z monitor - type 'help' for more information
-(qemu) QEMU_PROG: -device scsi-disk,drive=disk: warning: 'scsi-disk' is deprecated, please use 'scsi-hd' or 'scsi-cd' instead
-quit
-
 Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
 QEMU X.Y.Z monitor - type 'help' for more information
 (qemu) quit
Signature · 1 line
2.29.2
#29 lore raw

Re: [PATCH 10/14] hw/scsi: remove 'scsi-disk' device

Quoted 13 lines · Daniel P. Berrangé

The 'scsi-hd' and 'scsi-cd' devices provide suitable alternatives.

---
  docs/system/deprecated.rst       |  9 -----
  docs/system/removed-features.rst |  6 ++++
  hw/i386/pc.c                     |  1 -
  hw/scsi/scsi-disk.c              | 62 --------------------------------
  hw/sparc64/sun4u.c               |  1 -
  scripts/device-crash-test        |  1 -
  tests/qemu-iotests/051           |  2 --
  tests/qemu-iotests/051.pc.out    | 10 ------
  8 files changed, 6 insertions(+), 86 deletions(-)

I see some occurrances of "scsi-disk" in the config files in the docs/config/ directory, too ... I guess they should also be removed?

hw/sparc64/sun4u.c static char *sun4u_fw_dev_path(FWPathProvider *p, BusState *bus, · line 754

Quoted 12 lines
hw/sparc64/sun4u.c +0 -1
index d7c27144ba..cda7df36e3 100644
@@ -749,7 +749,6 @@ static char *sun4u_fw_dev_path(FWPathProvider *p, BusState *bus,
                                 DeviceState *dev)
  {
      PCIDevice *pci;
-    int bus_id;
 
      if (!strcmp(object_get_typename(OBJECT(dev)), "pbm-bridge")) {
          pci = PCI_DEVICE(dev);

This lonely hunk should be squashed into the previous (ide-disk) patch instead.

Thomas

#30 lore raw

Re: [PATCH 10/14] hw/scsi: remove 'scsi-disk' device

Quoted 15 lines · Thomas Huth
Quoted 13 lines · Daniel P. Berrangé

The 'scsi-hd' and 'scsi-cd' devices provide suitable alternatives.

---
  docs/system/deprecated.rst       |  9 -----
  docs/system/removed-features.rst |  6 ++++
  hw/i386/pc.c                     |  1 -
  hw/scsi/scsi-disk.c              | 62 --------------------------------
  hw/sparc64/sun4u.c               |  1 -
  scripts/device-crash-test        |  1 -
  tests/qemu-iotests/051           |  2 --
  tests/qemu-iotests/051.pc.out    | 10 ------
  8 files changed, 6 insertions(+), 86 deletions(-)
Quoted 2 lines

I see some occurrances of "scsi-disk" in the config files in the docs/config/ directory, too ... I guess they should also be removed?

Those aren't referring to the "scsi-disk" device type, they are qdev IDs, and do indeed already use "scsi-hd" as the device type.

Quoted 15 lines

hw/sparc64/sun4u.c static char *sun4u_fw_dev_path(FWPathProvider *p, BusState *bus, · line 753

Quoted 12 lines
hw/sparc64/sun4u.c +0 -1
index d7c27144ba..cda7df36e3 100644
@@ -749,7 +749,6 @@ static char *sun4u_fw_dev_path(FWPathProvider *p, BusState *bus,
                                 DeviceState *dev)
  {
      PCIDevice *pci;
-    int bus_id;
      if (!strcmp(object_get_typename(OBJECT(dev)), "pbm-bridge")) {
          pci = PCI_DEVICE(dev);

This lonely hunk should be squashed into the previous (ide-disk) patch instead.

Quoted 1 line

Thomas

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Reviewed-by on v1 10/14
#31 lore raw

Re: [PATCH 10/14] hw/scsi: remove 'scsi-disk' device

In reply to Daniel P. Berrangé
Quoted 39 lines · Daniel P. Berrangé

The 'scsi-hd' and 'scsi-cd' devices provide suitable alternatives.

---
  docs/system/deprecated.rst       |  9 -----
  docs/system/removed-features.rst |  6 ++++
  hw/i386/pc.c                     |  1 -
  hw/scsi/scsi-disk.c              | 62 --------------------------------
  hw/sparc64/sun4u.c               |  1 -
  scripts/device-crash-test        |  1 -
  tests/qemu-iotests/051           |  2 --
  tests/qemu-iotests/051.pc.out    | 10 ------
  8 files changed, 6 insertions(+), 86 deletions(-)
docs/system/deprecated.rst +0 -9
index f5c82a46dc..cb88fea94f 100644
@@ -239,15 +239,6 @@ The ``I7200`` guest CPU relies on the nanoMIPS ISA, which is deprecated
  (the ISA has never been upstreamed to a compiler toolchain). Therefore
  this CPU is also deprecated.
 
-System emulator devices
------------------------
-
-``scsi-disk`` (since 4.2)
-'''''''''''''''''''''''''
-
-The 'scsi-disk' device is deprecated. Users should use 'scsi-hd' or
-'scsi-cd' as appropriate to get a SCSI hard disk or CD-ROM as needed.
-
  System emulator machines
  ------------------------
 
docs/system/removed-features.rst +0 -0
index 8fd3fafb32..bb6bc8dfc8 100644

docs/system/removed-features.rst System emulator devices · line 229

Quoted 8 lines
docs/system/removed-features.rst +5 -0
@@ -222,6 +222,12 @@ System emulator devices
  The 'ide-drive' device has been removed. Users should use 'ide-hd' or
  'ide-cd' as appropriate to get an IDE hard disk or CD-ROM as needed.
 
+``scsi-disk`` (removed in 6.0)
+''''''''''''''''''''''''''''''
+
+The 'scsi-disk' device is deprecated. Users should use 'scsi-hd' or
+'scsi-cd' as appropriate to get a SCSI hard disk or CD-ROM as needed.

s/is deprecated/has been removed/

hw/sparc64/sun4u.c static char *sun4u_fw_dev_path(FWPathProvider *p, BusState *bus, · line 754

Quoted 12 lines
hw/sparc64/sun4u.c +0 -1
index d7c27144ba..cda7df36e3 100644
@@ -749,7 +749,6 @@ static char *sun4u_fw_dev_path(FWPathProvider *p, BusState *bus,
                                 DeviceState *dev)
  {
      PCIDevice *pci;
-    int bus_id;
 
      if (!strcmp(object_get_typename(OBJECT(dev)), "pbm-bridge")) {
          pci = PCI_DEVICE(dev);

Please squash this hunk into the 'ide-drive' patch instead.

With the two nits fixed:

#32 lore raw

PATCH 11/14 block: remove 'encryption_key_missing' flag from QAPI

In reply to Daniel P. Berrangé

This has been hardcoded to "false" since 2.10.0, since secrets required to unlock block devices are now always provided upfront instead of using interactive prompts.

---
 block/qapi.c                     |  1 -
 docs/system/deprecated.rst       | 10 -------
 docs/system/removed-features.rst | 10 +++++++
 qapi/block-core.json             |  8 ------
 tests/qemu-iotests/184.out       |  6 ++--
 tests/qemu-iotests/191.out       | 48 +++++++++++---------------------
 tests/qemu-iotests/273.out       | 15 ++++------
 7 files changed, 33 insertions(+), 65 deletions(-)
block/qapi.c +0 -1
index 84a0aadc09..3acc118c44 100644
@@ -62,7 +62,6 @@ BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk,
     info->ro                     = bs->read_only;
     info->drv                    = g_strdup(bs->drv->format_name);
     info->encrypted              = bs->encrypted;
-    info->encryption_key_missing = false;
 
     info->cache = g_new(BlockdevCacheInfo, 1);
     *info->cache = (BlockdevCacheInfo) {
docs/system/deprecated.rst +0 -10
index cb88fea94f..e746a63edf 100644
@@ -147,16 +147,6 @@ Use argument ``id`` instead.
 
 Use argument ``id`` instead.
 
-``query-named-block-nodes`` result ``encryption_key_missing`` (since 2.10.0)
-''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-Always false.
-
-``query-block`` result ``inserted.encryption_key_missing`` (since 2.10.0)
-'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-Always false.
-
 ``blockdev-add`` empty string argument ``backing`` (since 2.10.0)
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
docs/system/removed-features.rst +10 -0
index bb6bc8dfc8..583f14f02e 100644
@@ -112,6 +112,16 @@ chardev client socket with ``wait`` option (removed in 6.0)
 Character devices creating sockets in client mode should not specify
 the 'wait' field, which is only applicable to sockets in server mode
 
+``query-named-block-nodes`` result ``encryption_key_missing`` (removed in 6.0)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+Always false.
+
+``query-block`` result ``inserted.encryption_key_missing`` (removed in 6.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+Removed with no replacement
+
 Human Monitor Protocol (HMP) commands
 -------------------------------------
 
qapi/block-core.json +0 -8
index 9f555d5c1d..d256b7b776 100644
@@ -319,8 +319,6 @@
 #
 # @encrypted: true if the backing device is encrypted
 #
-# @encryption_key_missing: always false
-#
 # @detect_zeroes: detect and optimize zero writes (Since 2.1)
 #
 # @bps: total throughput limit in bytes per second is specified
@@ -385,10 +383,6 @@
 # @dirty-bitmaps: dirty bitmaps information (only present if node
 #                 has one or more dirty bitmaps) (Since 4.2)
 #
-# Features:
-# @deprecated: Member @encryption_key_missing is deprecated.  It is
-#              always false.
-#
 # Since: 0.14
 #
 ##
@@ -396,8 +390,6 @@
   'data': { 'file': 'str', '*node-name': 'str', 'ro': 'bool', 'drv': 'str',
             '*backing_file': 'str', 'backing_file_depth': 'int',
             'encrypted': 'bool',
-            'encryption_key_missing': { 'type': 'bool',
-                                        'features': [ 'deprecated' ] },
             'detect_zeroes': 'BlockdevDetectZeroesOptions',
             'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
tests/qemu-iotests/184.out +2 -4
index 87c73070e3..77e5489d65 100644
@@ -54,8 +54,7 @@ Testing:
                 "direct": false,
                 "writeback": true
             },
-            "file": "json:{\"throttle-group\": \"group0\", \"driver\": \"throttle\", \"file\": {\"driver\": \"null-co\"}}",
-            "encryption_key_missing": false
+            "file": "json:{\"throttle-group\": \"group0\", \"driver\": \"throttle\", \"file\": {\"driver\": \"null-co\"}}"
         },
         {
             "iops_rd": 0,
@@ -82,8 +81,7 @@ Testing:
                 "direct": false,
                 "writeback": true
             },
-            "file": "null-co://",
-            "encryption_key_missing": false
+            "file": "null-co://"
         }
     ]
 }
tests/qemu-iotests/191.out +16 -32

144 lines not on this page · raw message

tests/qemu-iotests/273.out +5 -10
index 8247cbaea1..4e840b6730 100644
@@ -69,8 +69,7 @@ Testing: -blockdev file,node-name=base,filename=TEST_DIR/t.IMGFMT.base -blockdev
                 "direct": false,
                 "writeback": true
             },
-            "file": "TEST_DIR/t.IMGFMT",
-            "encryption_key_missing": false
+            "file": "TEST_DIR/t.IMGFMT"
         },
         {
             "iops_rd": 0,
@@ -98,8 +97,7 @@ Testing: -blockdev file,node-name=base,filename=TEST_DIR/t.IMGFMT.base -blockdev
                 "direct": false,
                 "writeback": true
             },
-            "file": "TEST_DIR/t.IMGFMT",
-            "encryption_key_missing": false
+            "file": "TEST_DIR/t.IMGFMT"
         },
         {
             "iops_rd": 0,
@@ -139,8 +137,7 @@ Testing: -blockdev file,node-name=base,filename=TEST_DIR/t.IMGFMT.base -blockdev
                 "direct": false,
                 "writeback": true
             },
-            "file": "TEST_DIR/t.IMGFMT.mid",
-            "encryption_key_missing": false
+            "file": "TEST_DIR/t.IMGFMT.mid"
         },
         {
             "iops_rd": 0,
@@ -168,8 +165,7 @@ Testing: -blockdev file,node-name=base,filename=TEST_DIR/t.IMGFMT.base -blockdev
                 "direct": false,
                 "writeback": true
             },
-            "file": "TEST_DIR/t.IMGFMT.mid",
-            "encryption_key_missing": false
+            "file": "TEST_DIR/t.IMGFMT.mid"
         },
         {
             "iops_rd": 0,
@@ -197,8 +193,7 @@ Testing: -blockdev file,node-name=base,filename=TEST_DIR/t.IMGFMT.base -blockdev
                 "direct": false,
                 "writeback": true
             },
-            "file": "TEST_DIR/t.IMGFMT.base",
-            "encryption_key_missing": false
+            "file": "TEST_DIR/t.IMGFMT.base"
         }
     ]
 }
Signature · 1 line
2.29.2
Reviewed-by on v1 11/14
#33 lore raw

Re: [PATCH 11/14] block: remove 'encryption_key_missing' flag from QAPI

Quoted 53 lines · Daniel P. Berrangé

This has been hardcoded to "false" since 2.10.0, since secrets required to unlock block devices are now always provided upfront instead of using interactive prompts.

---
  block/qapi.c                     |  1 -
  docs/system/deprecated.rst       | 10 -------
  docs/system/removed-features.rst | 10 +++++++
  qapi/block-core.json             |  8 ------
  tests/qemu-iotests/184.out       |  6 ++--
  tests/qemu-iotests/191.out       | 48 +++++++++++---------------------
  tests/qemu-iotests/273.out       | 15 ++++------
  7 files changed, 33 insertions(+), 65 deletions(-)
block/qapi.c +0 -1
index 84a0aadc09..3acc118c44 100644
@@ -62,7 +62,6 @@ BlockDeviceInfo *bdrv_block_device_info(BlockBackend *blk,
      info->ro                     = bs->read_only;
      info->drv                    = g_strdup(bs->drv->format_name);
      info->encrypted              = bs->encrypted;
-    info->encryption_key_missing = false;
 
      info->cache = g_new(BlockdevCacheInfo, 1);
      *info->cache = (BlockdevCacheInfo) {
docs/system/deprecated.rst +0 -10
index cb88fea94f..e746a63edf 100644
@@ -147,16 +147,6 @@ Use argument ``id`` instead.
 
  Use argument ``id`` instead.
 
-``query-named-block-nodes`` result ``encryption_key_missing`` (since 2.10.0)
-''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-Always false.
-
-``query-block`` result ``inserted.encryption_key_missing`` (since 2.10.0)
-'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-Always false.
-
  ``blockdev-add`` empty string argument ``backing`` (since 2.10.0)
  '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
docs/system/removed-features.rst +0 -0
index bb6bc8dfc8..583f14f02e 100644

docs/system/removed-features.rst chardev client socket with ``wait`` option (removed in 6.0) · line 118

Quoted 7 lines
docs/system/removed-features.rst +4 -0
@@ -112,6 +112,16 @@ chardev client socket with ``wait`` option (removed in 6.0)
  Character devices creating sockets in client mode should not specify
  the 'wait' field, which is only applicable to sockets in server mode
 
+``query-named-block-nodes`` result ``encryption_key_missing`` (removed in 6.0)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+Always false.

Should that be "Removed with no replacement", too ? (just like the one below)

docs/system/removed-features.rst chardev client socket with ``wait`` option (removed in 6.0) · line 124

Quoted 5 lines
docs/system/removed-features.rst +5 -0
+``query-block`` result ``inserted.encryption_key_missing`` (removed in 6.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+Removed with no replacement
+

Apart from that nit:

#34 lore raw
In reply to Daniel P. Berrangé
Quoted 22 lines · Daniel P. Berrangé

The following features have been deprecated for well over the 2 release cycle we promise

   ``-usbdevice`` (since 2.10.0)
   ``-drive file=3Djson:{...{'driver':'file'}}`` (since 3.0)
   ``-vnc acl`` (since 4.0.0)
   ``-mon ...,control=3Dreadline,pretty=3Don|off`` (since 4.1)
   ``migrate_set_downtime`` and ``migrate_set_speed`` (since 2.8.0)
   ``query-named-block-nodes`` result ``encryption_key_missing`` (since 2.10.0)
   ``query-block`` result ``inserted.encryption_key_missing`` (since 2.10.0)
   ``migrate-set-cache-size`` and ``query-migrate-cache-size`` (since 2.11.0)
   ``query-named-block-nodes`` and ``query-block`` result dirty-bitmaps[i].sta=

tus (ince 4.0)
``query-cpus`` (since 2.12.0)
``query-cpus-fast`` ``arch`` output member (since 3.0.0) ``query-events`` (since 4.0)
chardev client socket with ``wait`` option (since 4.0) ``acl_show``, ``acl_reset``, ``acl_policy``, ``acl_add``, ``acl_remove`` (s=
ince 4.0.0)
``ide-drive`` (since 4.2)
``scsi-disk`` (since 4.2)

Quoted 1 line

AFAICT, libvirt has ceased to use all of these too.

No objections except possibly for -usbdevice.

Paolo

#35 lore raw

PATCH 12/14 block: remove dirty bitmaps 'status' field

In reply to Daniel P. Berrangé

The same information is available via the 'recording' and 'busy' fields.

---
 block/dirty-bitmap.c             |  38 ----
 docs/system/deprecated.rst       |   7 -
 docs/system/removed-features.rst |   7 +
 include/block/dirty-bitmap.h     |   1 -
 qapi/block-core.json             |  45 ----
 tests/qemu-iotests/124           |   4 -
 tests/qemu-iotests/194.out       |   4 +-
 tests/qemu-iotests/236.out       |  42 ++--
 tests/qemu-iotests/246.out       |  66 ++----
 tests/qemu-iotests/254.out       |   9 +-
 tests/qemu-iotests/257.out       | 378 +++++++++++--------------------
 11 files changed, 174 insertions(+), 427 deletions(-)
block/dirty-bitmap.c +0 -38
index 9b9cd71238..085aa343e1 100644
@@ -166,43 +166,6 @@ bool bdrv_dirty_bitmap_enabled(BdrvDirtyBitmap *bitmap)
     return !bitmap->disabled;
 }
 
-/**
- * bdrv_dirty_bitmap_status: This API is now deprecated.
- * Called with BQL taken.
- *
- * A BdrvDirtyBitmap can be in four possible user-visible states:
- * (1) Active:   successor is NULL, and disabled is false: full r/w mode
- * (2) Disabled: successor is NULL, and disabled is true: qualified r/w mode,
- *               guest writes are dropped, but monitor writes are possible,
- *               through commands like merge and clear.
- * (3) Frozen:   successor is not NULL.
- *               A frozen bitmap cannot be renamed, deleted, cleared, set,
- *               enabled, merged to, etc. A frozen bitmap can only abdicate()
- *               or reclaim().
- *               In this state, the anonymous successor bitmap may be either
- *               Active and recording writes from the guest (e.g. backup jobs),
- *               or it can be Disabled and not recording writes.
- * (4) Locked:   Whether Active or Disabled, the user cannot modify this bitmap
- *               in any way from the monitor.
- * (5) Inconsistent: This is a persistent bitmap whose "in use" bit is set, and
- *                   is unusable by QEMU. It can be deleted to remove it from
- *                   the qcow2.
- */
-DirtyBitmapStatus bdrv_dirty_bitmap_status(BdrvDirtyBitmap *bitmap)
-{
-    if (bdrv_dirty_bitmap_inconsistent(bitmap)) {
-        return DIRTY_BITMAP_STATUS_INCONSISTENT;
-    } else if (bdrv_dirty_bitmap_has_successor(bitmap)) {
-        return DIRTY_BITMAP_STATUS_FROZEN;
-    } else if (bdrv_dirty_bitmap_busy(bitmap)) {
-        return DIRTY_BITMAP_STATUS_LOCKED;
-    } else if (!bdrv_dirty_bitmap_enabled(bitmap)) {
-        return DIRTY_BITMAP_STATUS_DISABLED;
-    } else {
-        return DIRTY_BITMAP_STATUS_ACTIVE;
-    }
-}
-
 /* Called with BQL taken.  */
 static bool bdrv_dirty_bitmap_recording(BdrvDirtyBitmap *bitmap)
 {
@@ -582,7 +545,6 @@ BlockDirtyInfoList *bdrv_query_dirty_bitmaps(BlockDriverState *bs)
         info->granularity = bdrv_dirty_bitmap_granularity(bm);
         info->has_name = !!bm->name;
         info->name = g_strdup(bm->name);
-        info->status = bdrv_dirty_bitmap_status(bm);
         info->recording = bdrv_dirty_bitmap_recording(bm);
         info->busy = bdrv_dirty_bitmap_busy(bm);
         info->persistent = bm->persistent;
docs/system/deprecated.rst +0 -7
index e746a63edf..a8ac104c19 100644
@@ -162,13 +162,6 @@ Use arguments ``base-node`` and ``top-node`` instead.
 
 Specify the properties for the object as top-level arguments instead.
 
-``query-named-block-nodes`` and ``query-block`` result dirty-bitmaps[i].status (since 4.0)
-''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-The ``status`` field of the ``BlockDirtyInfo`` structure, returned by
-these commands is deprecated. Two new boolean fields, ``recording`` and
-``busy`` effectively replace it.
-
 ``query-block`` result field ``dirty-bitmaps`` (Since 4.2)
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
docs/system/removed-features.rst +7 -0
index 583f14f02e..725a316a4e 100644
@@ -122,6 +122,13 @@ Always false.
 
 Removed with no replacement
 
+``query-named-block-nodes`` and ``query-block`` result dirty-bitmaps[i].status (removed in 6.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+The ``status`` field of the ``BlockDirtyInfo`` structure, returned by
+these commands is deprecated. Two new boolean fields, ``recording`` and
+``busy`` effectively replace it.
+
 Human Monitor Protocol (HMP) commands
 -------------------------------------
 
include/block/dirty-bitmap.h +0 -1
index 36e8da4fc2..71374fba95 100644
@@ -46,7 +46,6 @@ bool bdrv_dirty_bitmap_enabled(BdrvDirtyBitmap *bitmap);
 bool bdrv_dirty_bitmap_has_successor(BdrvDirtyBitmap *bitmap);
 const char *bdrv_dirty_bitmap_name(const BdrvDirtyBitmap *bitmap);
 int64_t bdrv_dirty_bitmap_size(const BdrvDirtyBitmap *bitmap);
-DirtyBitmapStatus bdrv_dirty_bitmap_status(BdrvDirtyBitmap *bitmap);
 void bdrv_set_dirty_bitmap(BdrvDirtyBitmap *bitmap,
                            int64_t offset, int64_t bytes);
 void bdrv_reset_dirty_bitmap(BdrvDirtyBitmap *bitmap,
qapi/block-core.json +0 -45

68 lines not on this page · raw message

tests/qemu-iotests/124 +0 -4
index 90cdbd8e24..845ab5303c 100755
@@ -348,7 +348,6 @@ class TestIncrementalBackup(TestIncrementalBackupBase):
                 'name': 'bitmap0',
                 'count': 458752,
                 'granularity': 65536,
-                'status': 'active',
                 'persistent': False
             }))
 
@@ -705,7 +704,6 @@ class TestIncrementalBackupBlkdebug(TestIncrementalBackupBase):
             drive0['id'], bitmap.name, {
                 'count': 458752,
                 'granularity': 65536,
-                'status': 'active',
                 'busy': False,
                 'recording': True
             }))
@@ -736,7 +734,6 @@ class TestIncrementalBackupBlkdebug(TestIncrementalBackupBase):
             drive0['id'], bitmap.name, {
                 'count': 458752,
                 'granularity': 65536,
-                'status': 'frozen',
                 'busy': True,
                 'recording': True
             }))
@@ -751,7 +748,6 @@ class TestIncrementalBackupBlkdebug(TestIncrementalBackupBase):
             drive0['id'], bitmap.name, {
                 'count': 0,
                 'granularity': 65536,
-                'status': 'active',
                 'busy': False,
                 'recording': True
             }))
tests/qemu-iotests/194.out +2 -2
index a51bdb2d4f..4e6df1565a 100644
@@ -24,6 +24,6 @@ Stopping the NBD server on destination...
 Wait for migration completion on target...
 {"data": {"status": "completed"}, "event": "MIGRATION", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}}
 Check bitmaps on source:
-[{"busy": false, "count": 0, "granularity": 65536, "name": "bitmap0", "persistent": false, "recording": true, "status": "active"}]
+[{"busy": false, "count": 0, "granularity": 65536, "name": "bitmap0", "persistent": false, "recording": true}]
 Check bitmaps on target:
-[{"busy": false, "count": 0, "granularity": 65536, "name": "bitmap0", "persistent": false, "recording": true, "status": "active"}]
+[{"busy": false, "count": 0, "granularity": 65536, "name": "bitmap0", "persistent": false, "recording": true}]
tests/qemu-iotests/236.out +14 -28

126 lines not on this page · raw message

tests/qemu-iotests/246.out +22 -44

198 lines not on this page · raw message

tests/qemu-iotests/254.out +3 -6
index d185c0532f..fe52da9338 100644
@@ -99,8 +99,7 @@ query-block: device = drive0, node-name = snap, dirty-bitmaps:
     "granularity": 65536,
     "name": "bitmap2",
     "persistent": true,
-    "recording": true,
-    "status": "active"
+    "recording": true
   },
   {
     "busy": false,
@@ -108,8 +107,7 @@ query-block: device = drive0, node-name = snap, dirty-bitmaps:
     "granularity": 65536,
     "name": "bitmap1",
     "persistent": true,
-    "recording": true,
-    "status": "active"
+    "recording": true
   },
   {
     "busy": false,
@@ -117,8 +115,7 @@ query-block: device = drive0, node-name = snap, dirty-bitmaps:
     "granularity": 65536,
     "name": "bitmap0",
     "persistent": false,
-    "recording": true,
-    "status": "active"
+    "recording": true
   }
 ]
 
tests/qemu-iotests/257.out +126 -252

1,134 lines not on this page · raw message

Signature · 1 line
2.29.2
#37 lore raw

PATCH 13/14 block: remove 'dirty-bitmaps' field from 'BlockInfo' struct

In reply to Daniel P. Berrangé

The same data is available in the 'BlockDeviceInfo' struct.

---
 block/qapi.c                     |  5 -----
 docs/system/deprecated.rst       | 13 -------------
 docs/system/removed-features.rst | 13 +++++++++++++
 qapi/block-core.json             | 11 +----------
 tests/qemu-iotests/194           |  4 ++--
 tests/qemu-iotests/236           |  2 +-
 tests/qemu-iotests/246           |  3 ++-
 tests/qemu-iotests/254           |  2 +-
 tests/qemu-iotests/260           |  5 +++--
 9 files changed, 23 insertions(+), 35 deletions(-)
block/qapi.c +0 -5
index 3acc118c44..943e7b15ad 100644
@@ -383,11 +383,6 @@ static void bdrv_query_info(BlockBackend *blk, BlockInfo **p_info,
         info->io_status = blk_iostatus(blk);
     }
 
-    if (bs && !QLIST_EMPTY(&bs->dirty_bitmaps)) {
-        info->has_dirty_bitmaps = true;
-        info->dirty_bitmaps = bdrv_query_dirty_bitmaps(bs);
-    }
-
     if (bs && bs->drv) {
         info->has_inserted = true;
         info->inserted = bdrv_block_device_info(blk, bs, false, errp);
docs/system/deprecated.rst +0 -13
index a8ac104c19..dc76584e02 100644
@@ -162,19 +162,6 @@ Use arguments ``base-node`` and ``top-node`` instead.
 
 Specify the properties for the object as top-level arguments instead.
 
-``query-block`` result field ``dirty-bitmaps`` (Since 4.2)
-''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-The ``dirty-bitmaps`` field of the ``BlockInfo`` structure, returned by
-the query-block command is itself now deprecated. The ``dirty-bitmaps``
-field of the ``BlockDeviceInfo`` struct should be used instead, which is the
-type of the ``inserted`` field in query-block replies, as well as the
-type of array items in query-named-block-nodes.
-
-Since the ``dirty-bitmaps`` field is optionally present in both the old and
-new locations, clients must use introspection to learn where to anticipate
-the field if/when it does appear in command output.
-
 ``nbd-server-add`` and ``nbd-server-remove`` (since 5.2)
 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
docs/system/removed-features.rst +13 -0
index 725a316a4e..990bf7e015 100644
@@ -129,6 +129,19 @@ The ``status`` field of the ``BlockDirtyInfo`` structure, returned by
 these commands is deprecated. Two new boolean fields, ``recording`` and
 ``busy`` effectively replace it.
 
+``query-block`` result field ``dirty-bitmaps`` (removed in 6.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+The ``dirty-bitmaps`` field of the ``BlockInfo`` structure, returned by
+the query-block command is itself now deprecated. The ``dirty-bitmaps``
+field of the ``BlockDeviceInfo`` struct should be used instead, which is the
+type of the ``inserted`` field in query-block replies, as well as the
+type of array items in query-named-block-nodes.
+
+Since the ``dirty-bitmaps`` field is optionally present in both the old and
+new locations, clients must use introspection to learn where to anticipate
+the field if/when it does appear in command output.
+
 Human Monitor Protocol (HMP) commands
 -------------------------------------
 
qapi/block-core.json +1 -10
index 2a0c345c2c..0399449e13 100644
@@ -539,9 +539,6 @@
 # @tray_open: True if the device's tray is open
 #             (only present if it has a tray)
 #
-# @dirty-bitmaps: dirty bitmaps information (only present if the
-#                 driver has one or more dirty bitmaps) (Since 2.0)
-#
 # @io-status: @BlockDeviceIoStatus. Only present if the device
 #             supports it and the VM is configured to stop on errors
 #             (supported device models: virtio-blk, IDE, SCSI except
@@ -550,18 +547,12 @@
 # @inserted: @BlockDeviceInfo describing the device if media is
 #            present
 #
-# Features:
-# @deprecated: Member @dirty-bitmaps is deprecated.  Use @inserted
-#              member @dirty-bitmaps instead.
-#
 # Since:  0.14
 ##
 { 'struct': 'BlockInfo',
   'data': {'device': 'str', '*qdev': 'str', 'type': 'str', 'removable': 'bool',
            'locked': 'bool', '*inserted': 'BlockDeviceInfo',
-           '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
-           '*dirty-bitmaps': { 'type': ['BlockDirtyInfo'],
-                               'features': [ 'deprecated' ] } } }
+           '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus' } }
 
 ##
 # @BlockMeasureInfo:
tests/qemu-iotests/194 +2 -2
index 3889266afa..e44b8df728 100755
@@ -95,7 +95,7 @@ with iotests.FilePath('source.img') as source_img_path, \
     iotests.log(event, filters=[iotests.filter_qmp_event])
 
     iotests.log('Check bitmaps on source:')
-    iotests.log(source_vm.qmp('query-block')['return'][0]['dirty-bitmaps'])
+    iotests.log(source_vm.qmp('query-block')['return'][0]['inserted']['dirty-bitmaps'])
 
     iotests.log('Check bitmaps on target:')
-    iotests.log(dest_vm.qmp('query-block')['return'][0]['dirty-bitmaps'])
+    iotests.log(dest_vm.qmp('query-block')['return'][0]['inserted']['dirty-bitmaps'])
tests/qemu-iotests/236 +1 -1
index f6c44517d6..20419bbb9e 100755
@@ -39,7 +39,7 @@ overwrite = [("0xab", "0",         "64k"), # Full overwrite
 
 def query_bitmaps(vm):
     res = vm.qmp("query-block")
-    return { "bitmaps": { device['device']: device.get('dirty-bitmaps', []) for
+    return { "bitmaps": { device['device']: device.get('inserted', {}).get('dirty-bitmaps', []) for
                           device in res['return'] } }
 
 with iotests.FilePath('img') as img_path, \
tests/qemu-iotests/246 +2 -1
index fa3102c546..5932a0e8a9 100755
@@ -30,7 +30,8 @@ gran_large = 128 * 1024
 
 def query_bitmaps(vm):
     res = vm.qmp("query-block")
-    return { "bitmaps": { device['device']: device.get('dirty-bitmaps', []) for
+    return { "bitmaps": { device['device']: device.get('inserted', {})
+                          .get('dirty-bitmaps', []) for
                           device in res['return'] } }
 
 with iotests.FilePath('img') as img_path, \
tests/qemu-iotests/254 +1 -1
index 49da948407..108bf5f894 100755
@@ -73,7 +73,7 @@ vm.qmp_log('transaction', indent=2, actions=[
 result = vm.qmp('query-block')['return'][0]
 log("query-block: device = {}, node-name = {}, dirty-bitmaps:".format(
     result['device'], result['inserted']['node-name']))
-log(result['dirty-bitmaps'], indent=2)
+log(result['inserted']['dirty-bitmaps'], indent=2)
 log("\nbitmaps in backing image:")
 log(result['inserted']['image']['backing-image']['format-specific'] \
     ['data']['bitmaps'], indent=2)
tests/qemu-iotests/260 +3 -2
index a35cb7b61f..2ec64a9b99 100755
@@ -32,8 +32,9 @@ size = 64 * 1024 * 3
 
 def print_bitmap(msg, vm):
     result = vm.qmp('query-block')['return'][0]
-    if 'dirty-bitmaps' in result:
-        bitmap = result['dirty-bitmaps'][0]
+    info = result.get("inserted", {})
+    if 'dirty-bitmaps' in info:
+        bitmap = info['dirty-bitmaps'][0]
         log('{}: name={} dirty-clusters={}'.format(msg, bitmap['name'],
             bitmap['count'] // 64 // 1024))
     else:
Signature · 1 line
2.29.2
#39 lore raw

PATCH 14/14 block: remove support for using "file" driver with block/char devices

In reply to Daniel P. Berrangé

The 'host_device' and 'host_cdrom' drivers must be used instead.

---
 block/file-posix.c               | 17 ++++++-----------
 docs/system/deprecated.rst       |  7 -------
 docs/system/removed-features.rst |  7 +++++++
 tests/qemu-iotests/226.out       | 10 +++++-----
 4 files changed, 18 insertions(+), 23 deletions(-)
block/file-posix.c +6 -11
index 05079b40ca..20e14f8e96 100644
@@ -719,15 +719,9 @@ static int raw_open_common(BlockDriverState *bs, QDict *options,
     }
 
     if (!device) {
-        if (S_ISBLK(st.st_mode)) {
-            warn_report("Opening a block device as a file using the '%s' "
-                        "driver is deprecated", bs->drv->format_name);
-        } else if (S_ISCHR(st.st_mode)) {
-            warn_report("Opening a character device as a file using the '%s' "
-                        "driver is deprecated", bs->drv->format_name);
-        } else if (!S_ISREG(st.st_mode)) {
-            error_setg(errp, "A regular file was expected by the '%s' driver, "
-                       "but something else was given", bs->drv->format_name);
+        if (!S_ISREG(st.st_mode)) {
+            error_setg(errp, "'%s' driver requires '%s' to be a regular file",
+                       bs->drv->format_name, bs->filename);
             ret = -EINVAL;
             goto fail;
         } else {
@@ -736,8 +730,9 @@ static int raw_open_common(BlockDriverState *bs, QDict *options,
         }
     } else {
         if (!(S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode))) {
-            error_setg(errp, "'%s' driver expects either "
-                       "a character or block device", bs->drv->format_name);
+            error_setg(errp, "'%s' driver requires '%s' to be either "
+                       "a character or block device",
+                       bs->drv->format_name, bs->filename);
             ret = -EINVAL;
             goto fail;
         }
docs/system/deprecated.rst +0 -7
index dc76584e02..3a86deb450 100644
@@ -21,13 +21,6 @@ deprecated.
 System emulator command line arguments
 --------------------------------------
 
-``-drive file=json:{...{'driver':'file'}}`` (since 3.0)
-'''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-The 'file' driver for drives is no longer appropriate for character or host
-devices and will only accept regular files (S_IFREG). The correct driver
-for these file types is 'host_cdrom' or 'host_device' as appropriate.
-
 ``QEMU_AUDIO_`` environment variables and ``-audio-help`` (since 4.0)
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
docs/system/removed-features.rst +7 -0
index 990bf7e015..1c9e384cb0 100644
@@ -59,6 +59,13 @@ would automatically enable USB support on the machine type.
 When using the new syntax, USB support must be explicitly
 enabled via the ``-machine usb=on`` argument.
 
+``-drive file=json:{...{'driver':'file'}}`` (removed 6.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+The 'file' driver for drives is no longer appropriate for character or host
+devices and will only accept regular files (S_IFREG). The correct driver
+for these file types is 'host_cdrom' or 'host_device' as appropriate.
+
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
 
tests/qemu-iotests/226.out +5 -5
index 42be973ff2..55504d29c4 100644
@@ -3,23 +3,23 @@ QA output created by 226
 === Testing with driver:file ===
 
 == Testing RO ==
-qemu-io: can't open: A regular file was expected by the 'file' driver, but something else was given
-qemu-io: warning: Opening a character device as a file using the 'file' driver is deprecated
+qemu-io: can't open: 'file' driver requires 'TEST_DIR/t.IMGFMT' to be a regular file
+qemu-io: can't open: 'file' driver requires '/dev/null' to be a regular file
 == Testing RW ==
 qemu-io: can't open: Could not open 'TEST_DIR/t.IMGFMT': Is a directory
-qemu-io: warning: Opening a character device as a file using the 'file' driver is deprecated
+qemu-io: can't open: 'file' driver requires '/dev/null' to be a regular file
 
 === Testing with driver:host_device ===
 
 == Testing RO ==
-qemu-io: can't open: 'host_device' driver expects either a character or block device
+qemu-io: can't open: 'host_device' driver requires 'TEST_DIR/t.IMGFMT' to be either a character or block device
 == Testing RW ==
 qemu-io: can't open: Could not open 'TEST_DIR/t.IMGFMT': Is a directory
 
 === Testing with driver:host_cdrom ===
 
 == Testing RO ==
-qemu-io: can't open: 'host_cdrom' driver expects either a character or block device
+qemu-io: can't open: 'host_cdrom' driver requires 'TEST_DIR/t.IMGFMT' to be either a character or block device
 == Testing RW ==
 qemu-io: can't open: Could not open 'TEST_DIR/t.IMGFMT': Is a directory
 
Signature · 1 line
2.29.2
#40 lore raw

Re: [PATCH 14/14] block: remove support for using "file" driver with block/char devices

Ping for anyone, especially block maintainers, willing to review this before soft freeze.

Quoted 117 lines · Daniel P. Berrangé

The 'host_device' and 'host_cdrom' drivers must be used instead.

---
 block/file-posix.c               | 17 ++++++-----------
 docs/system/deprecated.rst       |  7 -------
 docs/system/removed-features.rst |  7 +++++++
 tests/qemu-iotests/226.out       | 10 +++++-----
 4 files changed, 18 insertions(+), 23 deletions(-)
block/file-posix.c +6 -11
index 05079b40ca..20e14f8e96 100644
@@ -719,15 +719,9 @@ static int raw_open_common(BlockDriverState *bs, QDict *options,
     }
 
     if (!device) {
-        if (S_ISBLK(st.st_mode)) {
-            warn_report("Opening a block device as a file using the '%s' "
-                        "driver is deprecated", bs->drv->format_name);
-        } else if (S_ISCHR(st.st_mode)) {
-            warn_report("Opening a character device as a file using the '%s' "
-                        "driver is deprecated", bs->drv->format_name);
-        } else if (!S_ISREG(st.st_mode)) {
-            error_setg(errp, "A regular file was expected by the '%s' driver, "
-                       "but something else was given", bs->drv->format_name);
+        if (!S_ISREG(st.st_mode)) {
+            error_setg(errp, "'%s' driver requires '%s' to be a regular file",
+                       bs->drv->format_name, bs->filename);
             ret = -EINVAL;
             goto fail;
         } else {
@@ -736,8 +730,9 @@ static int raw_open_common(BlockDriverState *bs, QDict *options,
         }
     } else {
         if (!(S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode))) {
-            error_setg(errp, "'%s' driver expects either "
-                       "a character or block device", bs->drv->format_name);
+            error_setg(errp, "'%s' driver requires '%s' to be either "
+                       "a character or block device",
+                       bs->drv->format_name, bs->filename);
             ret = -EINVAL;
             goto fail;
         }
docs/system/deprecated.rst +0 -7
index dc76584e02..3a86deb450 100644
@@ -21,13 +21,6 @@ deprecated.
 System emulator command line arguments
 --------------------------------------
 
-``-drive file=json:{...{'driver':'file'}}`` (since 3.0)
-'''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-The 'file' driver for drives is no longer appropriate for character or host
-devices and will only accept regular files (S_IFREG). The correct driver
-for these file types is 'host_cdrom' or 'host_device' as appropriate.
-
 ``QEMU_AUDIO_`` environment variables and ``-audio-help`` (since 4.0)
 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
 
docs/system/removed-features.rst +7 -0
index 990bf7e015..1c9e384cb0 100644
@@ -59,6 +59,13 @@ would automatically enable USB support on the machine type.
 When using the new syntax, USB support must be explicitly
 enabled via the ``-machine usb=on`` argument.
 
+``-drive file=json:{...{'driver':'file'}}`` (removed 6.0)
+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+The 'file' driver for drives is no longer appropriate for character or host
+devices and will only accept regular files (S_IFREG). The correct driver
+for these file types is 'host_cdrom' or 'host_device' as appropriate.
+
 QEMU Machine Protocol (QMP) commands
 ------------------------------------
 
tests/qemu-iotests/226.out +5 -5
index 42be973ff2..55504d29c4 100644
@@ -3,23 +3,23 @@ QA output created by 226
 === Testing with driver:file ===
 
 == Testing RO ==
-qemu-io: can't open: A regular file was expected by the 'file' driver, but something else was given
-qemu-io: warning: Opening a character device as a file using the 'file' driver is deprecated
+qemu-io: can't open: 'file' driver requires 'TEST_DIR/t.IMGFMT' to be a regular file
+qemu-io: can't open: 'file' driver requires '/dev/null' to be a regular file
 == Testing RW ==
 qemu-io: can't open: Could not open 'TEST_DIR/t.IMGFMT': Is a directory
-qemu-io: warning: Opening a character device as a file using the 'file' driver is deprecated
+qemu-io: can't open: 'file' driver requires '/dev/null' to be a regular file
 
 === Testing with driver:host_device ===
 
 == Testing RO ==
-qemu-io: can't open: 'host_device' driver expects either a character or block device
+qemu-io: can't open: 'host_device' driver requires 'TEST_DIR/t.IMGFMT' to be either a character or block device
 == Testing RW ==
 qemu-io: can't open: Could not open 'TEST_DIR/t.IMGFMT': Is a directory
 
 === Testing with driver:host_cdrom ===
 
 == Testing RO ==
-qemu-io: can't open: 'host_cdrom' driver expects either a character or block device
+qemu-io: can't open: 'host_cdrom' driver requires 'TEST_DIR/t.IMGFMT' to be either a character or block device
 == Testing RW ==
 qemu-io: can't open: Could not open 'TEST_DIR/t.IMGFMT': Is a directory
 
Signature · 1 line
2.29.2

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Reviewed-by on v1 14/14
#41 lore raw

Re: [PATCH 14/14] block: remove support for using "file" driver with block/char devices

In reply to Daniel P. Berrangé
Quoted 12 lines · Daniel P. Berrangé

The 'host_device' and 'host_cdrom' drivers must be used instead.

---
 block/file-posix.c               | 17 ++++++-----------
 docs/system/deprecated.rst       |  7 -------
 docs/system/removed-features.rst |  7 +++++++
 tests/qemu-iotests/226.out       | 10 +++++-----
 4 files changed, 18 insertions(+), 23 deletions(-)
     if (!device) {

block/file-posix.c static int raw_open_common(BlockDriverState *bs, QDict *options, · line 722

Quoted 10 lines
block/file-posix.c +1 -9
-        if (S_ISBLK(st.st_mode)) {
-            warn_report("Opening a block device as a file using the '%s' "
-                        "driver is deprecated", bs->drv->format_name);
-        } else if (S_ISCHR(st.st_mode)) {
-            warn_report("Opening a character device as a file using the '%s' "
-                        "driver is deprecated", bs->drv->format_name);
-        } else if (!S_ISREG(st.st_mode)) {
-            error_setg(errp, "A regular file was expected by the '%s' driver, "
-                       "but something else was given", bs->drv->format_name);
+        if (!S_ISREG(st.st_mode)) {

We're testing with S_ISREG()...

docs/system/deprecated.rst deprecated. · line 28

Quoted 10 lines

+++ b/docs/system/deprecated.rst

docs/system/deprecated.rst +0 -5
@@ -21,13 +21,6 @@ deprecated.
 System emulator command line arguments
 --------------------------------------
 
-``-drive file=json:{...{'driver':'file'}}`` (since 3.0)
-'''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-The 'file' driver for drives is no longer appropriate for character or host
-devices and will only accept regular files (S_IFREG). The correct driver

but documented with S_IFREG(). Thankfully, the two have semantically equivalent purposes, so the difference doesn't invalidate the docs.

but I wouldn't mind if at least one other block maintainer chimes in.

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org
#42 lore raw
In reply to Daniel P. Berrangé
Quoted 8 lines · Daniel P. Berrangé

The following features have been deprecated for well over the 2 release cycle we promise

``-usbdevice`` (since 2.10.0)
``-drive file=3Djson:{...{'driver':'file'}}`` (since 3.0) ``-vnc acl`` (since 4.0.0)
``-mon ...,control=3Dreadline,pretty=3Don|off`` (since 4.1)

Are the literal '=3D' here intended ?

thanks
-- PMM

#43 lore raw
Quoted 11 lines · Peter Maydell
Quoted 8 lines · Daniel P. Berrangé

The following features have been deprecated for well over the 2 release cycle we promise

``-usbdevice`` (since 2.10.0)
``-drive file=3Djson:{...{'driver':'file'}}`` (since 3.0) ``-vnc acl`` (since 4.0.0)
``-mon ...,control=3Dreadline,pretty=3Don|off`` (since 4.1)

Are the literal '=3D' here intended ?

No, this is a git-publish bug:
https://github.com/stefanha/git-publish/issues/88

Apparently the fix is not yet backported to Fedora.

#44 lore raw
Quoted 11 lines · Philippe Mathieu-Daudé
Quoted 10 lines · Peter Maydell
Quoted 8 lines · Daniel P. Berrangé

The following features have been deprecated for well over the 2 release cycle we promise

``-usbdevice`` (since 2.10.0)
``-drive file=3Djson:{...{'driver':'file'}}`` (since 3.0) ``-vnc acl`` (since 4.0.0)
``-mon ...,control=3Dreadline,pretty=3Don|off`` (since 4.1)

Quoted 6 lines
Quoted 1 line

Are the literal '=3D' here intended ?

No, this is a git-publish bug:
https://github.com/stefanha/git-publish/issues/88

Apparently the fix is not yet backported to Fedora.

Thanks for reminding me. I'll roll a new git-publish release and package it in Fedora.

Stefan

#45 lore raw
In reply to Peter Maydell
Quoted 11 lines · Peter Maydell
Quoted 8 lines · Daniel P. Berrangé

The following features have been deprecated for well over the 2 release cycle we promise

``-usbdevice`` (since 2.10.0)
``-drive file=3Djson:{...{'driver':'file'}}`` (since 3.0) ``-vnc acl`` (since 4.0.0)
``-mon ...,control=3Dreadline,pretty=3Don|off`` (since 4.1)

Are the literal '=3D' here intended ?

git-publish has done something wierd to the cover letter encoding that I don't understand.

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#46 lore raw
In reply to Daniel P. Berrangé

Adding xen-devel and Ian to cc.

Quoted 2 lines · Daniel P. Berrangé

The following features have been deprecated for well over the 2 release cycle we promise

This reminded me of a bug report we received late last year when updating to 5.2.0. 'virsh setvcpus' suddenly stopped working for Xen HVM guests. Turns out libxl uses cpu-add under the covers.

Quoted 20 lines
   ``-usbdevice`` (since 2.10.0)
   ``-drive file=3Djson:{...{'driver':'file'}}`` (since 3.0)
   ``-vnc acl`` (since 4.0.0)
   ``-mon ...,control=3Dreadline,pretty=3Don|off`` (since 4.1)
   ``migrate_set_downtime`` and ``migrate_set_speed`` (since 2.8.0)
   ``query-named-block-nodes`` result ``encryption_key_missing`` (since 2.10.0)
   ``query-block`` result ``inserted.encryption_key_missing`` (since 2.10.0)
   ``migrate-set-cache-size`` and ``query-migrate-cache-size`` (since 2.11.0)
   ``query-named-block-nodes`` and ``query-block`` result dirty-bitmaps[i].sta=

tus (ince 4.0)
``query-cpus`` (since 2.12.0)
``query-cpus-fast`` ``arch`` output member (since 3.0.0) ``query-events`` (since 4.0)
chardev client socket with ``wait`` option (since 4.0) ``acl_show``, ``acl_reset``, ``acl_policy``, ``acl_add``, ``acl_remove`` (s=
ince 4.0.0)
``ide-drive`` (since 4.2)
``scsi-disk`` (since 4.2)

Quoted 1 line

AFAICT, libvirt has ceased to use all of these too.

A quick grep of the libxl code shows it uses -usbdevice, query-cpus, and scsi-disk.

Quoted 1 line

There are many more similarly old deprecations not (yet) tackled.

The Xen tools maintainers will need to be more vigilant of the deprecations. I don't follow Xen development close enough to know if this topic has already been discussed.

Regards,
Jim

#47 lore raw

Am 25.02.2021 um 18:32 hat Jim Fehlig geschrieben:

Quoted 32 lines

Adding xen-devel and Ian to cc.

Quoted 2 lines · Daniel P. Berrangé

The following features have been deprecated for well over the 2 release cycle we promise

This reminded me of a bug report we received late last year when updating to 5.2.0. 'virsh setvcpus' suddenly stopped working for Xen HVM guests. Turns out libxl uses cpu-add under the covers.

Quoted 20 lines
   ``-usbdevice`` (since 2.10.0)
   ``-drive file=3Djson:{...{'driver':'file'}}`` (since 3.0)
   ``-vnc acl`` (since 4.0.0)
   ``-mon ...,control=3Dreadline,pretty=3Don|off`` (since 4.1)
   ``migrate_set_downtime`` and ``migrate_set_speed`` (since 2.8.0)
   ``query-named-block-nodes`` result ``encryption_key_missing`` (since 2.10.0)
   ``query-block`` result ``inserted.encryption_key_missing`` (since 2.10.0)
   ``migrate-set-cache-size`` and ``query-migrate-cache-size`` (since 2.11.0)
   ``query-named-block-nodes`` and ``query-block`` result dirty-bitmaps[i].sta=

tus (ince 4.0)
``query-cpus`` (since 2.12.0)
``query-cpus-fast`` ``arch`` output member (since 3.0.0) ``query-events`` (since 4.0)
chardev client socket with ``wait`` option (since 4.0) ``acl_show``, ``acl_reset``, ``acl_policy``, ``acl_add``, ``acl_remove`` (s=
ince 4.0.0)
``ide-drive`` (since 4.2)
``scsi-disk`` (since 4.2)

Quoted 1 line

AFAICT, libvirt has ceased to use all of these too.

Quoted 7 lines

A quick grep of the libxl code shows it uses -usbdevice, query-cpus, and scsi-disk.

Quoted 1 line

There are many more similarly old deprecations not (yet) tackled.

The Xen tools maintainers will need to be more vigilant of the deprecations. I don't follow Xen development close enough to know if this topic has already been discussed.

MAINTAINERS has a section for "Incompatible changes" that covers docs/system/deprecated.rst. Maybe if the Xen maintainers are interested in that, we could add another list or individual people there so they would see patches that deprecate something?

But either way, it would probably be useful to check the full deprecation list rather than just what we're going to remove right now.

Kevin