qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/25] qemu-option, keyval, vl: switch -object/-M/-accel to keyval parsing
@ 2021-01-18 16:30 Paolo Bonzini
  2021-01-18 16:30 ` [PATCH 01/25] qemu-option: clean up id vs. list->merge_lists Paolo Bonzini
                   ` (25 more replies)
  0 siblings, 26 replies; 67+ messages in thread
From: Paolo Bonzini @ 2021-01-18 16:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, imammedo, armbru

This series switches -object, -M and -accel from QemuOpts to keyval.
Monitor commands device_add and netdev_add are also switched to keyval,
though -device and -netdev for now are not.

Along the way, the syntax of keyval and QemuOpts becomes more consistent
and support for keyval-based options is added to -readconfig.  -writeconfig
instead is removed (see patch 13 for rationale).

The reason to do this is:

- to make qemu-io, qemu-nbd, qemu-img and QEMU's parsing of -object
  consistent with qemu-storage-daemon's

- to allow using compound properties in -object, -M and -accel

Patch 1-3: make QemuOpts parsing a bit more restrictive, warning for
short-form boolean options and removing weird ways to request help
such as "help=foo" or "no?".

Patch 4-10: let keyval accept escaped commas in implied options,
switch comma-separated syntax for HMP from QemuOpts to keyval,
add help support to object_add

Patch 11-16: plumbing for reading keyval-based options in vl.c,
including -set and -readconfig.  The patches up to this point are
the ones that I'd like to get a relatively fast review, since the
remaining nine are more "boring".

Patch 17-21: switch -object to keyval everywhere

Patch 22-25: switch -M and -accel to keyval

Based-on: <20210118162537.779542-1-pbonzini@redhat.com>

Paolo Bonzini (25):
  qemu-option: clean up id vs. list->merge_lists
  qemu-option: move help handling to get_opt_name_value
  qemu-option: warn for short-form boolean options
  keyval: accept escaped commas in implied option
  keyval: simplify keyval_parse_one
  tests: convert check-qom-proplist to keyval
  keyval: introduce keyval_parse_into
  hmp: replace "O" parser with keyval
  qom: use qemu_printf to print help for user-creatable objects
  hmp: special case help options for object_add
  remove -writeconfig
  qemu-config: add error propagation to qemu_config_parse
  qemu-option: support accept-any QemuOptsList in qemu_opts_absorb_qdict
  qemu-config: parse configuration files to a QDict
  vl: plumb keyval-based options into -set and -readconfig
  qom: do not modify QDict argument in user_creatable_add_dict
  qemu-io: use keyval for -object parsing
  qemu-nbd: use keyval for -object parsing
  qemu-img: use keyval for -object parsing
  qemu: use keyval for -object parsing
  storage-daemon: do not register the "object" group with QemuOpts
  qom: export more functions for use with non-UserCreatable objects
  vl: switch -M parsing to keyval
  qemu-option: remove now-dead code
  vl: switch -accel parsing to keyval

 accel/accel.c                        |   6 +
 block/blkdebug.c                     |   3 +-
 docs/system/deprecated.rst           |   6 +
 hmp-commands.hx                      |   6 +-
 include/block/qdict.h                |   2 -
 include/qapi/qmp/qdict.h             |   3 +
 include/qemu/config-file.h           |   9 +-
 include/qemu/help_option.h           |  11 -
 include/qemu/option.h                |   6 +-
 include/qom/object.h                 |  21 +
 include/qom/object_interfaces.h      |  68 +--
 include/sysemu/accel.h               |   1 +
 monitor/hmp-cmds.c                   |  22 +-
 monitor/hmp.c                        |  20 +-
 qemu-img.c                           | 258 +++-------
 qemu-io.c                            |  42 +-
 qemu-nbd.c                           |  42 +-
 qemu-options.hx                      |  13 +-
 qom/object_interfaces.c              | 152 ++----
 softmmu/vl.c                         | 673 ++++++++++++++-------------
 storage-daemon/qemu-storage-daemon.c |  10 -
 tests/check-qom-proplist.c           |  58 ++-
 tests/test-keyval.c                  |  58 ++-
 tests/test-qemu-opts.c               |  37 +-
 util/keyval.c                        | 231 +++++----
 util/qemu-config.c                   | 141 +++---
 util/qemu-option.c                   | 126 +++--
 27 files changed, 918 insertions(+), 1107 deletions(-)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 67+ messages in thread

end of thread, other threads:[~2021-03-01 13:40 UTC | newest]

Thread overview: 67+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 16:30 [PATCH 00/25] qemu-option, keyval, vl: switch -object/-M/-accel to keyval parsing Paolo Bonzini
2021-01-18 16:30 ` [PATCH 01/25] qemu-option: clean up id vs. list->merge_lists Paolo Bonzini
2021-01-19 12:33   ` Kevin Wolf
2021-01-19 13:58   ` Markus Armbruster
2021-01-19 14:20     ` Paolo Bonzini
2021-01-20  8:03       ` Markus Armbruster
2021-01-20 12:37         ` Paolo Bonzini
2021-01-20 12:50           ` Markus Armbruster
2021-01-18 16:30 ` [PATCH 02/25] qemu-option: move help handling to get_opt_name_value Paolo Bonzini
2021-01-19 15:10   ` Markus Armbruster
2021-01-18 16:30 ` [PATCH 03/25] qemu-option: warn for short-form boolean options Paolo Bonzini
2021-01-19 15:56   ` Markus Armbruster
2021-01-19 17:04     ` Paolo Bonzini
2021-01-20  8:42       ` Markus Armbruster
2021-01-20 12:40         ` Paolo Bonzini
2021-01-20 12:59           ` Markus Armbruster
2021-01-20 14:05             ` Paolo Bonzini
2021-01-18 16:30 ` [PATCH 04/25] keyval: accept escaped commas in implied option Paolo Bonzini
2021-01-21 12:58   ` Markus Armbruster
2021-01-22  8:39   ` Markus Armbruster
2021-01-18 16:30 ` [PATCH 05/25] keyval: simplify keyval_parse_one Paolo Bonzini
2021-01-22 13:48   ` Markus Armbruster
2021-01-22 15:00     ` Paolo Bonzini
2021-01-22 15:44       ` Markus Armbruster
2021-01-18 16:30 ` [PATCH 06/25] tests: convert check-qom-proplist to keyval Paolo Bonzini
2021-01-22 14:14   ` Markus Armbruster
2021-01-22 14:38     ` Paolo Bonzini
2021-01-22 14:48     ` Paolo Bonzini
2021-01-18 16:30 ` [PATCH 07/25] keyval: introduce keyval_parse_into Paolo Bonzini
2021-01-22 14:22   ` Markus Armbruster
2021-01-22 14:30     ` Paolo Bonzini
2021-01-18 16:30 ` [PATCH 08/25] hmp: replace "O" parser with keyval Paolo Bonzini
2021-01-25  9:00   ` Markus Armbruster
2021-02-26 11:25     ` Paolo Bonzini
2021-03-01 10:14       ` Markus Armbruster
2021-03-01 10:23         ` Paolo Bonzini
2021-03-01 13:35           ` Markus Armbruster
2021-03-01 10:43     ` Markus Armbruster
2021-03-01 11:54       ` Paolo Bonzini
2021-01-18 16:30 ` [PATCH 09/25] qom: use qemu_printf to print help for user-creatable objects Paolo Bonzini
2021-01-25 12:47   ` Markus Armbruster
2021-01-18 16:30 ` [PATCH 10/25] hmp: special case help options for object_add Paolo Bonzini
2021-01-25 12:48   ` Markus Armbruster
2021-01-25 12:49     ` Paolo Bonzini
2021-01-25 14:02       ` Markus Armbruster
2021-01-18 16:30 ` [PATCH 11/25] remove -writeconfig Paolo Bonzini
2021-01-25 12:53   ` Markus Armbruster
2021-01-25 14:01     ` Paolo Bonzini
2021-01-25 14:12       ` Daniel P. Berrangé
2021-01-18 16:31 ` [PATCH 12/25] qemu-config: add error propagation to qemu_config_parse Paolo Bonzini
2021-01-25 13:54   ` Markus Armbruster
2021-01-18 16:31 ` [PATCH 13/25] qemu-option: support accept-any QemuOptsList in qemu_opts_absorb_qdict Paolo Bonzini
2021-01-18 16:31 ` [PATCH 14/25] qemu-config: parse configuration files to a QDict Paolo Bonzini
2021-01-18 16:31 ` [PATCH 15/25] vl: plumb keyval-based options into -set and -readconfig Paolo Bonzini
2021-01-25 11:48   ` Markus Armbruster
2021-01-25 13:59     ` Paolo Bonzini
2021-01-18 16:31 ` [PATCH 16/25] qom: do not modify QDict argument in user_creatable_add_dict Paolo Bonzini
2021-01-18 16:31 ` [PATCH 17/25] qemu-io: use keyval for -object parsing Paolo Bonzini
2021-01-18 16:31 ` [PATCH 18/25] qemu-nbd: " Paolo Bonzini
2021-01-18 16:31 ` [PATCH 19/25] qemu-img: " Paolo Bonzini
2021-01-18 16:31 ` [PATCH 20/25] qemu: " Paolo Bonzini
2021-01-18 16:31 ` [PATCH 21/25] storage-daemon: do not register the "object" group with QemuOpts Paolo Bonzini
2021-01-18 16:31 ` [PATCH 22/25] qom: export more functions for use with non-UserCreatable objects Paolo Bonzini
2021-01-18 16:31 ` [PATCH 23/25] vl: switch -M parsing to keyval Paolo Bonzini
2021-01-18 16:31 ` [PATCH 24/25] qemu-option: remove now-dead code Paolo Bonzini
2021-01-18 16:31 ` [PATCH 25/25] vl: switch -accel parsing to keyval Paolo Bonzini
2021-01-18 17:18 ` [PATCH 00/25] qemu-option, keyval, vl: switch -object/-M/-accel to keyval parsing no-reply

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).