Pending prerequisite: Markus' qapi-next branch (which has the first half of my subset B patches): git://repo.or.cz/qemu/armbru.git pull-qapi-2015-10-15 https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg03321.html
Pending prerequisite: Paolo's rewrite of qemu-char: https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg03238.html Also available as a tag at this location: git fetch git://repo.or.cz/qemu/ericb.git qapi-cleanupv9b and I plan to eventually forcefully update my branch with the rest of the v5 series, at: http://repo.or.cz/qemu/ericb.git/shortlog/refs/heads/qapi v9 notes: Calling this subset B', because it is mostly new content, but based heavily on review comments on subset B. Also, I need to rebase pending subset C on top of this. A couple patches from v5 have been hoisted earlier into the series; while v8 11/18 (Simplify gen_struct_field()) makes an appearance at the end, and v8 10/18 (Move union tag quirks into subclass) is all but eliminated. Since the concepts of these patches has been on the list for a while, it should be safe to take even during soft freeze, even if the actual versions of these patches have lots of new content. The general goal of this batch of patches is to rework the C layout of qapi unions so that we get rid of the type/kind mismatch and isolate tag values from colliding with QMP names. The tail end of v8 (detecting collisions in check()) will have to wait a bit longer, but it should be a lot easier to reason about now that there are fewer collisions possible. Not worth a backport diff, since most of it is new or previously unreviewed. v8 notes: https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg02879.html Address review comments, including fixing a bug with tracking branch name collisions. Include a few more simple test cleanups (4-6), and add another patch (11) that will make converting from kind=>type easier in a later subset. More details in per-patch changelogs. v7 notes: https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg01387.html Address comments, including a couple of new commits that made later patches a bit cleaner. Backport diff gets a bit confused by a couple of patch titles changing. v6 notes: https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg00562.html This is patches 11-16 of my v5 series; it has grown a bit with splitting some patches and adding some others. I suspect that 12/12 on this series will be discarded, but am including it because it was split from v5 content. Not much review comments other than on the original 11/46, but there is enough churn due to rebasing that it's now easier to review this version than plowing through v5. Subset C (and more?) will come later. In v5: https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg05410.html I _did_ rearrange patches to try and group related features: 1-2: Groundwork cleanups 3-5: Add more test cases 6-16: Front-end cleanups 17-18: Introspection output cleanups 19-20: 'alternate' type cleanups 21-29: qapi visitor cleanups 30-45: qapi-ify netdev_add 46: add qapi shorthand for flat unions Lots of fixes based on additional testing, and rebased to track other changes that happened in the meantime. The series is huge; I can split off smaller portions as requested. In v4: https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg02580.html add some more clean up patches rebase to Markus' recent work pull in part of Zoltán's work to make netdev_add a flat union, further enhancing it to be introspectible I might be able to rearrange some of these patches, or separate it into smaller independent series, if requested; but I'm posting now to get review started. In v3: https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg02059.html redo cleanup of dealloc of partial struct add patches to make all visit_type_*() avoid leaks on failure add patches to allow boxed command arguments and events In v2: https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg00900.html rebase to Markus' v3 series rework how comments are emitted for fields inherited from base additional patches added for deleting colliding 'void *data' documentation updates to match code changes v1 was here: https://lists.gnu.org/archive/html/qemu-devel/2015-07/msg05266.html https://lists.gnu.org/archive/html/qemu-devel/2015-07/msg05325.html Eric Blake (17): qapi: Add tests for reserved name abuse qapi: Reserve '*List' type names for arrays qapi: Reserve 'u' and 'has[-_]*' member names vnc: hoist allocation of VncBasicInfo to callers qapi: Unbox base members qapi-visit: Remove redundant functions for flat union base qapi: Start converting to new qapi union layout tests: Convert to new qapi union layout block: Convert to new qapi union layout nbd: Convert to new qapi union layout net: Convert to new qapi union layout char: Convert to new qapi union layout input: Convert to new qapi union layout memory: Convert to new qapi union layout tpm: Convert to new qapi union layout qapi: Finish converting to new qapi union layout qapi: Simplify gen_struct_field() block/nbd.c | 18 +-- block/qcow2.c | 10 +- block/vmdk.c | 6 +- blockdev.c | 47 +++--- docs/qapi-code-gen.txt | 8 +- hmp.c | 26 ++-- hw/char/escc.c | 12 +- hw/input/hid.c | 32 ++--- hw/input/ps2.c | 24 ++-- hw/input/virtio-input-hid.c | 27 ++-- hw/mem/pc-dimm.c | 6 +- net/dump.c | 4 +- net/hub.c | 4 +- net/l2tpv3.c | 4 +- net/net.c | 24 ++-- net/slirp.c | 4 +- net/socket.c | 4 +- net/tap-win32.c | 4 +- net/tap.c | 8 +- net/vde.c | 4 +- net/vhost-user.c | 4 +- numa.c | 8 +- qemu-char.c | 160 ++++++++++----------- qemu-nbd.c | 16 +-- scripts/qapi-types.py | 51 +++---- scripts/qapi-visit.py | 58 ++++---- scripts/qapi.py | 25 +++- spice-qemu-char.c | 12 +- tests/Makefile | 4 +- tests/qapi-schema/args-name-has.err | 1 + tests/qapi-schema/args-name-has.exit | 1 + tests/qapi-schema/args-name-has.json | 5 + ...truct-base-clash-base.err => args-name-has.out} | 0 tests/qapi-schema/flat-union-clash-branch.err | 1 + tests/qapi-schema/flat-union-clash-branch.exit | 2 +- tests/qapi-schema/flat-union-clash-branch.json | 18 ++- tests/qapi-schema/flat-union-clash-branch.out | 14 -- tests/qapi-schema/qapi-schema-test.json | 12 ++ tests/qapi-schema/qapi-schema-test.out | 15 ++ tests/qapi-schema/struct-base-clash-base.exit | 1 - tests/qapi-schema/struct-base-clash-base.json | 9 -- tests/qapi-schema/struct-base-clash-base.out | 5 - tests/qapi-schema/struct-member-u.err | 1 + tests/qapi-schema/struct-member-u.exit | 1 + tests/qapi-schema/struct-member-u.json | 6 + tests/qapi-schema/struct-member-u.out | 0 tests/qapi-schema/struct-name-list.err | 1 + tests/qapi-schema/struct-name-list.exit | 1 + tests/qapi-schema/struct-name-list.json | 5 + tests/qapi-schema/struct-name-list.out | 0 tests/qapi-schema/union-clash-type.err | 2 +- tests/qapi-schema/union-clash-type.json | 6 +- tests/test-qmp-commands.c | 19 +-- tests/test-qmp-event.c | 8 +- tests/test-qmp-input-visitor.c | 82 +++++------ tests/test-qmp-output-visitor.c | 54 ++++--- tests/test-visitor-serialization.c | 14 +- tpm.c | 4 +- ui/console.c | 20 +-- ui/input-keymap.c | 20 +-- ui/input-legacy.c | 21 +-- ui/input.c | 84 +++++------ ui/spice-core.c | 23 +-- ui/vnc.c | 64 +++++---- util/qemu-sockets.c | 42 +++--- 65 files changed, 596 insertions(+), 580 deletions(-) create mode 100644 tests/qapi-schema/args-name-has.err create mode 100644 tests/qapi-schema/args-name-has.exit create mode 100644 tests/qapi-schema/args-name-has.json rename tests/qapi-schema/{struct-base-clash-base.err => args-name-has.out} (100%) delete mode 100644 tests/qapi-schema/struct-base-clash-base.exit delete mode 100644 tests/qapi-schema/struct-base-clash-base.json delete mode 100644 tests/qapi-schema/struct-base-clash-base.out create mode 100644 tests/qapi-schema/struct-member-u.err create mode 100644 tests/qapi-schema/struct-member-u.exit create mode 100644 tests/qapi-schema/struct-member-u.json create mode 100644 tests/qapi-schema/struct-member-u.out create mode 100644 tests/qapi-schema/struct-name-list.err create mode 100644 tests/qapi-schema/struct-name-list.exit create mode 100644 tests/qapi-schema/struct-name-list.json create mode 100644 tests/qapi-schema/struct-name-list.out -- 2.4.3