[PATCH 1/4] docs/about: Belatedly document tightening of QMP device_add checking

Markus Armbruster posted 4 patches 3 months, 3 weeks ago
There is a newer version of this series
[PATCH 1/4] docs/about: Belatedly document tightening of QMP device_add checking
Posted by Markus Armbruster 3 months, 3 weeks ago
Commit 4d8b0f0a9536 (v6.2.0) deprecate incorrectly typed device_add
arguments.  Commit be93fd53723c (qdev-monitor: avoid QemuOpts in QMP
device_add) fixed them for v9.2.0, but neglected to update
documentation.  Do that now.

Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 docs/about/deprecated.rst       | 14 --------------
 docs/about/removed-features.rst |  9 +++++++++
 2 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index 44d3427e98..9665bc6fcf 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -187,20 +187,6 @@ threads (for example, it only reports source side of multifd threads,
 without reporting any destination threads, or non-multifd source threads).
 For debugging purpose, please use ``-name $VM,debug-threads=on`` instead.
 
-Incorrectly typed ``device_add`` arguments (since 6.2)
-''''''''''''''''''''''''''''''''''''''''''''''''''''''
-
-Due to shortcomings in the internal implementation of ``device_add``, QEMU
-incorrectly accepts certain invalid arguments: Any object or list arguments are
-silently ignored. Other argument types are not checked, but an implicit
-conversion happens, so that e.g. string values can be assigned to integer
-device properties or vice versa.
-
-This is a bug in QEMU that will be fixed in the future so that previously
-accepted incorrect commands will return an error. Users should make sure that
-all arguments passed to ``device_add`` are consistent with the documented
-property types.
-
 Host Architectures
 ------------------
 
diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst
index 063284d4f8..92b5ba6218 100644
--- a/docs/about/removed-features.rst
+++ b/docs/about/removed-features.rst
@@ -722,6 +722,15 @@ Use ``multifd-channels`` instead.
 
 Use ``multifd-compression`` instead.
 
+Incorrectly typed ``device_add`` arguments (since 9.2)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+Due to shortcomings in the internal implementation of ``device_add``,
+QEMU used to incorrectly accept certain invalid arguments. Any object
+or list arguments were silently ignored. Other argument types were not
+checked, but an implicit conversion happened, so that e.g. string
+values could be assigned to integer device properties or vice versa.
+
 QEMU Machine Protocol (QMP) events
 ----------------------------------
 
-- 
2.48.1
Re: [PATCH 1/4] docs/about: Belatedly document tightening of QMP device_add checking
Posted by Eric Blake via Devel 3 months, 2 weeks ago
On Wed, May 21, 2025 at 08:37:08AM +0200, Markus Armbruster via Devel wrote:
> Commit 4d8b0f0a9536 (v6.2.0) deprecate incorrectly typed device_add

deprecated

> arguments.  Commit be93fd53723c (qdev-monitor: avoid QemuOpts in QMP
> device_add) fixed them for v9.2.0, but neglected to update
> documentation.  Do that now.
> 
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org
Re: [PATCH 1/4] docs/about: Belatedly document tightening of QMP device_add checking
Posted by Markus Armbruster via Devel 3 months, 2 weeks ago
Eric Blake <eblake@redhat.com> writes:

> On Wed, May 21, 2025 at 08:37:08AM +0200, Markus Armbruster via Devel wrote:
>> Commit 4d8b0f0a9536 (v6.2.0) deprecate incorrectly typed device_add
>
> deprecated

Yes.  Thank you!

>> arguments.  Commit be93fd53723c (qdev-monitor: avoid QemuOpts in QMP
>> device_add) fixed them for v9.2.0, but neglected to update
>> documentation.  Do that now.
>> 
>> Cc: Stefan Hajnoczi <stefanha@redhat.com>
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Re: [PATCH 1/4] docs/about: Belatedly document tightening of QMP device_add checking
Posted by Stefan Hajnoczi via Devel 3 months, 3 weeks ago
On Wed, May 21, 2025 at 08:37:08AM +0200, Markus Armbruster wrote:
> Commit 4d8b0f0a9536 (v6.2.0) deprecate incorrectly typed device_add
> arguments.  Commit be93fd53723c (qdev-monitor: avoid QemuOpts in QMP
> device_add) fixed them for v9.2.0, but neglected to update
> documentation.  Do that now.
> 
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  docs/about/deprecated.rst       | 14 --------------
>  docs/about/removed-features.rst |  9 +++++++++
>  2 files changed, 9 insertions(+), 14 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>