qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] a680ea: docs/devel/qapi-code-gen: Update exam


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] a680ea: docs/devel/qapi-code-gen: Update example to match ...
Date: Wed, 14 Dec 2022 07:31:02 -0800

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: a680ea072fd96ed28ccc479f018abb4bae649104
      
https://github.com/qemu/qemu/commit/a680ea072fd96ed28ccc479f018abb4bae649104
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M docs/devel/qapi-code-gen.rst

  Log Message:
  -----------
  docs/devel/qapi-code-gen: Update example to match current code

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221104160712.3005652-2-armbru@redhat.com>


  Commit: 7df184613c911c93490ee36eb73f97159ebe728a
      
https://github.com/qemu/qemu/commit/7df184613c911c93490ee36eb73f97159ebe728a
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M docs/devel/qapi-code-gen.rst
    M scripts/qapi/commands.py
    M scripts/qapi/events.py

  Log Message:
  -----------
  qapi: Tidy up whitespace in generated code

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221104160712.3005652-3-armbru@redhat.com>


  Commit: 94f9bd33eece74810aee86de866b3cc86c3b0aec
      
https://github.com/qemu/qemu/commit/94f9bd33eece74810aee86de866b3cc86c3b0aec
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M docs/devel/qapi-code-gen.rst

  Log Message:
  -----------
  docs/devel/qapi-code-gen: Extend example for next commit's change

The next commit will change the code generated for some optional
members.  The example schema contains an optional member affected by
the change.  Add one that is not affected.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221104160712.3005652-4-armbru@redhat.com>


  Commit: 44ea9d9be33c8a4cf89132e0dc2b3029733bcaf4
      
https://github.com/qemu/qemu/commit/44ea9d9be33c8a4cf89132e0dc2b3029733bcaf4
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M docs/devel/qapi-code-gen.rst
    M docs/devel/writing-monitor-commands.rst
    M scripts/qapi/commands.py
    M scripts/qapi/events.py
    M scripts/qapi/gen.py
    M scripts/qapi/schema.py
    M scripts/qapi/types.py
    M scripts/qapi/visit.py

  Log Message:
  -----------
  qapi: Start to elide redundant has_FOO in generated C

In QAPI, absent optional members are distinct from any present value.
We thus represent an optional schema member FOO as two C members: a
FOO with the member's type, and a bool has_FOO.  Likewise for function
arguments.

However, has_FOO is actually redundant for a pointer-valued FOO, which
can be null only when has_FOO is false, i.e. has_FOO == !!FOO.  Except
for arrays, where we a null FOO can also be a present empty array.

The redundant has_FOO are a nuisance to work with.  Improve the
generator to elide them.  Uses of has_FOO need to be replaced as
follows.

Tests of has_FOO become the equivalent comparison of FOO with null.
For brevity, this is commonly done by implicit conversion to bool.

Assignments to has_FOO get dropped.

Likewise for arguments to has_FOO parameters.

Beware: code may violate the invariant has_FOO == !!FOO before the
transformation, and get away with it.  The above transformation can
then break things.  Two cases:

* Absent: if code ignores FOO entirely when !has_FOO (except for
  freeing it if necessary), even non-null / uninitialized FOO works.
  Such code is known to exist.

* Present: if code ignores FOO entirely when has_FOO, even null FOO
  works.  Such code should not exist.

In both cases, replacing tests of has_FOO by FOO reverts their sense.
We have to fix the value of FOO then.

To facilitate review of the necessary updates to handwritten code, add
means to opt out of this change, and opt out for all QAPI schema
modules where the change requires updates to handwritten code.  The
next few commits will remove these opt-outs in reviewable chunks, then
drop the means to opt out.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221104160712.3005652-5-armbru@redhat.com>


  Commit: 4b2fc7dbc4203c52b7726249328fcde49626f565
      
https://github.com/qemu/qemu/commit/4b2fc7dbc4203c52b7726249328fcde49626f565
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M scripts/qapi/schema.py
    M tests/qtest/qmp-cmd-test.c
    M tests/unit/test-qmp-cmds.c
    M tests/unit/test-qmp-event.c
    M tests/unit/test-qobject-input-visitor.c
    M tests/unit/test-qobject-output-visitor.c
    M tests/unit/test-visitor-serialization.c

  Log Message:
  -----------
  qapi tests: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for
tests/qapi-schema/qapi-schema-test.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221104160712.3005652-6-armbru@redhat.com>


  Commit: b94ba62fd470715f6290b74c7a878fe2d640e9af
      
https://github.com/qemu/qemu/commit/b94ba62fd470715f6290b74c7a878fe2d640e9af
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M hw/acpi/core.c
    M hw/acpi/cpu.c
    M hw/acpi/memory_hotplug.c
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi acpi: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/acpi.py.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Ani Sinha <ani@anisinha.ca>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221104160712.3005652-7-armbru@redhat.com>


  Commit: ceb19c8f684c7541ee878255ed686d92cfb90175
      
https://github.com/qemu/qemu/commit/ceb19c8f684c7541ee878255ed686d92cfb90175
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M audio/alsaaudio.c
    M audio/audio.c
    M audio/audio_legacy.c
    M audio/ossaudio.c
    M audio/paaudio.c
    M audio/sndioaudio.c
    M audio/wavaudio.c
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi audio: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/audio.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Additionally, helper get_str() loses its @has_dst parameter.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221104160712.3005652-8-armbru@redhat.com>


  Commit: 04658a5b90f48b269722631b4e51b21935a6be8d
      
https://github.com/qemu/qemu/commit/04658a5b90f48b269722631b4e51b21935a6be8d
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M blockdev.c

  Log Message:
  -----------
  blockdev: Clean up abuse of DriveBackup member format

drive-backup argument @format defaults to the format of the source
unless @mode is "existing".

drive_backup_prepare() implements this by copying the source's
@format_name to DriveBackup member @format.  It leaves @has_format
false, violating the "has_format == !!format" invariant.  Unclean.
Falls apart when we elide @has_format (commit after next): then QAPI
passes @format, which is a string constant, to g_free().  iotest 056
duly explodes.

Clean it up.  Since the value stored in member @format is not actually
used outside this function, use a local variable instead of modifying
the QAPI object.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Hanna Reitz <hreitz@redhat.com>
Cc: qemu-block@nongnu.org
Message-Id: <20221104160712.3005652-9-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>


  Commit: 8461b4d60153ba923c47b6e2f9e270c0e8d6d49c
      
https://github.com/qemu/qemu/commit/8461b4d60153ba923c47b6e2f9e270c0e8d6d49c
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M nbd/server.c

  Log Message:
  -----------
  nbd/server: Clean up abuse of BlockExportOptionsNbd member @arg

block-export-add argument @name defaults to the value of argument
@node-name.

nbd_export_create() implements this by copying @node_name to @name.
It leaves @has_node_name false, violating the "has_node_name ==
!!node_name" invariant.  Unclean.  Falls apart when we elide
@has_node_name (next commit): then QAPI frees the same value twice,
once for @node_name and once @name.  iotest 307 duly explodes.

Goes back to commit c62d24e906 "blockdev-nbd: Boxed argument type for
nbd-server-add" (v5.0.0).  Got moved from qmp_nbd_server_add() to
nbd_export_create() (commit 56ee86261e), then copied back (commit
b6076afcab).  Commit 8675cbd68b "nbd: Utilize QAPI_CLONE for type
conversion" (v5.2.0) cleaned up the copy in qmp_nbd_server_add()
noting

    Second, our assignment to arg->name is fishy: the generated QAPI code
    for qapi_free_NbdServerAddOptions does not visit arg->name if
    arg->has_name is false, but if it DID visit it, we would have
    introduced a double-free situation when arg is finally freed.

Exactly.  However, the copy in nbd_export_create() remained dirty.

Clean it up.  Since the value stored in member @name is not actually
used outside this function, use a local variable instead of modifying
the QAPI object.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Cc: Eric Blake <eblake@redhat.com>
Cc: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: qemu-block@nongnu.org
Message-Id: <20221104160712.3005652-10-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>


  Commit: 19d670d016df840395e7e5b3b1980611eb3f5700
      
https://github.com/qemu/qemu/commit/19d670d016df840395e7e5b3b1980611eb3f5700
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M block/block-backend.c
    M block/copy-before-write.c
    M block/dirty-bitmap.c
    M block/export/export.c
    M block/export/vduse-blk.c
    M block/gluster.c
    M block/monitor/block-hmp-cmds.c
    M block/qapi-sysemu.c
    M block/qapi.c
    M block/qcow.c
    M block/qcow2.c
    M block/qed.c
    M block/quorum.c
    M block/rbd.c
    M block/ssh.c
    M blockdev-nbd.c
    M blockdev.c
    M blockjob.c
    M monitor/hmp-cmds.c
    M qemu-img.c
    M qemu-nbd.c
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi block: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/block*.json.

Said commit explains the transformation in more detail.

There is one instance of the invariant violation mentioned there:
qcow2_signal_corruption() passes false, "" when node_name is an empty
string.  Take care to pass NULL then.

The previous two commits cleaned up two more.

Additionally, helper bdrv_latency_histogram_stats() loses its output
parameters and returns a value instead.

Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Hanna Reitz <hreitz@redhat.com>
Cc: qemu-block@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221104160712.3005652-11-armbru@redhat.com>


  Commit: 4c2393a39c14e646a0e3dd8aa1b6ccaa4ce30671
      
https://github.com/qemu/qemu/commit/4c2393a39c14e646a0e3dd8aa1b6ccaa4ce30671
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M chardev/char-file.c
    M chardev/char-socket.c
    M chardev/char-udp.c
    M chardev/char.c
    M scripts/qapi/schema.py
    M tests/unit/test-char.c

  Log Message:
  -----------
  qapi chardev: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/char.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221104160712.3005652-12-armbru@redhat.com>


  Commit: b979815502485cbc4f68bbba30f2b565be301c93
      
https://github.com/qemu/qemu/commit/b979815502485cbc4f68bbba30f2b565be301c93
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M crypto/block-luks.c
    M scripts/qapi/schema.py
    M tests/unit/test-crypto-block.c

  Log Message:
  -----------
  qapi crypto: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/crypto.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Cc: Daniel P. Berrangé" <berrange@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221104160712.3005652-13-armbru@redhat.com>


  Commit: 93b14dd3c46783257d7885786bbf51bcec7fc890
      
https://github.com/qemu/qemu/commit/93b14dd3c46783257d7885786bbf51bcec7fc890
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M dump/dump.c
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi dump: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/dump.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221104160712.3005652-14-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


  Commit: e9e17ed7c2ca29997e98ec99465304f2cda07384
      
https://github.com/qemu/qemu/commit/e9e17ed7c2ca29997e98ec99465304f2cda07384
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M job-qmp.c
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi job: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/job.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Cc: John Snow <jsnow@redhat.com>
Cc: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Cc: qemu-block@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-Id: <20221104160712.3005652-15-armbru@redhat.com>


  Commit: 18270b71e8fd70ad96d785daba0de39e350db143
      
https://github.com/qemu/qemu/commit/18270b71e8fd70ad96d785daba0de39e350db143
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M hw/core/machine-hmp-cmds.c
    M hw/core/machine-qmp-cmds.c
    M hw/core/machine.c
    M hw/core/numa.c
    M hw/mem/pc-dimm.c
    M hw/nvram/fw_cfg.c
    M hw/virtio/virtio-mem-pci.c
    M hw/virtio/virtio-pmem-pci.c
    M scripts/qapi/schema.py
    M target/arm/monitor.c
    M target/i386/cpu-sysemu.c
    M target/i386/cpu.c
    M target/s390x/cpu_models_sysemu.c

  Log Message:
  -----------
  qapi machine: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/machine*.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Cc: Eduardo Habkost <eduardo@habkost.net>
Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
Cc: Yanan Wang <wangyanan55@huawei.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221104160712.3005652-16-armbru@redhat.com>


  Commit: 986fb9f37b9d6287785ae6db91cb0397fa990fd5
      
https://github.com/qemu/qemu/commit/986fb9f37b9d6287785ae6db91cb0397fa990fd5
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M migration/block-dirty-bitmap.c
    M migration/colo.c
    M migration/migration.c
    M monitor/hmp-cmds.c
    M monitor/misc.c
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi migration: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/migration.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Cc: Juan Quintela <quintela@redhat.com>
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221104160712.3005652-17-armbru@redhat.com>


  Commit: e79fced03a23a2df45d5cf28e5e220f6e45dcde0
      
https://github.com/qemu/qemu/commit/e79fced03a23a2df45d5cf28e5e220f6e45dcde0
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M include/monitor/monitor.h
    M monitor/hmp-cmds.c
    M monitor/misc.c
    M monitor/qmp-cmds.c
    M scripts/qapi/schema.py
    M softmmu/vl.c
    M util/qemu-config.c

  Log Message:
  -----------
  qapi misc: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/misc.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20221104160712.3005652-18-armbru@redhat.com>


  Commit: 6560094867977e787fecc8dd5a0f81372a874408
      
https://github.com/qemu/qemu/commit/6560094867977e787fecc8dd5a0f81372a874408
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M hw/net/virtio-net.c
    M monitor/hmp-cmds.c
    M net/announce.c
    M net/hub.c
    M net/l2tpv3.c
    M net/net.c
    M net/slirp.c
    M net/socket.c
    M net/tap-win32.c
    M net/tap.c
    M net/vhost-vdpa.c
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi net: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/net.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Cc: Jason Wang <jasowang@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221104160712.3005652-19-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


  Commit: 391996af57fe23240bb4f33af564ba015b1d4fbd
      
https://github.com/qemu/qemu/commit/391996af57fe23240bb4f33af564ba015b1d4fbd
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M hw/pci/pci.c
    M monitor/hmp-cmds.c
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi pci: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/pci.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221104160712.3005652-20-armbru@redhat.com>


  Commit: 8f4b2996caeedf980363b75906e4f23a0192ad2b
      
https://github.com/qemu/qemu/commit/8f4b2996caeedf980363b75906e4f23a0192ad2b
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M hw/acpi/memory_hotplug.c
    M hw/core/qdev.c
    M hw/ppc/spapr.c
    M hw/ppc/spapr_drc.c
    M qom/qom-qmp-cmds.c
    M scripts/qapi/schema.py
    M stubs/qdev.c
    M tests/qtest/fuzz/qos_fuzz.c

  Log Message:
  -----------
  qapi qdev qom: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/qdev.json and
qapi/qom.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Daniel P. Berrangé <berrange@redhat.com>
Cc: Eduardo Habkost <eduardo@habkost.net>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221104160712.3005652-21-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


  Commit: e2eb79972f71106c369ec2ae0bcdf6557fdca51b
      
https://github.com/qemu/qemu/commit/e2eb79972f71106c369ec2ae0bcdf6557fdca51b
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M replay/replay-debugging.c
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi replay: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/replay.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Cc: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221104160712.3005652-22-armbru@redhat.com>


  Commit: 59dfa0df86a29c0c3d6d7b21e424282714ce7f70
      
https://github.com/qemu/qemu/commit/59dfa0df86a29c0c3d6d7b21e424282714ce7f70
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M hw/net/rocker/rocker_of_dpa.c
    M monitor/hmp-cmds.c
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi rocker: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/rocker.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221104160712.3005652-23-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


  Commit: 99ebe22640031d1c04dafd20c97a4823344e13d1
      
https://github.com/qemu/qemu/commit/99ebe22640031d1c04dafd20c97a4823344e13d1
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M scripts/qapi/schema.py
    M softmmu/runstate.c

  Log Message:
  -----------
  qapi run-state: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/run-state.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Drop a superfluous conditional around
qapi_free_GuestPanicInformation() while there.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221104160712.3005652-24-armbru@redhat.com>


  Commit: 49553c72a7a946d1c969bdabab6cae1b14054039
      
https://github.com/qemu/qemu/commit/49553c72a7a946d1c969bdabab6cae1b14054039
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M monitor/qmp-cmds.c
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi stats: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/stats.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Cc: Mark Kanda <mark.kanda@oracle.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Mark Kanda <mark.kanda@oracle.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221104160712.3005652-25-armbru@redhat.com>


  Commit: a8535a93de4d481199e21d4f5614bf1ccc4537f1
      
https://github.com/qemu/qemu/commit/a8535a93de4d481199e21d4f5614bf1ccc4537f1
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M backends/tpm/tpm_passthrough.c
    M monitor/hmp-cmds.c
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi tpm: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/tpm.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Cc: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Message-Id: <20221104160712.3005652-26-armbru@redhat.com>


  Commit: ca231047de6da4bc95a8e060e890a4df335e5511
      
https://github.com/qemu/qemu/commit/ca231047de6da4bc95a8e060e890a4df335e5511
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M blockdev.c
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi transaction: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/transaction.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

In qmp_transaction(), we can't just drop parameter @has_props, since
it's used to track whether @props needs to be freed.  Replace it by a
local variable.

Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Hanna Reitz <hreitz@redhat.com>
Cc: qemu-block@nongnu.org
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221104160712.3005652-27-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


  Commit: 7c9f63523272ecb2d7074d0fcca23198f5c4e9bb
      
https://github.com/qemu/qemu/commit/7c9f63523272ecb2d7074d0fcca23198f5c4e9bb
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M monitor/hmp-cmds.c
    M scripts/qapi/schema.py
    M ui/console.c
    M ui/input.c
    M ui/spice-core.c
    M ui/vnc.c

  Log Message:
  -----------
  qapi ui: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/ui.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20221104160712.3005652-28-armbru@redhat.com>


  Commit: cc45a18c7c11ac2b791524f7410effe92619e3cf
      
https://github.com/qemu/qemu/commit/cc45a18c7c11ac2b791524f7410effe92619e3cf
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M hw/virtio/virtio.c
    M monitor/hmp-cmds.c
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi virtio: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qapi/virtio.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Cc: Laurent Vivier <lvivier@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221104160712.3005652-29-armbru@redhat.com>


  Commit: c3c19227720cb3f4a04ef6c4850c17361808c32a
      
https://github.com/qemu/qemu/commit/c3c19227720cb3f4a04ef6c4850c17361808c32a
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M qga/commands-posix.c
    M qga/commands-win32.c
    M qga/commands.c
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi qga: Elide redundant has_FOO in generated C

The has_FOO for pointer-valued FOO are redundant, except for arrays.
They are also a nuisance to work with.  Recent commit "qapi: Start to
elide redundant has_FOO in generated C" provided the means to elide
them step by step.  This is the step for qga/qapi-schema.json.

Said commit explains the transformation in more detail.  The invariant
violations mentioned there do not occur here.

Cc: Michael Roth <michael.roth@amd.com>
Cc: Konstantin Kostiuk <kkostiuk@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221104160712.3005652-30-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


  Commit: 4fd14ed8e5432f2998ec63922e3146c017ce8fc8
      
https://github.com/qemu/qemu/commit/4fd14ed8e5432f2998ec63922e3146c017ce8fc8
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi: Drop temporary logic to support conversion step by step

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20221104160712.3005652-31-armbru@redhat.com>


  Commit: ec0e2ab61ca068525e9ac0148eba2d2edd136948
      
https://github.com/qemu/qemu/commit/ec0e2ab61ca068525e9ac0148eba2d2edd136948
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M VERSION

  Log Message:
  -----------
  Open 8.0 development tree

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: 5204b499a6cae4dfd9fe762d5e6e82224892383b
      
https://github.com/qemu/qemu/commit/5204b499a6cae4dfd9fe762d5e6e82224892383b
  Author: Philippe Mathieu-Daudé <philmd@linaro.org>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M .mailmap

  Log Message:
  -----------
  mailmap: Fix Stefan Weil author email

Fix authorship of commits 266aaedc37~..ac14949821. See commit
3bd2608db7 ("maint: Add .mailmap entries for patches claiming
list authorship") for rationale.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20221208155535.28363-1-philmd@linaro.org>


  Commit: fabcb2dd83fb668c7d0ded926391ac4d69055818
      
https://github.com/qemu/qemu/commit/fabcb2dd83fb668c7d0ded926391ac4d69055818
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2022-12-14 (Wed, 14 Dec 2022)

  Changed paths:
    M audio/alsaaudio.c
    M audio/audio.c
    M audio/audio_legacy.c
    M audio/ossaudio.c
    M audio/paaudio.c
    M audio/sndioaudio.c
    M audio/wavaudio.c
    M backends/tpm/tpm_passthrough.c
    M block/block-backend.c
    M block/copy-before-write.c
    M block/dirty-bitmap.c
    M block/export/export.c
    M block/export/vduse-blk.c
    M block/gluster.c
    M block/monitor/block-hmp-cmds.c
    M block/qapi-sysemu.c
    M block/qapi.c
    M block/qcow.c
    M block/qcow2.c
    M block/qed.c
    M block/quorum.c
    M block/rbd.c
    M block/ssh.c
    M blockdev-nbd.c
    M blockdev.c
    M blockjob.c
    M chardev/char-file.c
    M chardev/char-socket.c
    M chardev/char-udp.c
    M chardev/char.c
    M crypto/block-luks.c
    M docs/devel/qapi-code-gen.rst
    M docs/devel/writing-monitor-commands.rst
    M dump/dump.c
    M hw/acpi/core.c
    M hw/acpi/cpu.c
    M hw/acpi/memory_hotplug.c
    M hw/core/machine-hmp-cmds.c
    M hw/core/machine-qmp-cmds.c
    M hw/core/machine.c
    M hw/core/numa.c
    M hw/core/qdev.c
    M hw/mem/pc-dimm.c
    M hw/net/rocker/rocker_of_dpa.c
    M hw/net/virtio-net.c
    M hw/nvram/fw_cfg.c
    M hw/pci/pci.c
    M hw/ppc/spapr.c
    M hw/ppc/spapr_drc.c
    M hw/virtio/virtio-mem-pci.c
    M hw/virtio/virtio-pmem-pci.c
    M hw/virtio/virtio.c
    M include/monitor/monitor.h
    M job-qmp.c
    M migration/block-dirty-bitmap.c
    M migration/colo.c
    M migration/migration.c
    M monitor/hmp-cmds.c
    M monitor/misc.c
    M monitor/qmp-cmds.c
    M nbd/server.c
    M net/announce.c
    M net/hub.c
    M net/l2tpv3.c
    M net/net.c
    M net/slirp.c
    M net/socket.c
    M net/tap-win32.c
    M net/tap.c
    M net/vhost-vdpa.c
    M qemu-img.c
    M qemu-nbd.c
    M qga/commands-posix.c
    M qga/commands-win32.c
    M qga/commands.c
    M qom/qom-qmp-cmds.c
    M replay/replay-debugging.c
    M scripts/qapi/commands.py
    M scripts/qapi/events.py
    M scripts/qapi/gen.py
    M scripts/qapi/schema.py
    M scripts/qapi/types.py
    M scripts/qapi/visit.py
    M softmmu/runstate.c
    M softmmu/vl.c
    M stubs/qdev.c
    M target/arm/monitor.c
    M target/i386/cpu-sysemu.c
    M target/i386/cpu.c
    M target/s390x/cpu_models_sysemu.c
    M tests/qtest/fuzz/qos_fuzz.c
    M tests/qtest/qmp-cmd-test.c
    M tests/unit/test-char.c
    M tests/unit/test-crypto-block.c
    M tests/unit/test-qmp-cmds.c
    M tests/unit/test-qmp-event.c
    M tests/unit/test-qobject-input-visitor.c
    M tests/unit/test-qobject-output-visitor.c
    M tests/unit/test-visitor-serialization.c
    M ui/console.c
    M ui/input.c
    M ui/spice-core.c
    M ui/vnc.c
    M util/qemu-config.c

  Log Message:
  -----------
  Merge tag 'pull-qapi-2022-12-14' of https://repo.or.cz/qemu/armbru into 
staging

QAPI patches patches for 2022-12-14

# gpg: Signature made Wed 14 Dec 2022 07:45:23 GMT
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "armbru@redhat.com"
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* tag 'pull-qapi-2022-12-14' of https://repo.or.cz/qemu/armbru: (30 commits)
  qapi: Drop temporary logic to support conversion step by step
  qapi qga: Elide redundant has_FOO in generated C
  qapi virtio: Elide redundant has_FOO in generated C
  qapi ui: Elide redundant has_FOO in generated C
  qapi transaction: Elide redundant has_FOO in generated C
  qapi tpm: Elide redundant has_FOO in generated C
  qapi stats: Elide redundant has_FOO in generated C
  qapi run-state: Elide redundant has_FOO in generated C
  qapi rocker: Elide redundant has_FOO in generated C
  qapi replay: Elide redundant has_FOO in generated C
  qapi qdev qom: Elide redundant has_FOO in generated C
  qapi pci: Elide redundant has_FOO in generated C
  qapi net: Elide redundant has_FOO in generated C
  qapi misc: Elide redundant has_FOO in generated C
  qapi migration: Elide redundant has_FOO in generated C
  qapi machine: Elide redundant has_FOO in generated C
  qapi job: Elide redundant has_FOO in generated C
  qapi dump: Elide redundant has_FOO in generated C
  qapi crypto: Elide redundant has_FOO in generated C
  qapi chardev: Elide redundant has_FOO in generated C
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/b67b00e6b4c7...fabcb2dd83fb



reply via email to

[Prev in Thread] Current Thread [Next in Thread]