Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-03 Thread Kevin Wolf
Am 03.12.2020 um 12:11 hat Paolo Bonzini geschrieben: > On 02/12/20 18:35, Kevin Wolf wrote: > > > Could we have an intermediate state that doesn't require any > > > duplication and thus have no separate code paths that could > > > diverge? > > > >

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add

2020-12-03 Thread Kevin Wolf
Am 03.12.2020 um 17:50 hat Paolo Bonzini geschrieben: > On 03/12/20 16:15, Kevin Wolf wrote: > > I don't think this is an intermediate state like Eduardo wants to have. > > Creating the object, then setting properties, then realize [1] will fail > > after your change.

Re: qmp-shell TUI (was: Re: Call for Google Summer of Code 2021 project ideas)

2021-01-14 Thread Kevin Wolf
Am 14.01.2021 um 14:59 hat Daniel P. Berrangé geschrieben: > On Thu, Jan 14, 2021 at 01:52:34PM +, Stefan Hajnoczi wrote: > > On Wed, Jan 13, 2021 at 01:59:43PM -0500, John Snow wrote: > > > On 1/13/21 3:53 AM, Stefan Hajnoczi wrote: > > > > On Tue, Jan 12, 2021 at 9:10 PM John Snow wrote: >

Re: [PATCH v3 1/4] block: Add trivial backing_fmt support to qcow, sheepdog, vmdk

2020-03-09 Thread Kevin Wolf
Am 06.03.2020 um 23:51 hat Eric Blake geschrieben: > For qcow2 and qed, we want to encourage the use of -F always, as these > formats can suffer from data corruption or security holes if backing > format is probed. But for other formats, the backing format cannot be > recorded. Making the user de

Re: [PATCH v3 1/4] block: Add trivial backing_fmt support to qcow, sheepdog, vmdk

2020-03-09 Thread Kevin Wolf
Am 09.03.2020 um 16:32 hat Eric Blake geschrieben: > On 3/9/20 10:21 AM, Kevin Wolf wrote: > > Am 06.03.2020 um 23:51 hat Eric Blake geschrieben: > > > For qcow2 and qed, we want to encourage the use of -F always, as these > > > formats can suffer from data corruption o

Re: [PATCH v3 1/4] block: Add trivial backing_fmt support to qcow, sheepdog, vmdk

2020-03-09 Thread Kevin Wolf
Am 09.03.2020 um 16:44 hat Daniel P. Berrangé geschrieben: > We could support "-F ..." and validate any non-raw formats, while raising a > runtime error in the case of "-F raw", as only the "raw" backing format has > the probing security risk. > > Users who need to use qcow, with a backing file,

Re: [PATCH v5 3/7] qcow: Tolerate backing_fmt=, but warn on backing_fmt=raw

2020-05-05 Thread Kevin Wolf
Am 03.04.2020 um 19:58 hat Eric Blake geschrieben: > qcow has no space in the metadata to store a backing format, and there > are existing qcow images backed both by raw or by other formats > (usually qcow) images, reliant on probing to tell the difference. > While we don't recommend the creation o

Re: [PATCH v5 4/7] qcow2: Deprecate use of qemu-img amend to change backing file

2020-05-05 Thread Kevin Wolf
Am 03.04.2020 um 19:58 hat Eric Blake geschrieben: > The use of 'qemu-img amend' to change qcow2 backing files is not > tested very well. In particular, our implementation has a bug where > if a new backing file is provided without a format, then the prior > format is blindly reused, even if this

Re: [PATCH v5 7/7] qemu-img: Deprecate use of -b without -F

2020-05-05 Thread Kevin Wolf
Am 03.04.2020 um 19:58 hat Eric Blake geschrieben: > Creating an image that requires format probing of the backing image is > inherently unsafe (we've had several CVEs over the years based on > probes leaking information to the guest on a subsequent boot, although > these days tools like libvirt ar

Re: RFC: Qemu backup interface plans

2021-05-19 Thread Kevin Wolf
Am 19.05.2021 um 08:11 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > 2. Test, that we can start backup job with source = (target of > > > backup-top filter), so that we have "push backup with fleecing". > > > Make an option for backup to start without a filter, when we don't > > > need copy-b

Re: Qemu block filter insertion/removal API

2021-05-19 Thread Kevin Wolf
Am 17.05.2021 um 14:44 hat Vladimir Sementsov-Ogievskiy geschrieben: > Hi all! > > I'd like to be sure that we know where we are going to. > > In blockdev-era where qemu user is aware about block nodes, all nodes have > good names and controlled by user we can efficiently use block filters. > >

Re: RFC: Qemu backup interface plans

2021-05-19 Thread Kevin Wolf
Am 19.05.2021 um 13:49 hat Vladimir Sementsov-Ogievskiy geschrieben: > 19.05.2021 14:20, Kevin Wolf wrote: > > Am 19.05.2021 um 08:11 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > > > 2. Test, that we can start backup job with source = (target of > > > > &

Re: Qemu block filter insertion/removal API

2021-05-19 Thread Kevin Wolf
Am 19.05.2021 um 14:19 hat Vladimir Sementsov-Ogievskiy geschrieben: > 19.05.2021 14:44, Kevin Wolf wrote: > > Am 17.05.2021 um 14:44 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > Hi all! > > > > > > I'd like to be sure that we know where we are goi

Re: [PATCH 2/2] qemu-img: Require -F with -b backing image

2021-07-08 Thread Kevin Wolf
Am 03.05.2021 um 23:36 hat Eric Blake geschrieben: > @@ -17,7 +14,7 @@ qemu-io: can't open device TEST_DIR/t.qcow2: Could not open > backing file: Unknow > no file open, try 'help open' > read 4096/4096 bytes at offset 0 > 4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) > -qemu-img: warn

Re: [PATCH 0/2] Remove deprecated qemu-img backing file without format

2021-07-08 Thread Kevin Wolf
Am 07.07.2021 um 23:17 hat Eric Blake geschrieben: > On Mon, May 03, 2021 at 04:35:58PM -0500, Eric Blake wrote: > > We've gone enough release cycles without noticeable pushback on our > > intentions, so time to make it harder to create images that can form a > > security hole due to a need for for

Re: [PATCH 3/2] qemu-img: Improve error for rebase without backing format

2021-07-08 Thread Kevin Wolf
> Suggested-by: Kevin Wolf > Signed-off-by: Eric Blake Thanks, applied to the block branch. Kevin

Re: [PATCH 3/2] qemu-img: Improve error for rebase without backing format

2021-07-09 Thread Kevin Wolf
> Suggested-by: Kevin Wolf > Signed-off-by: Eric Blake > diff --git a/tests/qemu-iotests/114.out b/tests/qemu-iotests/114.out > index 172454401257..016e9ce3ecfb 100644 > --- a/tests/qemu-iotests/114.out > +++ b/tests/qemu-iotests/114.out > @@ -14,7 +14,7 @@ qemu-io: can'

Re: [PATCH for-6.1? v2 5/7] job: Add job_cancel_requested()

2021-08-04 Thread Kevin Wolf
[ Peter, the question for you is at the end. ] Am 04.08.2021 um 10:07 hat Max Reitz geschrieben: > On 03.08.21 16:25, Kevin Wolf wrote: > > Am 26.07.2021 um 16:46 hat Max Reitz geschrieben: > > > Most callers of job_is_cancelled() actually want to know whether the job >

Re: [PATCH 2/3] fdc: Inline fdctrl_connect_drives() into fdctrl_realize_common()

2021-01-25 Thread Kevin Wolf
Am 25.01.2021 um 17:24 hat Markus Armbruster geschrieben: > The previous commit rendered the name fdctrl_realize_common() somewhat > misleading. Get rid of it by inlining the (now pretty simple) > function into its only caller. > > Signed-off-by: Markus Armbruster > --- > hw/block/fdc.c | 23 ++

[PATCH v2 02/31] qapi/qom: Drop deprecated 'props' from object-add

2021-02-24 Thread Kevin Wolf
The option has been deprecated in QEMU 5.0, remove it. Signed-off-by: Kevin Wolf --- qapi/qom.json| 6 +- docs/system/deprecated.rst | 5 - docs/system/removed-features.rst | 5 + qom/qom-qmp-cmds.c | 21 - 4 files

[PATCH v2 00/31] qapi/qom: QAPIfy --object and object-add

2021-02-24 Thread Kevin Wolf
umentation to refer to the version when the object was introduced rather than 6.0 where the schema will (hopefully) be added - Probably some other minor changes Kevin Wolf (31): tests: Drop 'props' from object-add calls qapi/qom: Drop deprecated 'props' from obje

[PATCH v2 01/31] tests: Drop 'props' from object-add calls

2021-02-24 Thread Kevin Wolf
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 --- tests/qtest/qmp-cmd-test.c | 16 +-- tests/qtest/test-netfil

[PATCH v2 04/31] qapi/qom: Add ObjectOptions for authz-*

2021-02-24 Thread Kevin Wolf
This adds a QAPI schema for the properties of the authz-* objects. Signed-off-by: Kevin Wolf --- qapi/authz.json | 62 qapi/qom.json| 10 + storage-daemon/qapi/qapi-schema.json | 1 + 3 files changed, 73 insertions

[PATCH v2 06/31] qapi/qom: Add ObjectOptions for dbus-vmstate

2021-02-24 Thread Kevin Wolf
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 --- qapi/qom.json | 18 ++ 1 file changed, 18

[PATCH v2 15/31] qapi/qom: Add ObjectOptions for pr-manager-helper

2021-02-24 Thread Kevin Wolf
This adds a QAPI schema for the properties of the pr-manager-helper object. Signed-off-by: Kevin Wolf --- qapi/qom.json | 14 ++ 1 file changed, 14 insertions(+) diff --git a/qapi/qom.json b/qapi/qom.json index e3357f5123..e7184122e9 100644 --- a/qapi/qom.json +++ b/qapi/qom.json

[PATCH v2 09/31] qapi/qom: Add ObjectOptions for throttle-group

2021-02-24 Thread Kevin Wolf
cts, 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 --- qapi/block

[PATCH v2 16/31] qapi/qom: Add ObjectOptions for confidential-guest-support

2021-02-24 Thread Kevin Wolf
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

[PATCH v2 17/31] qapi/qom: Add ObjectOptions for input-*

2021-02-24 Thread Kevin Wolf
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 --- qapi/common.json | 12 ++ qapi/qom.json

[PATCH v2 12/31] qapi/qom: Add ObjectOptions for can-*

2021-02-24 Thread Kevin Wolf
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 --- qapi/qom.json | 18 ++ 1 file change

[PATCH v2 13/31] qapi/qom: Add ObjectOptions for colo-compare

2021-02-24 Thread Kevin Wolf
This adds a QAPI schema for the properties of the colo-compare object. Signed-off-by: Kevin Wolf --- qapi/qom.json | 49 + 1 file changed, 49 insertions(+) diff --git a/qapi/qom.json b/qapi/qom.json index 4b1cd4b8dc..8e4414f843 100644 --- a/qapi

[PATCH v2 11/31] qapi/qom: Add ObjectOptions for tls-*, deprecate 'loaded'

2021-02-24 Thread Kevin Wolf
ently ignored. In other words, the 'loaded' property is useless. Mark it as deprecated in the schema from the start. Signed-off-by: Kevin Wolf --- qapi/crypto.json | 98 qapi/qom.json| 12 +- 2 files changed, 108 insertions(+),

[PATCH v2 03/31] qapi/qom: Add ObjectOptions for iothread

2021-02-24 Thread Kevin Wolf
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 --- qapi/qom

[PATCH v2 08/31] qapi/qom: Add ObjectOptions for rng-*, deprecate 'opened'

2021-02-24 Thread Kevin Wolf
ons 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: Ke

[PATCH v2 10/31] qapi/qom: Add ObjectOptions for secret*, deprecate 'loaded'

2021-02-24 Thread Kevin Wolf
e 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 --- qapi/crypto.json | 61 ++ qapi/qom.json | 5 docs/system/deprecated.rst |

[PATCH v2 14/31] qapi/qom: Add ObjectOptions for filter-*

2021-02-24 Thread Kevin Wolf
x27;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 --- qapi/common.json | 20 +++ qapi/net.json| 20 --- qapi/qom.json| 143

[PATCH v2 20/31] qom: Make "object" QemuOptsList optional

2021-02-24 Thread Kevin Wolf
object from it. Signed-off-by: Kevin Wolf --- qom/object_interfaces.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c index 1e9ad6f08a..b9a99c8bf4 100644 --- a/qom/object_interfaces.c +++ b/qom/object_interfa

[PATCH v2 05/31] qapi/qom: Add ObjectOptions for cryptodev-*

2021-02-24 Thread Kevin Wolf
existing interface in QAPI, leave these things in place. Signed-off-by: Kevin Wolf --- qapi/qom.json | 34 ++ 1 file changed, 34 insertions(+) diff --git a/qapi/qom.json b/qapi/qom.json index 30ed179bc1..1dbc95fb53 100644 --- a/qapi/qom.json +++ b/qapi/qom.json

[PATCH v2 18/31] qapi/qom: Add ObjectOptions for x-remote-object

2021-02-24 Thread Kevin Wolf
This adds a QAPI schema for the properties of the x-remote-object object. Signed-off-by: Kevin Wolf --- qapi/qom.json | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/qapi/qom.json b/qapi/qom.json index f8ff322df0..6793342e81 100644 --- a/qapi/qom.json

[PATCH v2 26/31] qemu-nbd: Use user_creatable_process_cmdline() for --object

2021-02-24 Thread Kevin Wolf
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 --- qemu-nbd.c | 34

[PATCH v2 29/31] qom: Add user_creatable_parse_str()

2021-02-24 Thread Kevin Wolf
the system emulator command line. Signed-off-by: Kevin Wolf --- include/qom/object_interfaces.h | 15 +++ qom/object_interfaces.c | 20 ++-- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/include/qom/object_interfaces.h b/include/qom

[PATCH v2 07/31] qapi/qom: Add ObjectOptions for memory-backend-*

2021-02-24 Thread Kevin Wolf
d-off-by: Kevin Wolf --- qapi/common.json | 20 qapi/machine.json | 22 + qapi/qom.json | 118 +- 3 files changed, 138 insertions(+), 22 deletions(-) diff --git a/qapi/common.json b/qapi/common.json index 716712d4b3..2dad4fadc3 1

[PATCH v2 21/31] qemu-storage-daemon: Implement --object with qmp_object_add()

2021-02-24 Thread Kevin Wolf
This QAPIfies --object and ensures that QMP and the command line option behave the same. Signed-off-by: Kevin Wolf --- storage-daemon/qemu-storage-daemon.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/storage-daemon/qemu-storage-daemon.c b/storage

[PATCH v2 30/31] vl: QAPIfy -object

2021-02-24 Thread Kevin Wolf
supporting one less isn't the end of the world. As object definitions from -readconfig still go through QemuOpts, they are still included in -writeconfig output, which at least prevents destroying your existing configuration when you just wanted to add another option. Signed-off-by: Kevin

[PATCH v2 25/31] qemu-img: Use user_creatable_process_cmdline() for --object

2021-02-24 Thread Kevin Wolf
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. Signed-off-by: Kevin Wolf --- qemu-img.c | 239

[PATCH v2 24/31] qemu-io: Use user_creatable_process_cmdline() for --object

2021-02-24 Thread Kevin Wolf
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 --- qemu-io.c | 33

[PATCH v2 28/31] hmp: QAPIfy object_add

2021-02-24 Thread Kevin Wolf
of stdout, the printf() calls in the help functions are changed to qemu_printf(). Signed-off-by: Kevin Wolf --- monitor/hmp-cmds.c | 17 ++--- qom/object_interfaces.c | 11 ++- hmp-commands.hx | 2 +- 3 files changed, 9 insertions(+), 21 deletions(-) diff --git

[PATCH v2 27/31] qom: Add user_creatable_add_from_str()

2021-02-24 Thread Kevin Wolf
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 --- include/qom/object_interfaces.h | 16 qom/object_interfaces.c | 29 - 2 files

[PATCH v2 19/31] qapi/qom: QAPIfy object-add

2021-02-24 Thread Kevin Wolf
e could be generated from the schema. Signed-off-by: Kevin Wolf --- qapi/qom.json| 11 +-- include/qom/object_interfaces.h | 7 --- hw/block/xen-block.c | 16 monitor/misc.c | 2 -- qom/qom-

[PATCH v2 22/31] qom: Remove user_creatable_add_dict()

2021-02-24 Thread Kevin Wolf
This function is now unused and can be removed. Signed-off-by: Kevin Wolf --- include/qom/object_interfaces.h | 18 -- qom/object_interfaces.c | 32 2 files changed, 50 deletions(-) diff --git a/include/qom/object_interfaces.h b/include

[PATCH v2 23/31] qom: Factor out user_creatable_process_cmdline()

2021-02-24 Thread Kevin Wolf
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 --- include/qom/object_interfaces.h | 41 +++ qom/object_interfaces.c | 50 +++- qom/qom-qmp-cmds.c

[PATCH v2 31/31] qom: Drop QemuOpts based interfaces

2021-02-24 Thread Kevin Wolf
user_creatable_add_opts() has only a single user left, which is a test case. Rewrite the test to use user_creatable_add_type() instead (which is the remaining function that doesn't require a QAPI schema) and drop the QemuOpts related functions. Signed-off-by: Kevin Wolf --- includ

Re: [PATCH v2 16/31] qapi/qom: Add ObjectOptions for confidential-guest-support

2021-02-24 Thread Kevin Wolf
Am 24.02.2021 um 16:21 hat Dr. David Alan Gilbert geschrieben: > * Kevin Wolf (kw...@redhat.com) wrote: > > This adds a QAPI schema for the properties of the objects implementing > > the confidential-guest-support interface. > > > > pef-guest and s390x-pv-guest don

Re: [PATCH 00/14] deprecations: remove many old deprecations

2021-03-01 Thread Kevin Wolf
Am 25.02.2021 um 18:32 hat Jim Fehlig geschrieben: > Adding xen-devel and Ian to cc. > > On 2/24/21 6:11 AM, Daniel P. Berrangé wrote: > > 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 w

Re: [PATCH v2 19/31] qapi/qom: QAPIfy object-add

2021-03-01 Thread Kevin Wolf
Am 26.02.2021 um 12:30 hat Paolo Bonzini geschrieben: > On 24/02/21 14:52, Kevin Wolf wrote: > > +v = qobject_output_visitor_new(&qobj); > > +visit_type_ObjectOptions(v, NULL, &options, &error_abort); > > +visit_complete(v, &qobj); > &g

Re: [PATCH v2 03/31] qapi/qom: Add ObjectOptions for iothread

2021-03-02 Thread Kevin Wolf
Am 25.02.2021 um 23:55 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > 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

Re: [PATCH v2 06/31] qapi/qom: Add ObjectOptions for dbus-vmstate

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 16:58 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > 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

Re: [PATCH v2 07/31] qapi/qom: Add ObjectOptions for memory-backend-*

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 17:23 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > 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 >

Re: [PATCH v2 09/31] qapi/qom: Add ObjectOptions for throttle-group

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 18:26 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > 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'

Re: [PATCH v2 10/31] qapi/qom: Add ObjectOptions for secret*, deprecate 'loaded'

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 20:17 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > diff --git a/qapi/qom.json b/qapi/qom.json > > index 449dca8ec5..2668ad8369 100644 > > --- a/qapi/qom.json > > +++ b/qapi/qom.json > > @@ -7,6 +7,7 @@ > > { &#

Re: [PATCH v2 11/31] qapi/qom: Add ObjectOptions for tls-*, deprecate 'loaded'

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 20:33 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > 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

Re: [PATCH v2 12/31] qapi/qom: Add ObjectOptions for can-*

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 20:42 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > 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 enu

Re: [PATCH v2 17/31] qapi/qom: Add ObjectOptions for input-*

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 21:55 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > 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 mo

Re: [PATCH v2 19/31] qapi/qom: QAPIfy object-add

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 22:18 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > 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 creata

Re: [PATCH v2 27/31] qom: Add user_creatable_add_from_str()

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 23:21 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > 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 Wol

[PATCH v3 01/30] qapi/qom: Drop deprecated 'props' from object-add

2021-03-08 Thread Kevin Wolf
The option has been deprecated in QEMU 5.0, remove it. Signed-off-by: Kevin Wolf Acked-by: Peter Krempa Reviewed-by: Eric Blake --- qapi/qom.json| 6 +- docs/system/deprecated.rst | 5 - docs/system/removed-features.rst | 5 + qom/qom-qmp-cmds.c

[PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-08 Thread Kevin Wolf
r than 6.0 where the schema will (hopefully) be added - Probably some other minor changes Kevin Wolf (30): qapi/qom: Drop deprecated 'props' from object-add qapi/qom: Add ObjectOptions for iothread qapi/qom: Add ObjectOptions for authz-* qapi/qom: Add ObjectOptions for cryptodev

[PATCH v3 02/30] qapi/qom: Add ObjectOptions for iothread

2021-03-08 Thread Kevin Wolf
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 Acked-by:

[PATCH v3 03/30] qapi/qom: Add ObjectOptions for authz-*

2021-03-08 Thread Kevin Wolf
This adds a QAPI schema for the properties of the authz-* objects. Signed-off-by: Kevin Wolf Acked-by: Peter Krempa Reviewed-by: Eric Blake --- qapi/authz.json | 61 +--- qapi/qom.json| 10 + storage-daemon/qapi/qapi

[PATCH v3 04/30] qapi/qom: Add ObjectOptions for cryptodev-*

2021-03-08 Thread Kevin Wolf
existing interface in QAPI, leave these things in place. Signed-off-by: Kevin Wolf Acked-by: Peter Krempa --- qapi/qom.json | 35 +++ 1 file changed, 35 insertions(+) diff --git a/qapi/qom.json b/qapi/qom.json index 30ed179bc1..46c2cdc6cf 100644 --- a/qapi/qom.json

[PATCH v3 05/30] qapi/qom: Add ObjectOptions for dbus-vmstate

2021-03-08 Thread Kevin Wolf
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 Acked-by: Peter Krempa Reviewed-by: Eric Blake --- qapi/qom.json

[PATCH v3 06/30] qapi/qom: Add ObjectOptions for memory-backend-*

2021-03-08 Thread Kevin Wolf
d-off-by: Kevin Wolf Acked-by: Peter Krempa --- qapi/common.json | 20 qapi/machine.json | 22 + qapi/qom.json | 121 +- 3 files changed, 141 insertions(+), 22 deletions(-) diff --git a/qapi/common.json b/qapi/common.json

[PATCH v3 07/30] qapi/qom: Add ObjectOptions for rng-*, deprecate 'opened'

2021-03-08 Thread Kevin Wolf
ons 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 Acke

[PATCH v3 09/30] qapi/qom: Add ObjectOptions for secret*, deprecate 'loaded'

2021-03-08 Thread Kevin Wolf
e 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 Acked-by: Peter Krempa Reviewed-by: Eric Blake --- qapi/crypto.json | 61 ++ qapi/qom.json

[PATCH v3 10/30] qapi/qom: Add ObjectOptions for tls-*, deprecate 'loaded'

2021-03-08 Thread Kevin Wolf
ently ignored. In other words, the 'loaded' property is useless. Mark it as deprecated in the schema from the start. Signed-off-by: Kevin Wolf Acked-by: Peter Krempa Reviewed-by: Eric Blake --- qapi/crypto.json | 98 qapi/qom.json

[PATCH v3 11/30] qapi/qom: Add ObjectOptions for can-*

2021-03-08 Thread Kevin Wolf
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 Acked-by: Peter Krempa Reviewed-by: Eric Blake --- qapi/qom

[PATCH v3 12/30] qapi/qom: Add ObjectOptions for colo-compare

2021-03-08 Thread Kevin Wolf
This adds a QAPI schema for the properties of the colo-compare object. Signed-off-by: Kevin Wolf Acked-by: Peter Krempa Reviewed-by: Eric Blake --- qapi/qom.json | 49 + 1 file changed, 49 insertions(+) diff --git a/qapi/qom.json b/qapi

[PATCH v3 13/30] qapi/qom: Add ObjectOptions for filter-*

2021-03-08 Thread Kevin Wolf
x27;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 Acked-by: Peter Krempa Reviewed-by: Eric Blake --- qapi/common.json | 20 +++ qapi/net.json| 20 --- qapi/qom.jso

[PATCH v3 14/30] qapi/qom: Add ObjectOptions for pr-manager-helper

2021-03-08 Thread Kevin Wolf
This adds a QAPI schema for the properties of the pr-manager-helper object. Signed-off-by: Kevin Wolf Acked-by: Peter Krempa Reviewed-by: Eric Blake --- qapi/qom.json | 14 ++ 1 file changed, 14 insertions(+) diff --git a/qapi/qom.json b/qapi/qom.json index 6fe775bd83..6afac9169f

[PATCH v3 15/30] qapi/qom: Add ObjectOptions for confidential-guest-support

2021-03-08 Thread Kevin Wolf
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

[PATCH v3 17/30] qapi/qom: Add ObjectOptions for x-remote-object

2021-03-08 Thread Kevin Wolf
This adds a QAPI schema for the properties of the x-remote-object object. Signed-off-by: Kevin Wolf Acked-by: Peter Krempa Reviewed-by: Eric Blake --- qapi/qom.json | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/qapi/qom.json b/qapi/qom.json index

[PATCH v3 18/30] qapi/qom: QAPIfy object-add

2021-03-08 Thread Kevin Wolf
e could be generated from the schema. Signed-off-by: Kevin Wolf Acked-by: Peter Krempa Reviewed-by: Eric Blake --- qapi/qom.json| 11 +-- include/qom/object_interfaces.h | 7 --- hw/block/xen-block.c | 16 moni

[PATCH v3 19/30] qom: Make "object" QemuOptsList optional

2021-03-08 Thread Kevin Wolf
object from it. Signed-off-by: Kevin Wolf Acked-by: Peter Krempa Reviewed-by: Eric Blake --- qom/object_interfaces.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c index 7661270b98..d4df2334b7 100644 --- a/qom

[PATCH v3 20/30] qemu-storage-daemon: Implement --object with qmp_object_add()

2021-03-08 Thread Kevin Wolf
This QAPIfies --object and ensures that QMP and the command line option behave the same. Signed-off-by: Kevin Wolf Acked-by: Peter Krempa Reviewed-by: Eric Blake --- storage-daemon/qemu-storage-daemon.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git

[PATCH v3 21/30] qom: Remove user_creatable_add_dict()

2021-03-08 Thread Kevin Wolf
This function is now unused and can be removed. Signed-off-by: Kevin Wolf Acked-by: Peter Krempa Reviewed-by: Eric Blake --- include/qom/object_interfaces.h | 18 -- qom/object_interfaces.c | 32 2 files changed, 50 deletions(-) diff

[PATCH v3 08/30] qapi/qom: Add ObjectOptions for throttle-group

2021-03-08 Thread Kevin Wolf
cts, 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 Acked-by: Peter Krempa Reviewed

[PATCH v3 23/30] qemu-io: Use user_creatable_process_cmdline() for --object

2021-03-08 Thread Kevin Wolf
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 Acked-by: Peter Krempa Reviewed-by

[PATCH v3 26/30] qemu-img: Use user_creatable_process_cmdline() for --object

2021-03-08 Thread Kevin Wolf
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. Signed-off-by: Kevin Wolf Acked-by: Peter Krempa --- qemu

[PATCH v3 25/30] qom: Add user_creatable_add_from_str()

2021-03-08 Thread Kevin Wolf
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 Acked-by: Peter Krempa Reviewed-by: Eric Blake --- include/qom/object_interfaces.h | 16 qom/object_interfaces.c

[PATCH v3 24/30] qemu-nbd: Use user_creatable_process_cmdline() for --object

2021-03-08 Thread Kevin Wolf
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 Acked-by: Peter Krempa Reviewed-by

[PATCH v3 27/30] hmp: QAPIfy object_add

2021-03-08 Thread Kevin Wolf
of stdout, the printf() calls in the help functions are changed to qemu_printf(). Signed-off-by: Kevin Wolf Acked-by: Peter Krempa Reviewed-by: Eric Blake Reviewed-by: Dr. David Alan Gilbert --- monitor/hmp-cmds.c | 17 ++--- qom/object_interfaces.c | 11 ++- hmp

[PATCH v3 28/30] qom: Add user_creatable_parse_str()

2021-03-08 Thread Kevin Wolf
the system emulator command line. Signed-off-by: Kevin Wolf Acked-by: Peter Krempa Reviewed-by: Eric Blake --- include/qom/object_interfaces.h | 15 +++ qom/object_interfaces.c | 20 ++-- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a

[PATCH v3 16/30] qapi/qom: Add ObjectOptions for input-*

2021-03-08 Thread Kevin Wolf
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 Acked-by: Peter Krempa Reviewed-by: Eric Blake --- qapi/common.json

[PATCH v3 29/30] vl: QAPIfy -object

2021-03-08 Thread Kevin Wolf
supporting one less isn't the end of the world. As object definitions from -readconfig still go through QemuOpts, they are still included in -writeconfig output, which at least prevents destroying your existing configuration when you just wanted to add another option. Signed-off-by: Kevin

[PATCH v3 30/30] qom: Drop QemuOpts based interfaces

2021-03-08 Thread Kevin Wolf
user_creatable_add_opts() has only a single user left, which is a test case. Rewrite the test to use user_creatable_add_type() instead (which is the remaining function that doesn't require a QAPI schema) and drop the QemuOpts related functions. Signed-off-by: Kevin Wolf Acked-by: Peter K

[PATCH v3 22/30] qom: Factor out user_creatable_process_cmdline()

2021-03-08 Thread Kevin Wolf
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 Acked-by: Peter Krempa Reviewed-by: Eric Blake --- include/qom/object_interfaces.h | 41 +++ qom/object_interfaces.c | 50

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-10 Thread Kevin Wolf
Am 10.03.2021 um 15:31 hat Paolo Bonzini geschrieben: > On 10/03/21 15:22, Peter Krempa wrote: > > I've stumbled upon a regression with this patchset applied: > > > > error: internal error: process exited while connecting to monitor: > > qemu-system-x86_64: -object > > memory-backend-ram,id=pc.r

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-11 Thread Kevin Wolf
Am 11.03.2021 um 08:47 hat Peter Krempa geschrieben: > On Wed, Mar 10, 2021 at 18:30:44 +0100, Kevin Wolf wrote: > > Am 10.03.2021 um 15:31 hat Paolo Bonzini geschrieben: > > > On 10/03/21 15:22, Peter Krempa wrote: > > [...] > > > The keyval parser would cre

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-11 Thread Kevin Wolf
Am 11.03.2021 um 09:14 hat Paolo Bonzini geschrieben: > On 10/03/21 18:30, Kevin Wolf wrote: > > Am 10.03.2021 um 15:31 hat Paolo Bonzini geschrieben: > > > On 10/03/21 15:22, Peter Krempa wrote: > > > > I've stumbled upon a regression with this patchset applie

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-11 Thread Kevin Wolf
Am 11.03.2021 um 12:24 hat Peter Krempa geschrieben: > On Thu, Mar 11, 2021 at 09:37:11 +0100, Kevin Wolf wrote: > > Am 11.03.2021 um 08:47 hat Peter Krempa geschrieben: > > > On Wed, Mar 10, 2021 at 18:30:44 +0100, Kevin Wolf wrote: > > > > Am 10.03.2021 um 15:31

Re: [PATCH v3 27/30] hmp: QAPIfy object_add

2021-03-15 Thread Kevin Wolf
Am 15.03.2021 um 10:39 hat Markus Armbruster geschrieben: > Paolo Bonzini writes: > > > On 13/03/21 14:28, Markus Armbruster wrote: > >> Kevin Wolf writes: > >> > >>> This switches the HMP command object_add from a QemuOpts-based parser to > &

<    1   2   3   4   >