Re: [PATCH v3 3/4] migration: Deprecate block migration

2023-10-12 Thread Kevin Wolf
om the oldest way to the next oldest one. Pointing them to the modern way makes more sense. > > > > CC: Kevin Wolf > > CC: Eric Blake > > CC: Stefan Hajnoczi > > CC: Hanna Czenczek > > > > Signed-off-by: Juan Quintela Kevin

[PATCH for-6.2] docs: Deprecate incorrectly typed device_add arguments

2021-11-11 Thread Kevin Wolf
Let's use a deprecation period before we fix this bug in QEMU to avoid nasty surprises for users. Signed-off-by: Kevin Wolf --- docs/about/deprecated.rst | 14 ++ 1 file changed, 14 insertions(+) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index

Re: [PATCH 2/9] qapi: Mark unstable QMP parts with feature 'unstable'

2021-11-02 Thread Kevin Wolf
Am 29.10.2021 um 15:07 hat Eric Blake geschrieben: > On Mon, Oct 25, 2021 at 07:25:25AM +0200, Markus Armbruster wrote: > > Add special feature 'unstable' everywhere the name starts with 'x-', > > except for InputBarrierProperties member x-origin and > > MemoryBackendProperties member x-use-canonic

Re: [PATCH 1/9] qapi: New special feature flag "unstable"

2021-10-26 Thread Kevin Wolf
Am 26.10.2021 um 11:37 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 25.10.2021 um 07:25 hat Markus Armbruster geschrieben: > >> By convention, names starting with "x-" are experimental. The parts > >> of external interfa

Re: [PATCH 1/9] qapi: New special feature flag "unstable"

2021-10-26 Thread Kevin Wolf
Am 25.10.2021 um 07:25 hat Markus Armbruster geschrieben: > By convention, names starting with "x-" are experimental. The parts > of external interfaces so named may be withdrawn or changed > incompatibly in future releases. > > Drawback: promoting something from experimental to stable involves a

Re: [PATCH v2 12/15] virtio-net: Store failover primary opts pointer locally

2021-10-19 Thread Kevin Wolf
Am 19.10.2021 um 10:06 hat Laurent Vivier geschrieben: > On 08/10/2021 15:34, Kevin Wolf wrote: > > Instead of accessing the global QemuOptsList, which really belong to the > > command line parser and shouldn't be accessed from devices, store a > > pointer to the QemuOpt

Re: [PATCH v2 00/15] qdev: Add JSON -device

2021-10-15 Thread Kevin Wolf
Am 08.10.2021 um 15:34 hat Kevin Wolf geschrieben: > It's still a long way until we'll have QAPIfied devices, but there are > some improvements that we can already make now to make the future switch > easier. > > One important part of this is having code paths without Qem

Re: [PATCH v2 09/15] softmmu/qdev-monitor: add error handling in qdev_set_id

2021-10-15 Thread Kevin Wolf
Am 13.10.2021 um 23:37 hat Eric Blake geschrieben: > On Wed, Oct 13, 2021 at 03:10:38PM +0200, Damien Hedde wrote: > > > > @@ -691,7 +703,13 @@ DeviceState *qdev_device_add(QemuOpts *opts, Error > > > > **errp) > > > > } > > > > } > > > > -qdev_set_id(dev, g_strdup(qemu_opts_id

Re: [PATCH v2 00/15] qdev: Add JSON -device

2021-10-13 Thread Kevin Wolf
Am 13.10.2021 um 17:30 hat Michael S. Tsirkin geschrieben: > On Fri, Oct 08, 2021 at 03:34:27PM +0200, Kevin Wolf wrote: > > It's still a long way until we'll have QAPIfied devices, but there are > > some improvements that we can already make now to make the future switch

Re: [PATCH RFC v2 5/5] block: Deprecate transaction type drive-backup

2021-10-12 Thread Kevin Wolf
Am 11.10.2021 um 20:58 hat Eric Blake geschrieben: > On Sat, Oct 09, 2021 at 02:09:44PM +0200, Markus Armbruster wrote: > > Several moons ago, Vladimir posted > > > > Subject: [PATCH v2 3/3] qapi: deprecate drive-backup > > Date: Wed, 5 May 2021 16:58:03 +0300 > > Message-Id: <2021050

Re: [PATCH v2 2/5] qapi: Add feature flags to enum members

2021-10-12 Thread Kevin Wolf
Am 09.10.2021 um 14:09 hat Markus Armbruster geschrieben: > This is quite similar to commit 84ab008687 "qapi: Add feature flags to > struct members", only for enums instead of structs. > > Special feature flag 'deprecated' is silently ignored there. This is > okay only because it will be implemen

Re: [PATCH v2 1/5] qapi: Enable enum member introspection to show more than name

2021-10-12 Thread Kevin Wolf
Am 09.10.2021 um 14:09 hat Markus Armbruster geschrieben: > The next commit will add feature flags to enum members. There's a > problem, though: query-qmp-schema shows an enum type's members as an > array of member names (SchemaInfoEnum member @values). If it showed > an array of objects with a n

[PATCH v2 07/15] qdev: Avoid using string visitor for properties

2021-10-08 Thread Kevin Wolf
command line. In order to make sure that no devices start using this feature that would make backwards compatibility harder, just switch away from object_property_parse(), which internally uses the string visitor, to a keyval visitor and object_property_set(). Signed-off-by: Kevin Wolf Reviewed-by:

[PATCH v2 10/15] qemu-option: Allow deleting opts during qemu_opts_foreach()

2021-10-08 Thread Kevin Wolf
Use QTAILQ_FOREACH_SAFE() so that the current QemuOpts can be deleted while iterating through the whole list. Signed-off-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy --- util/qemu-option.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/qemu-option.c b

[PATCH v2 15/15] vl: Enable JSON syntax for -device

2021-10-08 Thread Kevin Wolf
t tools to detect support for this. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- qapi/qdev.json | 15 softmmu/vl.c | 63 -- 2 files changed, 67 insertions(+), 11 deletions(-) diff --git a/qapi/qdev.json b/qapi/qdev.json index

[PATCH v2 14/15] qdev: Base object creation on QDict rather than QemuOpts

2021-10-08 Thread Kevin Wolf
ommit doesn't remove the detour through QemuOpts from any code path yet, but it allows the following commits to do so. Signed-off-by: Kevin Wolf --- include/hw/qdev-core.h | 11 +++--- include/hw/virtio/virtio-net.h | 3 +- include/monitor/qdev.h | 2 + hw/c

[PATCH v2 12/15] virtio-net: Store failover primary opts pointer locally

2021-10-08 Thread Kevin Wolf
econd primary device is an error. Signed-off-by: Kevin Wolf --- include/hw/virtio/virtio-net.h | 1 + hw/net/virtio-net.c| 26 ++ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-ne

[PATCH v2 13/15] virtio-net: Avoid QemuOpts in failover_find_primary_device()

2021-10-08 Thread Kevin Wolf
s the current state of all existing devices. Signed-off-by: Kevin Wolf --- hw/net/virtio-net.c | 52 + 1 file changed, 19 insertions(+), 33 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index ed9a9012e9..f503f28c00 100644 --- a/hw/net/v

[PATCH v2 11/15] qdev: Add Error parameter to hide_device() callbacks

2021-10-08 Thread Kevin Wolf
. Prepare for this by adding an Error parameter to the hide_device() callback where virtio-net is informed about adding a primary device. Signed-off-by: Kevin Wolf --- include/hw/qdev-core.h | 8 ++-- hw/core/qdev.c | 7 +-- hw/net/virtio-net.c| 2 +- softmmu/qdev-monitor.c | 5

[PATCH v2 04/15] qom: Reduce use of error_propagate()

2021-10-08 Thread Kevin Wolf
ERRP_GUARD() makes debugging easier by making sure that &error_abort still fails at the real origin of the error instead of error_propagate(). Signed-off-by: Kevin Wolf --- qom/object.c| 7 +++ qom/object_interfaces.c | 19 ++- 2 files changed, 9 insert

[PATCH v2 05/15] iotests/245: Fix type for iothread property

2021-10-08 Thread Kevin Wolf
iothread is a string property, so None (= JSON null) is not a valid value for it. Pass the empty string instead to get the default iothread. Signed-off-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/245 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH v2 08/15] qdev: Make DeviceState.id independent of QemuOpts

2021-10-08 Thread Kevin Wolf
DeviceState.id is a pointer to a string that is stored in the QemuOpts object DeviceState.opts and freed together with it. We want to create devices without going through QemuOpts in the future, so make this a separately allocated string. Signed-off-by: Kevin Wolf Reviewed-by: Vladimir Sementsov

[PATCH v2 06/15] iotests/051: Fix typo

2021-10-08 Thread Kevin Wolf
The iothread isn't called 'iothread0', but 'thread0'. Depending on the order that properties are parsed, the error message may change from the expected one to another one saying that the iothread doesn't exist. Signed-off-by: Kevin Wolf Reviewed-by: Vladimir Sement

[PATCH v2 09/15] softmmu/qdev-monitor: add error handling in qdev_set_id

2021-10-08 Thread Kevin Wolf
from the "device" QemuOptsList where the id is used as key. This addition is a preparation for a future commit which will relax the uniqueness. Signed-off-by: Damien Hedde Signed-off-by: Kevin Wolf --- include/monitor/qdev.h | 25 +++- hw/xen/xen-legacy-back

[PATCH v2 01/15] net: Introduce NetClientInfo.check_peer_type()

2021-10-08 Thread Kevin Wolf
g. Signed-off-by: Kevin Wolf --- include/net/net.h| 2 ++ hw/core/qdev-properties-system.c | 6 ++ 2 files changed, 8 insertions(+) diff --git a/include/net/net.h b/include/net/net.h index 5d1508081f..986288eb07 100644 --- a/include/net/net.h +++ b/include/net/net.h @@ -

[PATCH v2 02/15] net/vhost-user: Fix device compatibility check

2021-10-08 Thread Kevin Wolf
y QemuOpts infrastructure and even reduces the code size. Signed-off-by: Kevin Wolf --- net/vhost-user.c | 41 ++--- 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/net/vhost-user.c b/net/vhost-user.c index 4a939124d2..b1a0247b59 100644 --- a/net/vhost-us

[PATCH v2 03/15] net/vhost-vdpa: Fix device compatibility check

2021-10-08 Thread Kevin Wolf
y QemuOpts infrastructure and even reduces the code size. Signed-off-by: Kevin Wolf --- net/vhost-vdpa.c | 37 ++--- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index 912686457c..6dc68d8677 100644 --- a/net/vhost-vdpa.c

[PATCH v2 00/15] qdev: Add JSON -device

2021-10-08 Thread Kevin Wolf
r this series. Fix some bugs there as a side effect. - Remove an unnecessary use of ERRP_GUARD() - Replaced error handling patch for qdev_set_id() with Damien's - Drop the deprecation patch until libvirt uses the new JSON syntax Damien Hedde (1): softmmu/qdev-monitor: add error handling in qd

Re: [PATCH 09/11] qdev: Avoid QemuOpts in QMP device_add

2021-10-06 Thread Kevin Wolf
Am 06.10.2021 um 11:20 hat Laurent Vivier geschrieben: > On 06/10/2021 10:21, Juan Quintela wrote: > > Kevin Wolf wrote: > > > Am 05.10.2021 um 17:52 hat Damien Hedde geschrieben: > > > > Hi > > > > > > > Usage > > > > > - &g

Re: [PATCH 09/11] qdev: Avoid QemuOpts in QMP device_add

2021-10-05 Thread Kevin Wolf
Am 05.10.2021 um 17:52 hat Damien Hedde geschrieben: > > > On 10/5/21 16:37, Kevin Wolf wrote: > > Am 27.09.2021 um 13:39 hat Kevin Wolf geschrieben: > > > Am 27.09.2021 um 13:06 hat Damien Hedde geschrieben: > > > > On 9/24/21 11:04, Kevin

Re: [PATCH 09/11] qdev: Avoid QemuOpts in QMP device_add

2021-10-05 Thread Kevin Wolf
Am 27.09.2021 um 13:39 hat Kevin Wolf geschrieben: > Am 27.09.2021 um 13:06 hat Damien Hedde geschrieben: > > On 9/24/21 11:04, Kevin Wolf wrote: > > > Directly call qdev_device_add_from_qdict() for QMP device_add instead of > > > first going through QemuOpts a

Re: [PATCH 06/11] qdev: Add Error parameter to qdev_set_id()

2021-10-05 Thread Kevin Wolf
Am 27.09.2021 um 12:33 hat Damien Hedde geschrieben: > Hi Kevin, > > I proposed a very similar patch in our rfc series because we needed some of > the cleaning you do here. > https://lists.gnu.org/archive/html/qemu-devel/2021-09/msg05679.html > I've added a bit of doc for the function, feel free t

Re: [PATCH 09/11] qdev: Avoid QemuOpts in QMP device_add

2021-10-04 Thread Kevin Wolf
Am 04.10.2021 um 14:18 hat Damien Hedde geschrieben: > > > On 10/1/21 16:42, Peter Krempa wrote: > > On Fri, Sep 24, 2021 at 11:04:25 +0200, Kevin Wolf wrote: > > > Directly call qdev_device_add_from_qdict() for QMP device_add instead of > > > first going throug

Re: [PATCH 11/11] Deprecate stable non-JSON -device and -object

2021-09-27 Thread Kevin Wolf
Am 27.09.2021 um 14:52 hat Peter Maydell geschrieben: > On Mon, 27 Sept 2021 at 12:27, Kevin Wolf wrote: > > > > Am 27.09.2021 um 11:00 hat Peter Maydell geschrieben: > > > On Fri, 24 Sept 2021 at 10:14, Kevin Wolf wrote: > > > > > > > > We want t

Re: [PATCH 09/11] qdev: Avoid QemuOpts in QMP device_add

2021-09-27 Thread Kevin Wolf
Am 27.09.2021 um 13:06 hat Damien Hedde geschrieben: > On 9/24/21 11:04, Kevin Wolf wrote: > > Directly call qdev_device_add_from_qdict() for QMP device_add instead of > > first going through QemuOpts and converting back to QDict. > > > > Note that this changes the beha

Re: [PATCH 11/11] Deprecate stable non-JSON -device and -object

2021-09-27 Thread Kevin Wolf
Am 27.09.2021 um 11:00 hat Peter Maydell geschrieben: > On Fri, 24 Sept 2021 at 10:14, Kevin Wolf wrote: > > > > We want to switch both from QemuOpts to the keyval parser in the future, > > which results in some incompatibilities, mainly around list handling. > > Mark t

Re: [PATCH 11/11] Deprecate stable non-JSON -device and -object

2021-09-27 Thread Kevin Wolf
Am 27.09.2021 um 10:21 hat Daniel P. Berrangé geschrieben: > On Mon, Sep 27, 2021 at 10:15:43AM +0200, Paolo Bonzini wrote: > > On 24/09/21 11:04, Kevin Wolf wrote: > > > We want to switch both from QemuOpts to the keyval parser in the future, > > > which results in som

Re: [PATCH 05/11] qdev: Make DeviceState.id independent of QemuOpts

2021-09-24 Thread Kevin Wolf
Am 24.09.2021 um 16:02 hat Vladimir Sementsov-Ogievskiy geschrieben: > 24.09.2021 12:04, Kevin Wolf wrote: > > DeviceState.id is a pointer to a string that is stored in the QemuOpts > > object DeviceState.opts and freed together with it. We want to create > > devices without g

[PATCH 03/11] iotests/051: Fix typo

2021-09-24 Thread Kevin Wolf
The iothread isn't called 'iothread0', but 'thread0'. Depending on the order that properties are parsed, the error message may change from the expected one to another one saying that the iothread doesn't exist. Signed-off-by: Kevin Wolf --- tests/qemu-iotests

[PATCH 00/11] qdev: Add JSON -device and fix QMP device_add

2021-09-24 Thread Kevin Wolf
but if it does, there is the option of using the QemuOpts-less code path only for JSON -device and going through a deprecation period for QMP device_add. Kevin Wolf (11): qom: Reduce use of error_propagate() iotests/245: Fix type for iothread property iotests/051: Fix typo qdev: Avoid

[PATCH 06/11] qdev: Add Error parameter to qdev_set_id()

2021-09-24 Thread Kevin Wolf
the condition doesn't cause a crash, but fails gracefully. Signed-off-by: Kevin Wolf --- include/monitor/qdev.h | 2 +- hw/xen/xen-legacy-backend.c | 3 ++- softmmu/qdev-monitor.c | 16 ++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/includ

[PATCH 05/11] qdev: Make DeviceState.id independent of QemuOpts

2021-09-24 Thread Kevin Wolf
DeviceState.id is a pointer to a string that is stored in the QemuOpts object DeviceState.opts and freed together with it. We want to create devices without going through QemuOpts in the future, so make this a separately allocated string. Signed-off-by: Kevin Wolf --- include/hw/qdev-core.h

[PATCH 04/11] qdev: Avoid using string visitor for properties

2021-09-24 Thread Kevin Wolf
command line. In order to make sure that no devices start using this feature that would make backwards compatibility harder, just switch away from object_property_parse(), which internally uses the string visitor, to a keyval visitor and object_property_set(). Signed-off-by: Kevin Wolf --- so

[PATCH 09/11] qdev: Avoid QemuOpts in QMP device_add

2021-09-24 Thread Kevin Wolf
is a QDict, QList or QNull. To illustrate, the following QMP command was accepted before and is now rejected for both reasons: { "execute": "device_add", "arguments": { "driver": "scsi-cd", "drive": { "completely&qu

[PATCH 11/11] Deprecate stable non-JSON -device and -object

2021-09-24 Thread Kevin Wolf
. Signed-off-by: Kevin Wolf --- docs/about/deprecated.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 3c2be84d80..42f6a478fb 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -160,6 +160,17 @@ Use

[PATCH 10/11] vl: Enable JSON syntax for -device

2021-09-24 Thread Kevin Wolf
t tools to detect support for this. Signed-off-by: Kevin Wolf --- qapi/qdev.json | 15 + softmmu/vl.c | 58 -- 2 files changed, 62 insertions(+), 11 deletions(-) diff --git a/qapi/qdev.json b/qapi/qdev.json index b83178220b..cdc8f91

[PATCH 08/11] qdev: Base object creation on QDict rather than QemuOpts

2021-09-24 Thread Kevin Wolf
ommit doesn't remove the detour through QemuOpts from any code path yet, but it allows the following commits to do so. Signed-off-by: Kevin Wolf --- include/hw/qdev-core.h | 8 ++--- hw/core/qdev.c | 5 ++-- hw/net/virtio-net.c| 4 +-- hw/vfio/pci.c | 4 +-- so

[PATCH 07/11] qemu-option: Allow deleting opts during qemu_opts_foreach()

2021-09-24 Thread Kevin Wolf
Use QTAILQ_FOREACH_SAFE() so that the current QemuOpts can be deleted while iterating through the whole list. Signed-off-by: Kevin Wolf --- util/qemu-option.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/qemu-option.c b/util/qemu-option.c index 61cb4a97bd

[PATCH 02/11] iotests/245: Fix type for iothread property

2021-09-24 Thread Kevin Wolf
iothread is a string property, so None (= JSON null) is not a valid value for it. Pass the empty string instead to get the default iothread. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/245 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/245 b

[PATCH 01/11] qom: Reduce use of error_propagate()

2021-09-24 Thread Kevin Wolf
ERRP_GUARD() makes debugging easier by making sure that &error_abort still fails at the real origin of the error instead of error_propagate(). Signed-off-by: Kevin Wolf --- qom/object.c| 7 +++ qom/object_interfaces.c | 17 ++--- 2 files changed, 9 insertions(+)

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 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 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 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 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: 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: 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 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 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: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-15 Thread Kevin Wolf
Am 15.03.2021 um 16:26 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 13.03.2021 um 14:40 hat Markus Armbruster geschrieben: > >> Markus Armbruster writes: > >> > >> > Paolo Bonzini writes: > >> > > >> >>

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

2021-03-15 Thread Kevin Wolf
Am 15.03.2021 um 15:15 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 13.03.2021 um 13:30 hat Markus Armbruster geschrieben: > >> Paolo Bonzini writes: > >> > >> > On 13/03/21 08:40, Markus Armbruster wrote: > >> >>&

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

2021-03-15 Thread Kevin Wolf
Am 13.03.2021 um 09:41 hat Markus Armbruster geschrieben: > Observation, not objection: > > 1. QMP core parses JSON text into QObject, passes to generated >marshaller. > > 2. Marshaller converts QObject to ObjectOptions with the QObject input >visitor, passes to qmp_object_add(). > > 3.

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

2021-03-15 Thread Kevin Wolf
Am 13.03.2021 um 13:30 hat Markus Armbruster geschrieben: > Paolo Bonzini writes: > > > On 13/03/21 08:40, Markus Armbruster wrote: > >>> +if (!user_creatable_add_from_str(optarg, &local_err)) { > >>> +if (local_err) { > >>> +error_repor

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

2021-03-15 Thread Kevin Wolf
Am 13.03.2021 um 14:40 hat Markus Armbruster geschrieben: > Markus Armbruster writes: > > > Paolo Bonzini writes: > > > >> On 11/03/21 15:08, Markus Armbruster wrote: > I would rather keep the OptsVisitor here. Do the same check for JSON > syntax that you have in qobject_input_visitor

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 > &

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 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 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-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

[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

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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

  1   2   3   4   >