Branch: refs/heads/staging Home: https://github.com/qemu/qemu Commit: 729222af149db3cfaaa5ef1c0773b5c632b7dbee https://github.com/qemu/qemu/commit/729222af149db3cfaaa5ef1c0773b5c632b7dbee Author: Stefano Garzarella <sgarz...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021)
Changed paths: M block.c Log Message: ----------- block: remove format defaults from QemuOpts in bdrv_create_file() QemuOpts is usually created merging the QemuOptsList of format and protocol. So, when the format calls bdr_create_file(), the 'opts' parameter contains a QemuOptsList with a combination of format and protocol default values. The format properly removes its options before calling bdr_create_file(), but the default values remain in 'opts->list'. So if the protocol has options with the same name (e.g. rbd has 'cluster_size' as qcow2), it will see the default values of the format, since for overlapping options, the format wins. To avoid this issue, lets convert QemuOpts to QDict, in this way we take only the set options, and then convert it back to QemuOpts, using the 'create_opts' of the protocol. So the new QemuOpts, will contain only the protocol defaults. Suggested-by: Kevin Wolf <kw...@redhat.com> Signed-off-by: Stefano Garzarella <sgarz...@redhat.com> Message-Id: <20210308161232.248833-1-sgarz...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: e21577707152c10017dcf4d3340e83b100057355 https://github.com/qemu/qemu/commit/e21577707152c10017dcf4d3340e83b100057355 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M storage-daemon/qemu-storage-daemon.c A tests/qemu-iotests/tests/qsd-jobs A tests/qemu-iotests/tests/qsd-jobs.out Log Message: ----------- storage-daemon: Call job_cancel_sync_all() on shutdown bdrv_close_all() asserts that no jobs are running any more, so we need to cancel all jobs first to avoid failing the assertion. Fixes: b55a3c8860b763b62b2cc2f4a6f55379977bbde5 Reported-by: Nini Gu <n...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Message-Id: <20210309121814.31078-1-kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 1bf26076d677f693dd99a6e8ef2eca69b842d873 https://github.com/qemu/qemu/commit/1bf26076d677f693dd99a6e8ef2eca69b842d873 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M block/stream.c M tests/qemu-iotests/tests/qsd-jobs M tests/qemu-iotests/tests/qsd-jobs.out Log Message: ----------- stream: Don't crash when node permission is denied The image streaming block job restricts shared permissions of the nodes it accesses. This can obviously fail when other users already got these permissions. &error_abort is therefore wrong and can crash. Handle these errors gracefully and just fail starting the block job. Reported-by: Nini Gu <n...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Message-Id: <20210309173451.45152-1-kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Alberto Garcia <be...@igalia.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 3663dca461131f7c8e58737feba8638e064bb5d4 https://github.com/qemu/qemu/commit/3663dca461131f7c8e58737feba8638e064bb5d4 Author: Max Reitz <mre...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M block/curl.c Log Message: ----------- curl: Store BDRVCURLState pointer in CURLSocket A socket does not really belong to any specific state. We do not need to store a pointer to "its" state in it, a pointer to the common BDRVCURLState is sufficient. Signed-off-by: Max Reitz <mre...@redhat.com> Message-Id: <20210309130541.37540-2-mre...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 0f418a207696b37f05d38f978c8873ee0a4f9815 https://github.com/qemu/qemu/commit/0f418a207696b37f05d38f978c8873ee0a4f9815 Author: Max Reitz <mre...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M block/curl.c Log Message: ----------- curl: Disconnect sockets from CURLState When a curl transfer is finished, that does not mean that CURL lets go of all the sockets it used for it. We therefore must not free a CURLSocket object before CURL has invoked curl_sock_cb() to tell us to remove it. Otherwise, we may get a use-after-free, as described in this bug report: https://bugs.launchpad.net/qemu/+bug/1916501 (Reproducer from that report: $ qemu-img convert -f qcow2 -O raw \ https://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img \ out.img ) (Alternatively, it might seem logical to force-drop all sockets that have been used for a state when the respective transfer is done, kind of like it is done now, but including unsetting the AIO handlers. Unfortunately, doing so makes the driver just hang instead of crashing, which seems to evidence that CURL still uses those sockets.) Make the CURLSocket object independent of "its" CURLState by putting all sockets into a hash table belonging to the BDRVCURLState instead of a list that belongs to a CURLState. Do not touch any sockets in curl_clean_state(). Testing, it seems like all sockets are indeed gone by the time the curl BDS is closed, so it seems like there really was no point in freeing any socket just because a transfer is done. libcurl does invoke curl_sock_cb() with CURL_POLL_REMOVE for every socket it has. Buglink: https://bugs.launchpad.net/qemu/+bug/1916501 Signed-off-by: Max Reitz <mre...@redhat.com> Message-Id: <20210309130541.37540-3-mre...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 6f4b1996b4cdc6b745bebae737c250f08c1ad965 https://github.com/qemu/qemu/commit/6f4b1996b4cdc6b745bebae737c250f08c1ad965 Author: Stefan Hajnoczi <stefa...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M block/export/vhost-user-blk-server.c Log Message: ----------- block/export: disable VHOST_USER_PROTOCOL_F_INFLIGHT_SHMFD for now The vhost-user in-flight shmfd feature has not been tested with qemu-storage-daemon's vhost-user-blk server. Disable this optional feature for now because it requires MFD_ALLOW_SEALING, which is not available in some CI environments. If we need this feature in the future it can be re-enabled after testing. Reported-by: Peter Maydell <peter.mayd...@linaro.org> Cc: Kevin Wolf <kw...@redhat.com> Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> Message-Id: <20210309094106.196911-2-stefa...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 9695c3af3a1e21c3489622083f2c588eb2f426fd https://github.com/qemu/qemu/commit/9695c3af3a1e21c3489622083f2c588eb2f426fd Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M tests/qtest/qmp-cmd-test.c M tests/qtest/test-netfilter.c Log Message: ----------- tests: Drop 'props' from object-add calls The 'props' option has been deprecated in 5.0 in favour of a flattened object-add command. Time to change our test cases to drop the deprecated option. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 50243407457a9fb0ed17b9a9ba9fc9aee09495b1 https://github.com/qemu/qemu/commit/50243407457a9fb0ed17b9a9ba9fc9aee09495b1 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M docs/system/deprecated.rst M docs/system/removed-features.rst M qapi/qom.json M qom/qom-qmp-cmds.c Log Message: ----------- qapi/qom: Drop deprecated 'props' from object-add The option has been deprecated in QEMU 5.0, remove it. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 2273b2410f876111ed97b5d2cd93d7f04b045432 https://github.com/qemu/qemu/commit/2273b2410f876111ed97b5d2cd93d7f04b045432 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M qapi/qom.json Log Message: ----------- qapi/qom: Add ObjectOptions for iothread Add an ObjectOptions union that will eventually describe the options of all user creatable object types. As unions can't exist without any branches, also add the first object type. This adds a QAPI schema for the properties of the iothread object. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 8825587b53c62f40375a2f63dfefd3adc6988eb1 https://github.com/qemu/qemu/commit/8825587b53c62f40375a2f63dfefd3adc6988eb1 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M qapi/authz.json M qapi/qom.json M storage-daemon/qapi/qapi-schema.json Log Message: ----------- qapi/qom: Add ObjectOptions for authz-* This adds a QAPI schema for the properties of the authz-* objects. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Acked-by: Daniel P. Berrangé <berra...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: a68d909ef943cc47b512cbd8890e0d90055bec05 https://github.com/qemu/qemu/commit/a68d909ef943cc47b512cbd8890e0d90055bec05 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M qapi/qom.json Log Message: ----------- qapi/qom: Add ObjectOptions for cryptodev-* This adds a QAPI schema for the properties of the cryptodev-* objects. These interfaces have some questionable aspects (cryptodev-backend is really an abstract base class without function, and the queues option only makes sense for cryptodev-vhost-user), but as the goal is to represent the existing interface in QAPI, leave these things in place. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: d7ef29c4ed0b09cb175b457851c1cf5f6b1d7513 https://github.com/qemu/qemu/commit/d7ef29c4ed0b09cb175b457851c1cf5f6b1d7513 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M qapi/qom.json Log Message: ----------- qapi/qom: Add ObjectOptions for dbus-vmstate This adds a QAPI schema for the properties of the dbus-vmstate object. A list represented as a comma separated string is clearly not very QAPI-like, but for now just describe the existing interface. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 913d9063e1447a71c948edef3534a8e9965297e3 https://github.com/qemu/qemu/commit/913d9063e1447a71c948edef3534a8e9965297e3 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M qapi/common.json M qapi/machine.json M qapi/qom.json Log Message: ----------- qapi/qom: Add ObjectOptions for memory-backend-* This adds a QAPI schema for the properties of the memory-backend-* objects. HostMemPolicy has to be moved to an include file that can be used by the storage daemon, too, because ObjectOptions must be the same in all binaries if we don't want to compile the whole code multiple times. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 6815bc1d03c1f883183b5a8b31861b15d951f2a4 https://github.com/qemu/qemu/commit/6815bc1d03c1f883183b5a8b31861b15d951f2a4 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M docs/system/deprecated.rst M qapi/qom.json Log Message: ----------- qapi/qom: Add ObjectOptions for rng-*, deprecate 'opened' This adds a QAPI schema for the properties of the rng-* objects. The 'opened' property doesn't seem to make sense as an external interface: It is automatically set to true in ucc->complete, and explicitly setting it to true earlier just means that trying to set additional options will result in an error. After the property has once been set to true (i.e. when the object construction has completed), it can never be reset to false. In other words, the 'opened' property is useless. Mark it as deprecated in the schema from the start. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 381bd7440d8178c9e56bac7086c9e3b0cad066ec https://github.com/qemu/qemu/commit/381bd7440d8178c9e56bac7086c9e3b0cad066ec Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M qapi/block-core.json M qapi/qom.json Log Message: ----------- qapi/qom: Add ObjectOptions for throttle-group This adds a QAPI schema for the properties of the throttle-group object. The only purpose of the x-* properties is to make the nested options in 'limits' available for a command line parser that doesn't support structs. Any parser that will use the QAPI schema will supports structs, though, so they will not be needed in the schema in the future. To keep the conversion straightforward, add them to the schema anyway. We can then remove the options and adjust documentation, test cases etc. in a separate patch. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 39c4c27d378af56059628a5cd803d390849f32e8 https://github.com/qemu/qemu/commit/39c4c27d378af56059628a5cd803d390849f32e8 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M docs/system/deprecated.rst M qapi/crypto.json M qapi/qom.json Log Message: ----------- qapi/qom: Add ObjectOptions for secret*, deprecate 'loaded' This adds a QAPI schema for the properties of the secret* objects. The 'loaded' property doesn't seem to make sense as an external interface: It is automatically set to true in ucc->complete, and explicitly setting it to true earlier just means that additional options will be silently ignored. In other words, the 'loaded' property is useless. Mark it as deprecated in the schema from the start. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Acked-by: Daniel P. Berrangé <berra...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: d09e49374b336d36a4223e8a411582128d3a3796 https://github.com/qemu/qemu/commit/d09e49374b336d36a4223e8a411582128d3a3796 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M qapi/crypto.json M qapi/qom.json Log Message: ----------- qapi/qom: Add ObjectOptions for tls-*, deprecate 'loaded' This adds a QAPI schema for the properties of the tls-* objects. The 'loaded' property doesn't seem to make sense as an external interface: It is automatically set to true in ucc->complete, and explicitly setting it to true earlier just means that additional options will be silently ignored. In other words, the 'loaded' property is useless. Mark it as deprecated in the schema from the start. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Acked-by: Daniel P. Berrangé <berra...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: f3189b9135ae9bbc922ac56528784ca9cd04ef4a https://github.com/qemu/qemu/commit/f3189b9135ae9bbc922ac56528784ca9cd04ef4a Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M qapi/qom.json Log Message: ----------- qapi/qom: Add ObjectOptions for can-* This adds a QAPI schema for the properties of the can-* objects. can-bus doesn't have any properties, so it only needs to be added to the ObjectType enum without adding a new branch to ObjectOptions. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 3d0d3c30ae3a259bff176f85a3efa2d0816695af https://github.com/qemu/qemu/commit/3d0d3c30ae3a259bff176f85a3efa2d0816695af Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M qapi/qom.json Log Message: ----------- qapi/qom: Add ObjectOptions for colo-compare This adds a QAPI schema for the properties of the colo-compare object. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 1156a67531d23f01c1d86ee12deb1c4e290b5044 https://github.com/qemu/qemu/commit/1156a67531d23f01c1d86ee12deb1c4e290b5044 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M qapi/common.json M qapi/net.json M qapi/qom.json Log Message: ----------- qapi/qom: Add ObjectOptions for filter-* This adds a QAPI schema for the properties of the filter-* objects. Some parts of the interface (in particular NetfilterProperties.position) are very unusual for QAPI, but for now just describe the existing interface. net.json can't be included in qom.json because the storage daemon doesn't have it. NetFilterDirection is still required in the new object property definitions in qom.json, so move this enum to common.json. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: b9e479d008dd2e8fd826656563138eabd5af0c64 https://github.com/qemu/qemu/commit/b9e479d008dd2e8fd826656563138eabd5af0c64 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M qapi/qom.json Log Message: ----------- qapi/qom: Add ObjectOptions for pr-manager-helper This adds a QAPI schema for the properties of the pr-manager-helper object. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 590466f056c4f2a7ff87ed751cece4f4ff02fd57 https://github.com/qemu/qemu/commit/590466f056c4f2a7ff87ed751cece4f4ff02fd57 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M qapi/qom.json Log Message: ----------- qapi/qom: Add ObjectOptions for confidential-guest-support This adds a QAPI schema for the properties of the objects implementing the confidential-guest-support interface. pef-guest and s390x-pv-guest don't have any properties, so they only need to be added to the ObjectType enum without adding a new branch to ObjectOptions. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 30e863e5a7a35fc5b2cfa933ddbc30f84b0415a0 https://github.com/qemu/qemu/commit/30e863e5a7a35fc5b2cfa933ddbc30f84b0415a0 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M qapi/common.json M qapi/qom.json M qapi/ui.json Log Message: ----------- qapi/qom: Add ObjectOptions for input-* This adds a QAPI schema for the properties of the input-* objects. ui.json cannot be included in qom.json because the storage daemon can't use it, so move GrabToggleKeys to common.json. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 17422da082ffcecb38bd1f2e2de6d56a61e8cd9c https://github.com/qemu/qemu/commit/17422da082ffcecb38bd1f2e2de6d56a61e8cd9c Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M qapi/qom.json Log Message: ----------- qapi/qom: Add ObjectOptions for x-remote-object This adds a QAPI schema for the properties of the x-remote-object object. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 9151e59a8b6e854eb733553c6772351049ca6ab6 https://github.com/qemu/qemu/commit/9151e59a8b6e854eb733553c6772351049ca6ab6 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M hw/block/xen-block.c M include/qom/object_interfaces.h M monitor/misc.c M qapi/qom.json M qom/qom-qmp-cmds.c M storage-daemon/qemu-storage-daemon.c Log Message: ----------- qapi/qom: QAPIfy object-add This converts object-add from 'gen': false to the ObjectOptions QAPI type. As an immediate benefit, clients can now use QAPI schema introspection for user creatable QOM objects. It is also the first step towards making the QAPI schema the only external interface for the creation of user creatable objects. Once all other places (HMP and command lines of the system emulator and all tools) go through QAPI, too, some object implementations can be simplified because some checks (e.g. that mandatory options are set) are already performed by QAPI, and in another step, QOM boilerplate code could be generated from the schema. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 98c43b7b8b7504099760383fc802d18bc8b18f48 https://github.com/qemu/qemu/commit/98c43b7b8b7504099760383fc802d18bc8b18f48 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M qom/object_interfaces.c Log Message: ----------- qom: Make "object" QemuOptsList optional This code is going away anyway, but for a few more commits, we'll be in a state where some binaries still use QemuOpts and others don't. If the "object" QemuOptsList doesn't even exist, we don't have to remove (or fail to remove, and therefore abort) a user creatable object from it. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 2daf28557e43cc0724b9a8b36e77db10b455e286 https://github.com/qemu/qemu/commit/2daf28557e43cc0724b9a8b36e77db10b455e286 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M storage-daemon/qemu-storage-daemon.c Log Message: ----------- qemu-storage-daemon: Implement --object with qmp_object_add() This QAPIfies --object and ensures that QMP and the command line option behave the same. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: c9231123907415d7737263b9ca6f125a8181463b https://github.com/qemu/qemu/commit/c9231123907415d7737263b9ca6f125a8181463b Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M include/qom/object_interfaces.h M qom/object_interfaces.c Log Message: ----------- qom: Remove user_creatable_add_dict() This function is now unused and can be removed. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: f375026606f4ae1486189cb758cd0dfa60b3c18f https://github.com/qemu/qemu/commit/f375026606f4ae1486189cb758cd0dfa60b3c18f Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M include/qom/object_interfaces.h M qom/object_interfaces.c M qom/qom-qmp-cmds.c M storage-daemon/qemu-storage-daemon.c Log Message: ----------- qom: Factor out user_creatable_process_cmdline() The implementation for --object can be shared between qemu-storage-daemon and other binaries, so move it into a function in qom/object_interfaces.c that is accessible from everywhere. This also requires moving the implementation of qmp_object_add() into a new user_creatable_add_qapi(), because qom/qom-qmp-cmds.c is not linked for tools. user_creatable_print_help_from_qdict() can become static now. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: b3e79bc6f0f53c83ad8a4f90713508894c9cdcde https://github.com/qemu/qemu/commit/b3e79bc6f0f53c83ad8a4f90713508894c9cdcde Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M qemu-io.c Log Message: ----------- qemu-io: Use user_creatable_process_cmdline() for --object This switches qemu-io from a QemuOpts-based parser for --object to user_creatable_process_cmdline() which uses a keyval parser and enforces the QAPI schema. Apart from being a cleanup, this makes non-scalar properties accessible. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: fa40e43ca01b8ddd174daf6863282d987e57a235 https://github.com/qemu/qemu/commit/fa40e43ca01b8ddd174daf6863282d987e57a235 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M qemu-nbd.c Log Message: ----------- qemu-nbd: Use user_creatable_process_cmdline() for --object This switches qemu-nbd from a QemuOpts-based parser for --object to user_creatable_process_cmdline() which uses a keyval parser and enforces the QAPI schema. Apart from being a cleanup, this makes non-scalar properties accessible. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: ffd58ef88c73700113e0808e8222ef4d22224f33 https://github.com/qemu/qemu/commit/ffd58ef88c73700113e0808e8222ef4d22224f33 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M include/qom/object_interfaces.h M qom/object_interfaces.c Log Message: ----------- qom: Add user_creatable_add_from_str() This is a version of user_creatable_process_cmdline() with an Error parameter that never calls exit() and is therefore usable in HMP. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 99b1e64688893d0b772074b5a2972a0bad85c19f https://github.com/qemu/qemu/commit/99b1e64688893d0b772074b5a2972a0bad85c19f Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M docs/tools/qemu-img.rst M qemu-img.c Log Message: ----------- qemu-img: Use user_creatable_process_cmdline() for --object This switches qemu-img from a QemuOpts-based parser for --object to user_creatable_process_cmdline() which uses a keyval parser and enforces the QAPI schema. Apart from being a cleanup, this makes non-scalar properties accessible. As a side effect, fix wrong exit codes in the object parsing error path of 'qemu-img compare'. This was broken in commit 334c43e2c3 because &error_fatal exits with an exit code of 1, while it should have been 2. Document that exit code 0 is also returned when just requested help was printed instead of comparing images. This is preexisting behaviour that isn't changed by this patch, though another instance of it is added with '--object help'. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: da0a932bbf06a71210300893eeb4d51217238b11 https://github.com/qemu/qemu/commit/da0a932bbf06a71210300893eeb4d51217238b11 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M hmp-commands.hx M monitor/hmp-cmds.c M qom/object_interfaces.c Log Message: ----------- hmp: QAPIfy object_add This switches the HMP command object_add from a QemuOpts-based parser to user_creatable_add_from_str() which uses a keyval parser and enforces the QAPI schema. Apart from being a cleanup, this makes non-scalar properties and help accessible. In order for help to be printed to the monitor instead of stdout, the printf() calls in the help functions are changed to qemu_printf(). Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> Commit: ddf6dae7e34271332fbc04921d0c91ab6a009b5a https://github.com/qemu/qemu/commit/ddf6dae7e34271332fbc04921d0c91ab6a009b5a Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M include/qom/object_interfaces.h M qom/object_interfaces.c Log Message: ----------- qom: Add user_creatable_parse_str() The system emulator has a more complicated way of handling command line options in that it reorders options before it processes them. This means that parsing object options and creating the object happen at two different points. Split the parsing part into a separate function that can be reused by the system emulator command line. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Acked-by: Peter Krempa <pkre...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Commit: 1254bd3977b30b3af74bb1f6641fe02d0bf5caf8 https://github.com/qemu/qemu/commit/1254bd3977b30b3af74bb1f6641fe02d0bf5caf8 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M chardev/char.c Log Message: ----------- char: Skip CLI aliases in query-chardev-backends The aliases "tty" and "parport" are only valid on the command line, QMP commands like chardev-add don't know them. query-chardev-backends should describe QMP and therefore not include them in the list of available backends. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Message-Id: <20210311164253.338723-2-kw...@redhat.com> Reviewed-by: Markus Armbruster <arm...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 5965243641d797b2270082c5a4eab49cb81fc8f0 https://github.com/qemu/qemu/commit/5965243641d797b2270082c5a4eab49cb81fc8f0 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M chardev/char.c M docs/system/deprecated.rst M tests/unit/test-char.c Log Message: ----------- char: Deprecate backend aliases 'tty' and 'parport' QAPI doesn't know the aliases 'tty' and 'parport' and there is no reason to prefer them to the real names of the backends 'serial' and 'parallel'. Since warnings are not allowed in 'make check' output, we can't test the deprecated alias any more. Remove it from test-char. Signed-off-by: Kevin Wolf <kw...@redhat.com> Acked-by: Paolo Bonzini <pbonz...@redhat.com> Message-Id: <20210311164253.338723-3-kw...@redhat.com> Reviewed-by: Markus Armbruster <arm...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: f3b70e0779c84a5c220ca67610b27cbe672d986a https://github.com/qemu/qemu/commit/f3b70e0779c84a5c220ca67610b27cbe672d986a Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M chardev/char.c Log Message: ----------- char: Simplify chardev_name_foreach() Both callers use callbacks that don't do anything when they are called for CLI aliases. Instead of passing the cli_alias parameter, just don't call the callbacks for aliases in the first place. Signed-off-by: Kevin Wolf <kw...@redhat.com> Message-Id: <20210311164253.338723-4-kw...@redhat.com> Reviewed-by: Markus Armbruster <arm...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 155b5f8b8d3d5dedd7c57e5223e822dc1b5295c8 https://github.com/qemu/qemu/commit/155b5f8b8d3d5dedd7c57e5223e822dc1b5295c8 Author: Kevin Wolf <kw...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M qom/object_interfaces.c Log Message: ----------- qom: Support JSON in HMP object_add and tools --object Support JSON for --object in all tools and in HMP object_add in the same way as it is supported in qobject_input_visitor_new_str(). Signed-off-by: Kevin Wolf <kw...@redhat.com> Message-Id: <20210312131921.421023-1-kw...@redhat.com> Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Markus Armbruster <arm...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 53c9956d8b3f5eb621fb15c6e6ea67e12f9677e7 https://github.com/qemu/qemu/commit/53c9956d8b3f5eb621fb15c6e6ea67e12f9677e7 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M tests/unit/check-qom-proplist.c Log Message: ----------- tests: convert check-qom-proplist to keyval The command-line creation test is using QemuOpts. Switch it to keyval, since the emulator has some special needs and thus the last user of user_creatable_add_opts will go away with the next patch. Reviewed-by: Kevin Wolf <kw...@redhat.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Message-Id: <20210312173547.1283477-2-pbonz...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: bc2f4fcb1dd1a66ede126593fa091c23a94e3ab8 https://github.com/qemu/qemu/commit/bc2f4fcb1dd1a66ede126593fa091c23a94e3ab8 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M include/qom/object_interfaces.h M qom/object_interfaces.c M softmmu/vl.c Log Message: ----------- qom: move user_creatable_add_opts logic to vl.c and QAPIfy it Emulators are currently using OptsVisitor (via user_creatable_add_opts) to parse the -object command line option. This has one extra feature, compared to keyval, which is automatic conversion of integers to lists as well as support for lists as repeated options: -object memory-backend-ram,id=pc.ram,size=1048576000,host-nodes=0,policy=bind So we cannot replace OptsVisitor with keyval right now. Still, this patch moves the user_creatable_add_opts logic to vl.c since it is not needed anywhere else, and makes it go through user_creatable_add_qapi. In order to minimize code changes, the predicate still takes a string. This can be changed later to use the ObjectType QAPI enum directly. Reviewed-by: Eric Blake <ebl...@redhat.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Message-Id: <20210312173547.1283477-3-pbonz...@redhat.com> Reviewed-by: Markus Armbruster <arm...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 009ff89328b1da3ea8ba316bf2be2125bc9937c5 https://github.com/qemu/qemu/commit/009ff89328b1da3ea8ba316bf2be2125bc9937c5 Author: Paolo Bonzini <pbonz...@redhat.com> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M softmmu/vl.c Log Message: ----------- vl: allow passing JSON to -object Extend the ObjectOption code that was added in the previous patch to enable passing JSON to -object. Even though we cannot yet add non-scalar properties with the human-friendly comma-separated syntax, they can now be added as JSON. Reviewed-by: Eric Blake <ebl...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> Message-Id: <20210312173547.1283477-4-pbonz...@redhat.com> Reviewed-by: Markus Armbruster <arm...@redhat.com> Signed-off-by: Kevin Wolf <kw...@redhat.com> Commit: 92566947b3ac5ca75f91a34acb188219c455fc71 https://github.com/qemu/qemu/commit/92566947b3ac5ca75f91a34acb188219c455fc71 Author: Peter Maydell <peter.mayd...@linaro.org> Date: 2021-03-19 (Fri, 19 Mar 2021) Changed paths: M block.c M block/curl.c M block/export/vhost-user-blk-server.c M block/stream.c M chardev/char.c M docs/system/deprecated.rst M docs/system/removed-features.rst M docs/tools/qemu-img.rst M hmp-commands.hx M hw/block/xen-block.c M include/qom/object_interfaces.h M monitor/hmp-cmds.c M monitor/misc.c M qapi/authz.json M qapi/block-core.json M qapi/common.json M qapi/crypto.json M qapi/machine.json M qapi/net.json M qapi/qom.json M qapi/ui.json M qemu-img.c M qemu-io.c M qemu-nbd.c M qom/object_interfaces.c M qom/qom-qmp-cmds.c M softmmu/vl.c M storage-daemon/qapi/qapi-schema.json M storage-daemon/qemu-storage-daemon.c A tests/qemu-iotests/tests/qsd-jobs A tests/qemu-iotests/tests/qsd-jobs.out M tests/qtest/qmp-cmd-test.c M tests/qtest/test-netfilter.c M tests/unit/check-qom-proplist.c M tests/unit/test-char.c Log Message: ----------- Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging Block layer patches and object-add QAPIfication - QAPIfy object-add and --object - stream: Fail gracefully if permission is denied - storage-daemon: Fix crash on quit when job is still running - curl: Fix use after free - char: Deprecate backend aliases, fix QMP query-chardev-backends - Fix image creation option defaults that exist in both the format and the protocol layer (e.g. 'cluster_size' in qcow2 and rbd; the qcow2 default was incorrectly applied to the rbd layer) # gpg: Signature made Fri 19 Mar 2021 09:18:22 GMT # gpg: using RSA key DC3DEB159A9AF95D3D7456FE7F09B272C88F2FD6 # gpg: issuer "kw...@redhat.com" # gpg: Good signature from "Kevin Wolf <kw...@redhat.com>" [full] # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: (42 commits) vl: allow passing JSON to -object qom: move user_creatable_add_opts logic to vl.c and QAPIfy it tests: convert check-qom-proplist to keyval qom: Support JSON in HMP object_add and tools --object char: Simplify chardev_name_foreach() char: Deprecate backend aliases 'tty' and 'parport' char: Skip CLI aliases in query-chardev-backends qom: Add user_creatable_parse_str() hmp: QAPIfy object_add qemu-img: Use user_creatable_process_cmdline() for --object qom: Add user_creatable_add_from_str() qemu-nbd: Use user_creatable_process_cmdline() for --object qemu-io: Use user_creatable_process_cmdline() for --object qom: Factor out user_creatable_process_cmdline() qom: Remove user_creatable_add_dict() qemu-storage-daemon: Implement --object with qmp_object_add() qom: Make "object" QemuOptsList optional qapi/qom: QAPIfy object-add qapi/qom: Add ObjectOptions for x-remote-object qapi/qom: Add ObjectOptions for input-* ... Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> Compare: https://github.com/qemu/qemu/compare/b8796be5c06c...92566947b3ac