qemu-e2k/scripts
Markus Armbruster 75ecee7262 qapi: Enable enum member introspection to show more than name
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 name member, we could simply add more
members to these objects.  Since it's just strings, we can't.

I can see three ways to correct this design mistake:

1. Do it the way we should have done it, plus compatibility goo.

   We want a ['SchemaInfoEnumMember'] member in SchemaInfoEnum.  Since
   changing @values would be a compatibility break, add a new member
   @members instead.

   @values is now redundant.  In my testing, output of
   qemu-system-x86_64's query-qmp-schema grows by 11% (18.5KiB).

   We can deprecate @values now and drop it later.  This will break
   outmoded clients.  Well-behaved clients such as libvirt are
   expected to break cleanly.

2. Like 1, but omit "boring" elements of @member, and empty @member.

   @values does not become redundant.  @members augments it.  Somewhat
   cumbersome, but output of query-qmp-schema grows only as we make
   enum members non-boring.

   There is nothing to deprecate here.

3. Versioned query-qmp-schema.

   query-qmp-schema provides either @values or @members.  The QMP
   client can select which version it wants.  There is no redundant
   output.

   We can deprecate old versions and eventually drop them.  This will
   break outmoded clients.  Breaking cleanly is easier than for 1.

   While 1 and 2 operate within the common rules for compatible
   evolution apply (section "Compatibility considerations" in
   docs/devel/qapi-code-gen.rst), 3 bypasses them.  Attractive when
   operating within the rules is just too awkward.  Not the case here.

This commit implements 1.  Libvirt developers prefer it.

Deprecate @values in favour of @members.  Since query-qmp-schema
compatibility is pretty fundamental for management applications, an
extended grace period is advised.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Tested-by: Peter Krempa <pkrempa@redhat.com>
Acked-by: Peter Krempa <pkrempa@redhat.com>
Message-Id: <20211025042405.3762351-2-armbru@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
2021-10-27 17:18:43 +02:00
..
ci Jobs based on custom runners: docs and gitlab-runner setup playbook 2021-07-14 14:31:48 +01:00
coccinelle softmmu/memory: Pass ram_flags to memory_region_init_ram_shared_nomigrate() 2021-06-15 20:27:38 +02:00
codeconverter scripts/codeconverter: Update to latest version 2020-09-18 14:12:32 -04:00
coverity-scan coverity-model: write models fully for non-array allocation functions 2021-07-30 12:04:01 +02:00
kvm scripts/kvm/vmxcap: Use Python 3 interpreter and add pseudo-main() 2020-05-31 13:56:46 +02:00
modules scripts/modules/module_block: Use Python 3 interpreter & add pseudo-main 2020-05-31 13:56:46 +02:00
oss-fuzz fuzz: add an instrumentation filter 2021-09-01 07:33:13 -04:00
performance scripts/performance: Add dissect.py script 2020-07-14 22:22:22 +02:00
qapi qapi: Enable enum member introspection to show more than name 2021-10-27 17:18:43 +02:00
qemu-guest-agent qemu-guest-agent: freeze-hook to ignore dpkg files as well 2018-08-23 18:46:25 +02:00
qemugdb scripts/gdb: implement 'qemu bt' 2021-01-12 12:38:03 +01:00
qmp scripts/qmp-shell: add redirection shim 2021-06-18 16:10:07 -04:00
simplebench simplebench: add img_bench_templater.py 2021-09-15 15:54:07 +02:00
tracetool scripts/tracetool: Replace the word 'whitelist' 2021-03-09 22:14:26 +01:00
analyse-9p-simpletrace.py drop "from __future__ import print_function" 2020-02-07 15:15:16 +01:00
analyse-locks-simpletrace.py drop "from __future__ import print_function" 2020-02-07 15:15:16 +01:00
analyze-inclusions Move target-* CPU file into a target/ folder 2016-12-20 21:52:12 +01:00
analyze-migration.py analyze-migration.py: fix extract contents ('-x') errors 2021-10-23 20:28:56 +02:00
archive-source.sh build-sys: add meson submodule 2020-08-21 06:30:06 -04:00
block-coroutine-wrapper.py block-coroutine-wrapper.py: support BlockBackend first argument 2021-10-15 15:51:33 -05:00
check_sparse.py meson: move sparse detection to Meson and rewrite check_sparse.py 2020-10-04 18:36:23 +02:00
checkpatch.pl scripts/checkpatch: roll diff tweaking into checkpatch itself 2021-06-25 10:08:33 +01:00
clean-header-guards.pl scripts/: fix some comment spelling errors 2020-09-17 20:37:55 +02:00
clean-includes meson: rename included C source files to .c.inc 2020-08-21 06:18:30 -04:00
cleanup-trace-events.pl scripts/cleanup-trace-events: Emit files in alphabetical order 2020-09-09 17:17:00 +01:00
cocci-macro-file.h compiler.h: remove QEMU_GNUC_PREREQ 2020-12-15 12:53:15 -05:00
cpu-x86-uarch-abi.py scripts: helper to generate x86_64 CPU ABI compat info 2021-06-17 14:11:06 -04:00
decodetree.py decodetree: Extend argument set syntax to allow types 2021-05-01 11:45:35 -07:00
device-crash-test device-crash-test: Ignore errors about a bus not being available 2021-04-01 14:28:39 +02:00
disas-objdump.pl scripts: Switch to more portable Perl shebang 2017-05-10 10:19:24 +03:00
dump-guest-memory.py drop "from __future__ import print_function" 2020-02-07 15:15:16 +01:00
entitlement.sh meson: Use input/output for entitlements target 2021-07-09 18:21:34 +02:00
extract-vsssdk-headers Add a script to extract VSS SDK headers on POSIX system 2013-09-09 14:17:56 -05:00
feature_to_c.sh meson: cpu-emu 2020-08-21 06:30:39 -04:00
fix-multiline-comments.sh docs: move CODING_STYLE into the developer documentation 2021-02-24 11:05:21 +00:00
gensyscalls.sh Hexagon (linux-user/hexagon) Linux user emulation 2021-02-18 07:48:22 -08:00
get_maintainer.pl get_maintainer: update repo URL to GitLab 2021-02-09 20:53:56 +00:00
git-submodule.sh configure: replace --enable/disable-git-update with --with-git-submodules 2021-01-29 17:07:53 +00:00
git.orderfile scripts/git.orderfile: Keep files with .inc extension sorted 2020-12-15 12:53:16 -05:00
hxtool meson: generate hxtool files 2020-08-21 06:30:14 -04:00
hxtool-conv.pl scripts/hxtool-conv: Archive script used in qemu-options.hx conversion 2020-03-06 10:05:24 +00:00
kernel-doc scripts/kernel-doc: strip QEMU_ from function definitions 2021-03-24 14:24:40 +00:00
make-release roms/edk2: Only initialize required submodules 2021-10-20 16:26:19 -07:00
meson-buildoptions.py configure: automatically parse command line for meson -D options 2021-10-14 09:51:06 +02:00
meson-buildoptions.sh configure: automatically parse command line for meson -D options 2021-10-14 09:51:06 +02:00
meson.build trace: move configuration from configure to Meson 2021-10-14 09:50:56 +02:00
minikconf.py meson: infrastructure for building emulators 2020-08-21 06:30:17 -04:00
modinfo-collect.py modules: collect module meta-data 2021-07-09 18:20:27 +02:00
modinfo-generate.py modules: check if all dependencies can be satisfied 2021-07-09 18:20:27 +02:00
mtest2make.py meson: switch minimum meson version to 0.58.2, minimum recommended to 0.59.2 2021-10-05 13:10:29 +02:00
nsis.py meson: Fix argument for makensis (build regression) 2020-11-18 09:28:55 +01:00
qapi-gen.py qapi: move generator entrypoint into package 2020-10-10 11:37:47 +02:00
qemu-binfmt-conf.sh scripts: fix generation update-binfmts templates 2021-05-03 10:07:41 +02:00
qemu-gdb.py scripts/gdb: implement 'qemu bt' 2021-01-12 12:38:03 +01:00
qemu-trace-stap qemu-trace-stap: changing SYSTEMTAP_TAPSET considered harmful. 2021-07-12 17:37:06 +01:00
qemu-version.sh build-sys: fix git version from -version 2020-10-12 11:50:23 -04:00
refresh-pxe-roms.sh roms: rewrite scripts/refresh-pxe-roms.sh 2013-09-30 09:44:35 +02:00
render_block_graph.py python/qmp.py: re-absorb MonitorResponseError 2020-07-14 22:22:22 +02:00
replay-dump.py nomaintainer: Fix Lesser GPL version number 2020-11-15 17:04:40 +01:00
shaderinclude.pl scripts: Switch to more portable Perl shebang 2017-05-10 10:19:24 +03:00
signrom.py drop "from __future__ import print_function" 2020-02-07 15:15:16 +01:00
simpletrace.py docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
switch-timer-api scripts: Switch to more portable Perl shebang 2017-05-10 10:19:24 +03:00
tap-driver.pl scripts: improve message when TAP based tests fail 2020-07-10 19:26:55 -04:00
tap-merge.pl tap: flush STDOUT on newline 2019-02-05 16:50:16 +01:00
test-driver.py mtest2make: hide output of successful tests 2020-09-08 07:17:09 +02:00
tracetool.py tracetool: add output filename command-line argument 2021-01-04 14:24:58 +00:00
u2f-setup-gen.py scripts: Add u2f-setup-gen script 2020-08-31 08:23:39 +02:00
undefsym.py build: fix macOS --enable-modules build 2020-10-22 11:53:52 -04:00
update-linux-headers.sh headers: Add udmabuf.h 2021-05-27 12:06:37 +02:00
update-mips-syscall-args.sh linux-user, mips: update syscall-args-o32.c.inc to Linux v5.13 2021-07-13 13:59:59 +02:00
update-syscalltbl.sh linux-user, scripts: add a script to update syscall.tbl 2020-03-20 16:02:00 +01:00
userfaultfd-wrlat.py migration: introduce 'userfaultfd-wrlat.py' script 2021-02-08 11:19:51 +00:00
vmstate-static-checker.py drop "from __future__ import print_function" 2020-02-07 15:15:16 +01:00