qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/8] Configurable policy for handling deprecated interfaces
@ 2020-09-14  8:47 Markus Armbruster
  2020-09-14  8:47 ` [PATCH v5 1/8] qemu-options: New -compat to set policy for " Markus Armbruster
                   ` (9 more replies)
  0 siblings, 10 replies; 27+ messages in thread
From: Markus Armbruster @ 2020-09-14  8:47 UTC (permalink / raw)
  To: qemu-devel
  Cc: Lukáš Doktor, Kevin Wolf, Peter Krempa,
	Daniel P . Berrange, libvir-list, mdroth, marcandre.lureau,
	libguestfs

New option -compat lets you configure what to do when deprecated
interfaces get used.  This is intended for testing users of the
management interfaces.  It is experimental.

-compat deprecated-input=<in-policy> configures what to do when
deprecated input is received.  Available policies:

* accept: Accept deprecated commands and arguments (default)
* reject: Reject them
* crash: Crash

-compat deprecated-output=<out-policy> configures what to do when
deprecated output is sent.  Available output policies:

* accept: Emit deprecated command results and events (default)
* hide: Suppress them

For now, -compat covers only deprecated syntactic aspects of QMP.  We
may want to extend it to cover semantic aspects, CLI, and experimental
features.

v5:
* Old PATCH 01-26 merged in commit f57587c7d47.
* Rebased, non-trivial conflicts in PATCH 1 due to Meson, and in PATCH
  7 due to visitor changes
* PATCH 1: Comments updated for 5.2 [Eric]
* PATCH 2: Harmless missing initialization fixed [Eric]
* PATCH 3+4: Harmless missing has_FOO = true fixed [Eric]
* PATCH 6+7: Commit message tweaked

v4:
* PATCH 05+07: Temporary memory leak plugged [Marc-André]
* PATCH 23: Rewritten [Marc-André]
* PATCH 24: Comment typo [Marc-André]
* PATCH 30: Memory leaks plugged

v3:
* Rebased, non-trivial conflicts in PATCH 01+26+27+34 due to RST
  conversion and code motion
* PATCH 28-29: Old PATCH 28 split up to ease review
* PATCH 30-31: New
* PATCH 32-33: Old PATCH 29 split up to ease review

Comparison to RFC (24 Oct 2019):
* Cover arguments and results in addition to commands and events
* Half-baked "[RFC PATCH 18/19] qapi: Include a warning in the
  response to a deprecated command" dropped

See also last item of
    Subject: Minutes of KVM Forum BoF on deprecating stuff
    Date: Fri, 26 Oct 2018 16:03:51 +0200
    Message-ID: <87mur0ls8o.fsf@dusky.pond.sub.org>
    https://lists.nongnu.org/archive/html/qemu-devel/2018-10/msg05828.html

Cc: Lukáš Doktor <ldoktor@redhat.com>
Cc: libguestfs@redhat.com
Cc: libvir-list@redhat.com
Cc: Daniel P. Berrange <berrange@redhat.com>
Cc: Peter Krempa <pkrempa@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>

Markus Armbruster (8):
  qemu-options: New -compat to set policy for deprecated interfaces
  qapi: Implement deprecated-output=hide for QMP command results
  qapi: Implement deprecated-output=hide for QMP events
  qapi: Implement deprecated-output=hide for QMP event data
  qapi: Implement deprecated-output=hide for QMP introspection
  qapi: Implement deprecated-input=reject for QMP commands
  qapi: Implement deprecated-input=reject for QMP command arguments
  qapi: New -compat deprecated-input=crash

 qapi/compat.json                        |  52 ++++++++++++
 qapi/introspect.json                    |   2 +-
 qapi/qapi-schema.json                   |   1 +
 include/qapi/compat-policy.h            |  20 +++++
 include/qapi/qmp/dispatch.h             |   1 +
 include/qapi/qobject-input-visitor.h    |   9 +++
 include/qapi/qobject-output-visitor.h   |   9 +++
 include/qapi/visitor-impl.h             |   6 ++
 include/qapi/visitor.h                  |  18 +++++
 monitor/monitor-internal.h              |   3 -
 monitor/misc.c                          |   2 -
 monitor/qmp-cmds-control.c              | 100 +++++++++++++++++++++---
 qapi/qapi-visit-core.c                  |  18 +++++
 qapi/qmp-dispatch.c                     |  17 ++++
 qapi/qobject-input-visitor.c            |  29 +++++++
 qapi/qobject-output-visitor.c           |  19 +++++
 softmmu/vl.c                            |  17 ++++
 storage-daemon/qemu-storage-daemon.c    |   2 -
 tests/test-qmp-cmds.c                   |  91 +++++++++++++++++++--
 tests/test-qmp-event.c                  |  41 ++++++++++
 qapi/meson.build                        |   1 +
 qapi/trace-events                       |   2 +
 qemu-options.hx                         |  22 ++++++
 scripts/qapi/commands.py                |  14 ++--
 scripts/qapi/events.py                  |  22 +++++-
 scripts/qapi/visit.py                   |  15 ++++
 tests/qapi-schema/qapi-schema-test.json |  20 +++--
 tests/qapi-schema/qapi-schema-test.out  |  20 ++---
 28 files changed, 522 insertions(+), 51 deletions(-)
 create mode 100644 qapi/compat.json
 create mode 100644 include/qapi/compat-policy.h

-- 
2.26.2



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

end of thread, other threads:[~2020-09-21 16:32 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-14  8:47 [PATCH v5 0/8] Configurable policy for handling deprecated interfaces Markus Armbruster
2020-09-14  8:47 ` [PATCH v5 1/8] qemu-options: New -compat to set policy for " Markus Armbruster
2020-09-14 11:50   ` Peter Krempa
2020-09-21 14:35     ` Markus Armbruster
2020-09-14 15:08   ` Eric Blake
2020-09-21 12:01     ` Richard W.M. Jones
2020-09-14  8:47 ` [PATCH v5 2/8] qapi: Implement deprecated-output=hide for QMP command results Markus Armbruster
2020-09-14  8:47 ` [PATCH v5 3/8] qapi: Implement deprecated-output=hide for QMP events Markus Armbruster
2020-09-14 15:19   ` Eric Blake
2020-09-14  8:47 ` [PATCH v5 4/8] qapi: Implement deprecated-output=hide for QMP event data Markus Armbruster
2020-09-14 15:35   ` Eric Blake
2020-09-14  8:47 ` [PATCH v5 5/8] qapi: Implement deprecated-output=hide for QMP introspection Markus Armbruster
2020-09-14 15:43   ` Eric Blake
2020-09-21 14:41     ` Markus Armbruster
2020-09-14  8:48 ` [PATCH v5 6/8] qapi: Implement deprecated-input=reject for QMP commands Markus Armbruster
2020-09-14 15:45   ` Eric Blake
2020-09-14  8:48 ` [PATCH v5 7/8] qapi: Implement deprecated-input=reject for QMP command arguments Markus Armbruster
2020-09-14 15:57   ` Eric Blake
2020-09-14  8:48 ` [PATCH v5 8/8] qapi: New -compat deprecated-input=crash Markus Armbruster
2020-09-14 15:58   ` Eric Blake
2020-09-21 14:42     ` Markus Armbruster
2020-09-21 12:45 ` [PATCH v5 0/8] Configurable policy for handling deprecated interfaces Richard W.M. Jones
2020-09-21 12:54   ` Peter Krempa
2020-09-21 12:58     ` Richard W.M. Jones
2020-09-21 12:56 ` Peter Maydell
2020-09-21 14:58   ` Markus Armbruster
2020-09-21 16:28     ` Peter Maydell

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