[PATCH v2 0/3] vl: QAPIfy -object

Paolo Bonzini posted 3 patches 3 years, 1 month ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210312173547.1283477-1-pbonzini@redhat.com
Maintainers: "Daniel P. Berrangé" <berrange@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
include/qom/object_interfaces.h | 47 -------------------
qom/object_interfaces.c         | 54 ---------------------
softmmu/vl.c                    | 83 ++++++++++++++++++++++++++-------
tests/check-qom-proplist.c      | 77 +++++++++++++++++++++---------
4 files changed, 120 insertions(+), 141 deletions(-)
[PATCH v2 0/3] vl: QAPIfy -object
Posted by Paolo Bonzini 3 years, 1 month ago
This is a replacement for -object QAPIfication that keeps QemuOpts
in order to not break some of the CLI parsing extensions that OptsVisitor
includes.  Since keyval is not used, support for directly passing
JSON syntax to the option must be added manually, which is what patch
3 does.  However, both the QemuOpts and the JSON paths go through
the new ObjectOptions interface, just with two different visitors,
so we can reuse all the new type-safe code that Kevin has added.

Patch 1 is a patch that I already had lying around, which I included
to be able to remove user_creatable_add_opts completely in patch 2.

Paolo

Based-on: <20210311144811.313451-1-kwolf@redhat.com>

Paolo Bonzini (3):
  tests: convert check-qom-proplist to keyval
  qom: move user_creatable_add_opts logic to vl.c and QAPIfy it
  vl: allow passing JSON to -object

 include/qom/object_interfaces.h | 47 -------------------
 qom/object_interfaces.c         | 54 ---------------------
 softmmu/vl.c                    | 83 ++++++++++++++++++++++++++-------
 tests/check-qom-proplist.c      | 77 +++++++++++++++++++++---------
 4 files changed, 120 insertions(+), 141 deletions(-)

v1->v2: avoid g_assert with side effects, fix -object without qom-type

-- 
2.26.2


Re: [PATCH v2 0/3] vl: QAPIfy -object
Posted by Kevin Wolf 3 years, 1 month ago
Am 12.03.2021 um 18:35 hat Paolo Bonzini geschrieben:
> This is a replacement for -object QAPIfication that keeps QemuOpts
> in order to not break some of the CLI parsing extensions that OptsVisitor
> includes.  Since keyval is not used, support for directly passing
> JSON syntax to the option must be added manually, which is what patch
> 3 does.  However, both the QemuOpts and the JSON paths go through
> the new ObjectOptions interface, just with two different visitors,
> so we can reuse all the new type-safe code that Kevin has added.
> 
> Patch 1 is a patch that I already had lying around, which I included
> to be able to remove user_creatable_add_opts completely in patch 2.
> 
> Paolo
> 
> Based-on: <20210311144811.313451-1-kwolf@redhat.com>

Thanks, applied to the block branch.

Kevin