qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 942ab6: docs/devel/qapi-code-gen: Fix typo in


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 942ab6: docs/devel/qapi-code-gen: Fix typo in grammar
Date: Thu, 19 Mar 2020 04:15:16 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 942ab6865ab217f370dc2e81415774aabe8b1ea8
      
https://github.com/qemu/qemu/commit/942ab6865ab217f370dc2e81415774aabe8b1ea8
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

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

  Log Message:
  -----------
  docs/devel/qapi-code-gen: Fix typo in grammar

An ALTERNATIVE's value can only be a type name.  Arrays are not
supported, yet.  The text gets it right: "The form STRING is shorthand
for { 'type': STRING }."  The grammar doesn't.  Fix it.

Fixes: b6c37ebaaf074cac8fe8a4781dc3e79db23e914e
Reported-by: John Snow <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: John Snow <address@hidden>


  Commit: 73756ae3e31814b3feb14e6385538679a1cc189c
      
https://github.com/qemu/qemu/commit/73756ae3e31814b3feb14e6385538679a1cc189c
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M docs/system/deprecated.rst

  Log Message:
  -----------
  qemu-doc: Belatedly document QMP command arg & result deprecation

A number of deprecated QMP arguments and results were missed in commit
eb22aeca65 "docs: document deprecation policy & deprecated features in
appendix" (v2.10.0):

* Commit b33945cfff "block: Accept device model name for
  blockdev-open/close-tray" (v2.8.0) deprecated blockdev-open-tray,
  blockdev-close-tray argument @device.

* Commit fbe2d8163e "block: Accept device model name for eject"
  (v2.8.0) deprecated eject argument @device.

* Commit 70e2cb3bd7 "block: Accept device model name for
  blockdev-change-medium" (v2.8.0) deprecated blockdev-change-medium
  argument @device.

* Commit 7a9877a026 "block: Accept device model name for
  block_set_io_throttle" (v2.8.0) deprecated block_set_io_throttle
  argument @device.

* Commit c01c214b69 "block: remove all encryption handling APIs"
  (v2.10.0) deprecated query-named-block-nodes result
  @encryption_key_missing and query-block result @inserted member
  @encryption_key_missing.

* Commit c42e8742f5 "block: Use JSON null instead of "" to disable
  backing file" (v2.10.0) deprecated blockdev-add empty string
  argument @backing.

Since then, we missed a few more:

* Commit 3c605f4074 "commit: Add top-node/base-node options" (v3.1.0)
  deprecated block-commit arguments @base and @top.

* Commit 4db6ceb0b5 "block/dirty-bitmap: add recording and busy
  properties" (v4.0.0) deprecated query-named-block-nodes result
  @dirty-bitmaps member @status, not just query-block.

Make up for all that.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: 0f365e3332a92c9f96f04691afb24a471368d33e
      
https://github.com/qemu/qemu/commit/0f365e3332a92c9f96f04691afb24a471368d33e
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M qapi/char.json

  Log Message:
  -----------
  qapi: Belatedly update doc comment for @wait deprecation

Commit a9b305ba29 "socket: allow wait=false for client socket"
deprecated use of @wait for client socket chardevs, but neglected to
update char.json's doc comment.  Make up for that.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: ad52292ea14f20b5ad296e0dee8a2a801c77717e
      
https://github.com/qemu/qemu/commit/ad52292ea14f20b5ad296e0dee8a2a801c77717e
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

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

  Log Message:
  -----------
  docs/devel/qapi-code-gen: Clarify allow-oob introspection

Mention SchemaInfo variant member "allow-oob" defaults to false.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: 86014c64f9a1509ab2a99d864b606882584e1f58
      
https://github.com/qemu/qemu/commit/86014c64f9a1509ab2a99d864b606882584e1f58
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

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

  Log Message:
  -----------
  docs/devel/qapi-code-gen: Document 'features' introspection

Commit 6a8c0b5102 "qapi: Add feature flags to struct types" neglected
to update section "Client JSON Protocol introspection", and commit
23394b4c39 "qapi: Add feature flags to commands" didn't either.  Make
up for that.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: 3306459a78b210290583d47639ad37e6e0556bac
      
https://github.com/qemu/qemu/commit/3306459a78b210290583d47639ad37e6e0556bac
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M tests/test-qmp-cmds.c

  Log Message:
  -----------
  tests/test-qmp-cmds: Factor out qmp_dispatch() test helpers

Checking the value of qmp_dispatch() is repetitive.  Factor out
helpers do_qmp_dispatch() and do_qmp_dispatch_error().  Without this,
the next commit would make things even more repetitive.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: ef9f5f0d59471dbd5c0764fec67c982d95f4de20
      
https://github.com/qemu/qemu/commit/ef9f5f0d59471dbd5c0764fec67c982d95f4de20
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M tests/test-qmp-cmds.c

  Log Message:
  -----------
  tests/test-qmp-cmds: Check responses more thoroughly

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: 3d16042c9208c80b984b65cf90d1738a4c295bcc
      
https://github.com/qemu/qemu/commit/3d16042c9208c80b984b65cf90d1738a4c295bcc
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M tests/test-qmp-cmds.c

  Log Message:
  -----------
  tests/test-qmp-cmds: Simplify test data setup

Building requests with qdict_put() & friends is tedious to write and
hard to read.  Parse them from string literals with
qdict_from_vjsonf_nofail() instead.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: 3ecc3932cce98d12dfd0e5341b1b554aee977e66
      
https://github.com/qemu/qemu/commit/3ecc3932cce98d12dfd0e5341b1b554aee977e66
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M tests/test-qmp-event.c

  Log Message:
  -----------
  tests/test-qmp-event: Simplify test data setup

Building expected data with qdict_put() & friends is tedious to write
and hard to read.  Parse them from string literals with
qdict_from_jsonf_nofail() instead.

While there, use initializers instead of assignments for initializing
aggregate event arguments.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: 052be50cf4621583bb2c33bdcd0f89b4ae873382
      
https://github.com/qemu/qemu/commit/052be50cf4621583bb2c33bdcd0f89b4ae873382
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M tests/test-qmp-event.c

  Log Message:
  -----------
  tests/test-qmp-event: Use qobject_is_equal()

Locally defined helper qdict_cmp_simple() implements just enough of a
comparison to serve here.  Replace it by qobject_is_equal(), which
implements all of it.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: 11deae8cd2ce1e1f4240ec7d880940f25ebd65b1
      
https://github.com/qemu/qemu/commit/11deae8cd2ce1e1f4240ec7d880940f25ebd65b1
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M tests/test-qmp-event.c

  Log Message:
  -----------
  tests/test-qmp-event: Check event is actually emitted

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: e4405b30695cda6fad69a4411c05b73d538c7992
      
https://github.com/qemu/qemu/commit/e4405b30695cda6fad69a4411c05b73d538c7992
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi/schema: Clean up around QAPISchemaEntity.connect_doc()

QAPISchemaEntity calls doc.connect_feature() in .check().  Improper
since commit ee1e6a1f6c8 split .connect_doc() off .check().  Move the
call.  Requires making the children call super().connect_doc() as they
should.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: 013b4efc9be9af8276bd891cd52267d409f1d712
      
https://github.com/qemu/qemu/commit/013b4efc9be9af8276bd891cd52267d409f1d712
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M docs/devel/qapi-code-gen.txt
    M qapi/introspect.json
    M scripts/qapi/doc.py
    M scripts/qapi/events.py
    M scripts/qapi/expr.py
    M scripts/qapi/introspect.py
    M scripts/qapi/schema.py
    M scripts/qapi/types.py
    M scripts/qapi/visit.py
    M tests/qapi-schema/alternate-base.err
    M tests/qapi-schema/doc-good.json
    M tests/qapi-schema/doc-good.out
    M tests/qapi-schema/doc-good.texi
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out
    M tests/qapi-schema/test-qapi.py
    M tests/test-qmp-cmds.c

  Log Message:
  -----------
  qapi: Add feature flags to remaining definitions

In v4.1.0, we added feature flags just to struct types (commit
6a8c0b5102^..f3ed93d545), to satisfy an immediate need (commit
c9d4070991 "file-posix: Add dynamic-auto-read-only QAPI feature").  In
v4.2.0, we added them to commands (commit 23394b4c39 "qapi: Add
feature flags to commands") to satisfy another immediate need (commit
d76744e65e "qapi: Allow introspecting fix for savevm's cooperation
with blockdev").

Add them to the remaining definitions: enumeration types, union types,
alternate types, and events.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: 7b3bc9e28f366e591ae6da0d0c58d05d9f487ced
      
https://github.com/qemu/qemu/commit/7b3bc9e28f366e591ae6da0d0c58d05d9f487ced
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M scripts/qapi/commands.py
    M scripts/qapi/doc.py
    M scripts/qapi/introspect.py
    M scripts/qapi/schema.py
    M scripts/qapi/types.py
    M scripts/qapi/visit.py
    M tests/qapi-schema/test-qapi.py

  Log Message:
  -----------
  qapi: Consistently put @features parameter right after @ifcond

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>


  Commit: 2e8a843d19fb563b0a4cc7e8a8df8e60df3e97d5
      
https://github.com/qemu/qemu/commit/2e8a843d19fb563b0a4cc7e8a8df8e60df3e97d5
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M scripts/qapi/introspect.py

  Log Message:
  -----------
  qapi/introspect: Rename *qlit* to reduce confusion

We generate the value of qmp_schema_qlit from an expression tree.  The
function doing that is named to_qlit(), and its inputs are accumulated
in QAPISchemaGenIntrospectVisitor._qlits.  We call both its input and
its output "qlit".  This is confusing.

Use "tree" for input, and "qlit" only for output: rename to_qlit() to
_tree_to_qlit(), ._qlits to ._trees, ._gen_qlit() to ._gen_tree().

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: 24cfd6adddb6308eb36dbe55e541718f71a67637
      
https://github.com/qemu/qemu/commit/24cfd6adddb6308eb36dbe55e541718f71a67637
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M scripts/qapi/introspect.py

  Log Message:
  -----------
  qapi/introspect: Factor out _make_tree()

The value of @qmp_schema_qlit is generated from an expression tree.
Tree nodes are created in several places.  Factor out the common code
into _make_tree().  This isn't much of a win now.  It will pay off
when we add feature flags in the next few commits.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: ed30f58ddef369b6053fda99a22ea0c79476fc5e
      
https://github.com/qemu/qemu/commit/ed30f58ddef369b6053fda99a22ea0c79476fc5e
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi/schema: Change _make_features() to a take feature list

QAPISchema._make_features() takes a definition expression, and
extracts its 'features' member.  The other ._make_FOO() leave
destructuring expressions to their callers.  Change ._make_features()
to match them.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 226b5be6d434a3f139436d19227121266d8729d2
      
https://github.com/qemu/qemu/commit/226b5be6d434a3f139436d19227121266d8729d2
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi/schema: Reorder classes so related ones are together

Move QAPISchemaAlternateType up some, so that all QAPISchemaFOOType
are together.  Move QAPISchemaObjectTypeVariants right behind its
users.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: 5858fd1a023f434f30136bdb2b617834561784bd
      
https://github.com/qemu/qemu/commit/5858fd1a023f434f30136bdb2b617834561784bd
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi/schema: Rename QAPISchemaObjectType{Variant,Variants}

QAPISchemaObjectTypeVariants represents both object type and alternate
type variants.  Rename to QAPISchemaVariants.

Rename QAPISchemaObjectTypeVariant the same way.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: 645178c0697fb0a7805c090745de9925d935cd1b
      
https://github.com/qemu/qemu/commit/645178c0697fb0a7805c090745de9925d935cd1b
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi/schema: Call QAPIDoc.connect_member() in just one place

The .connect_doc() of classes that have QAPISchemaMember connect them
to their documentation.  Change them to delegate the actual work to
new QAPISchemaMember.connect_doc().  Matches the .connect_doc() that
already exist.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: 84ab00868798a65e19d76d3cb5f1552c6b25ceb4
      
https://github.com/qemu/qemu/commit/84ab00868798a65e19d76d3cb5f1552c6b25ceb4
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M docs/devel/qapi-code-gen.txt
    M qapi/introspect.json
    M scripts/qapi/expr.py
    M scripts/qapi/introspect.py
    M scripts/qapi/schema.py
    M tests/qapi-schema/doc-good.json
    M tests/qapi-schema/doc-good.out
    M tests/qapi-schema/doc-good.texi
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out
    M tests/qapi-schema/test-qapi.py

  Log Message:
  -----------
  qapi: Add feature flags to struct members

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: cf4a0643c8ab7d503465bd3f725369b630ea5001
      
https://github.com/qemu/qemu/commit/cf4a0643c8ab7d503465bd3f725369b630ea5001
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M qapi/qmp-dispatch.c

  Log Message:
  -----------
  qapi: Inline do_qmp_dispatch() into qmp_dispatch()

Both functions check @request is a QDict, and both have code for
QCO_NO_SUCCESS_RESP.  This wasn't the case back when they were
created.  It's a sign of muddled responsibilities.  Inline.  The next
commits will clean up some more.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: d3226035630c6f0805ed26c77011e49565029cb0
      
https://github.com/qemu/qemu/commit/d3226035630c6f0805ed26c77011e49565029cb0
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M qapi/qmp-dispatch.c

  Log Message:
  -----------
  qapi: Simplify how qmp_dispatch() deals with QCO_NO_SUCCESS_RESP

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: a62c61747fc0934e0f42a37aa078a21c50565fe6
      
https://github.com/qemu/qemu/commit/a62c61747fc0934e0f42a37aa078a21c50565fe6
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M qapi/qmp-dispatch.c

  Log Message:
  -----------
  qapi: Simplify how qmp_dispatch() gets the request ID

We convert the request object to a QDict twice: first in
qmp_dispatch() to get the request ID, and then again in
qmp_dispatch_check_obj(), which converts to QDict, then checks and
returns it.  We can't get the request ID from the latter, because it's
null when the qdict flunks the checks.

Move the checked conversion to QDict from qmp_dispatch_check_obj() to
qmp_dispatch(), and drop the duplicate there.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: 4a8837389ef28554a57cdad8e2fc90ae1362dcb2
      
https://github.com/qemu/qemu/commit/4a8837389ef28554a57cdad8e2fc90ae1362dcb2
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M qapi/qmp-dispatch.c

  Log Message:
  -----------
  qapi: Replace qmp_dispatch()'s TODO comment by an explanation

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: f965e8fea6a915343d160ba6043deb75710d8df1
      
https://github.com/qemu/qemu/commit/f965e8fea6a915343d160ba6043deb75710d8df1
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M docs/devel/qapi-code-gen.txt
    M scripts/qapi/schema.py
    M tests/Makefile.include
    A tests/qapi-schema/features-deprecated-type.err
    A tests/qapi-schema/features-deprecated-type.json
    A tests/qapi-schema/features-deprecated-type.out
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out

  Log Message:
  -----------
  qapi: New special feature flag "deprecated"

Unlike regular feature flags, the new special feature flag
"deprecated" is recognized by the QAPI generator.  For now, it's only
permitted with commands, events, and struct members.  It will be put
to use shortly.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
[Doc typo fixed]


  Commit: df4097aeaf71e1ff0574222760821467a7c86c0f
      
https://github.com/qemu/qemu/commit/df4097aeaf71e1ff0574222760821467a7c86c0f
  Author: Markus Armbruster <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M qapi/block-core.json
    M qapi/block.json
    M qapi/control.json
    M qapi/machine.json
    M qapi/migration.json
    M qapi/misc.json

  Log Message:
  -----------
  qapi: Mark deprecated QMP parts with feature 'deprecated'

Add feature 'deprecated' to the deprecated QMP commands, so their
deprecation becomes visible in output of query-qmp-schema.  Looks like
this:

    {"name": "query-cpus",
     "ret-type": "[164]",
     "meta-type": "command",
     "arg-type": "0",
---> "features": ["deprecated"]}

Management applications could conceivably use this for static
checking.

The deprecated commands are change, cpu-add, migrate-set-cache-size,
migrate_set_downtime, migrate_set_speed, query-cpus, query-events,
query-migrate-cache-size.

The deprecated command arguments are block-commit arguments @base and
@top, and block_set_io_throttle, blockdev-change-medium,
blockdev-close-tray, blockdev-open-tray, eject argument @device.

The deprecated command results are query-cpus-fast result @arch,
query-block result @dirty-bitmaps, query-named-block-nodes result
@encryption_key_missing and result @dirty-bitmaps's member @status.
Same for query-block result @inserted, which mirrors
query-named-block-nodes.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: f0ccc00be16e6f4c925f90305e2d4ed9dd11c8fd
      
https://github.com/qemu/qemu/commit/f0ccc00be16e6f4c925f90305e2d4ed9dd11c8fd
  Author: Marc-André Lureau <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M include/qapi/qmp/dispatch.h
    M monitor/monitor-internal.h
    M monitor/qmp-cmds-control.c
    M qapi/qmp-dispatch.c
    M qapi/qmp-registry.c
    M qga/commands.c
    M qga/main.c

  Log Message:
  -----------
  qmp: constify QmpCommand and list

Since 0b69f6f72ce47a37a749b056b6d5ec64c61f11e8 "qapi: remove
qmp_unregister_command()", the command list can be declared const.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Damien Hedde <address@hidden>
Message-Id: <address@hidden>
[Rebased]
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: db2a380c84574d8c76d7193b8af8535234fe5156
      
https://github.com/qemu/qemu/commit/db2a380c84574d8c76d7193b8af8535234fe5156
  Author: Eric Blake <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M include/net/net.h
    M monitor/misc.c
    M net/net.c
    M qapi/net.json

  Log Message:
  -----------
  net: Complete qapi-fication of netdev_add

We've had all the required pieces for doing a type-safe representation
of netdev_add as a flat union for quite some time now (since
0e55c381f6 in v2.7.0, released in 2016), but did not make the final
switch to using it because of concern about whether a command-line
regression in accepting "1" in place of 1 for integer arguments would
be problematic.  Back then, we did not have the deprecation cycle to
allow us to make progress.  But now that we have waited so long, other
problems have crept in: for example, our desire to add
qemu-storage-daemon is hampered by the inability to express net
objects, and we are unable to introspect what we actually accept.
Additionally, our round-trip through QemuOpts silently eats any
argument that expands to an array, rendering dnssearch, hostfwd, and
guestfwd useless through QMP:

{"execute": "netdev_add", "arguments": { "id": "netdev0",
  "type": "user", "dnssearch": [
    { "str": "8.8.8.8" }, { "str": "8.8.4.4" }
  ]}}

So without further ado, let's turn on proper QAPI.  netdev_add() was a
trivial wrapper around net_client_init(), which did a few steps prior
to calling net_client_init1(); with this patch, we now skip directly
to net_client_init1().  In addition to fixing array parameters, the
following additional differences occur:

-  {"execute": "netdev_add", "arguments": {"type": "help"}}
no longer attempts to print help to stdout and exit.  Bug fix, broken
in 547203ead4 'net: List available netdevs with "-netdev help"',
v2.12.0.

-  {"execute": "netdev_add", "arguments': {... "ipv6-net": "..." }}
no longer attempts to desugar the undocumented ipv6-net magic string
into the proper "ipv6-prefix" and "ipv6-prefixlen".  Undocumented
misfeature, introduced in commit 7aac531ef2 "qapi-schema, qemu-options
& slirp: Adding Qemu options for IPv6 addresses", v2.6.0.

-  {'execute':'netdev_add',
     'arguments':{'id':'net2', 'type':'hubport', 'hubid':"2"}}
   {"error": {"class": "GenericError", "desc": "Invalid parameter type for 
'hubid', expected: integer"}}
Used to succeed: since our command line treats everything as strings,
our not-so-round-trip conversion from QAPI -> QemuOpts -> QAPI lost
the original typing and turned everything into a string; now that we
skip the QemuOpts, the JSON input has to match the exact QAPI type.
But this stricter QMP is desirable, and introspection is sufficient
for any affected applications to make sure they use it correctly.

In qmp_netdev_add(), we still have to create a QemuOpts object so that
qmp_netdev_del() will be able to remove a hotplugged network device;
but the opts->head remains empty since we now manage all parsing
through the QAPI object rather than QemuOpts; a separate patch will
address the abuse of QemuOpts as a witness for whether a
NetClientState is a netdev.  In the meantime, our argument that we are
okay requires auditing all uses of option group "netdev":

- qemu_netdev_opts: option group definition, empty .desc[]
- CLI (CLI netdev parsing ends before monitors start, so while
  monitors can mess with CLI netdevs, CLI cannot mess with
  monitor netdevs):
  - main() case QEMU_OPTION_netdev: store CLI definition
  - main() case QEMU_OPTION_readconfig, case QEMU_OPTION_writeconfig:
  similar, dealing only with CLI
  - net_init_clients(): Pass CLI to net_client_init()
- Monitor:
  - hmp_netdev_add(): straightforward parse into net_client_init()
  - qmp_netdev_add(): subject of this patch, used to add full
  object to option group, now just adds bare-bones id
  - qmp_netdev_del(), netdev_del_completion(): check the option group
  solely for id, as a 'is this a netdev' predicate

Reported-by: Alex Kirillov <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
[Commit message typo fixed]
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 08712fcb851034228b61f75bd922863a984a4f60
      
https://github.com/qemu/qemu/commit/08712fcb851034228b61f75bd922863a984a4f60
  Author: Eric Blake <address@hidden>
  Date:   2020-03-17 (Tue, 17 Mar 2020)

  Changed paths:
    M include/net/net.h
    M monitor/misc.c
    M net/net.c

  Log Message:
  -----------
  net: Track netdevs in NetClientState rather than QemuOpt

As mentioned in the previous patch, our use of QemuOpt group "netdev"
has two purposes: collect the CLI arguments, and serve as a witness
for monitor hotplug actions.  As the latter didn't use anything but an
id, it felt rather unclean to have to touch QemuOpts at all when going
through QMP, so let's instead track things with a bool field in
NetClientState.

Suggested-by: Markus Armbruster <address@hidden>
Signed-off-by: Eric Blake <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: f57587c7d47b35b2d9b31def3a74d81bdb5475d7
      
https://github.com/qemu/qemu/commit/f57587c7d47b35b2d9b31def3a74d81bdb5475d7
  Author: Peter Maydell <address@hidden>
  Date:   2020-03-19 (Thu, 19 Mar 2020)

  Changed paths:
    M docs/devel/qapi-code-gen.txt
    M docs/system/deprecated.rst
    M include/net/net.h
    M include/qapi/qmp/dispatch.h
    M monitor/misc.c
    M monitor/monitor-internal.h
    M monitor/qmp-cmds-control.c
    M net/net.c
    M qapi/block-core.json
    M qapi/block.json
    M qapi/char.json
    M qapi/control.json
    M qapi/introspect.json
    M qapi/machine.json
    M qapi/migration.json
    M qapi/misc.json
    M qapi/net.json
    M qapi/qmp-dispatch.c
    M qapi/qmp-registry.c
    M qga/commands.c
    M qga/main.c
    M scripts/qapi/commands.py
    M scripts/qapi/doc.py
    M scripts/qapi/events.py
    M scripts/qapi/expr.py
    M scripts/qapi/introspect.py
    M scripts/qapi/schema.py
    M scripts/qapi/types.py
    M scripts/qapi/visit.py
    M tests/Makefile.include
    M tests/qapi-schema/alternate-base.err
    M tests/qapi-schema/doc-good.json
    M tests/qapi-schema/doc-good.out
    M tests/qapi-schema/doc-good.texi
    A tests/qapi-schema/features-deprecated-type.err
    A tests/qapi-schema/features-deprecated-type.json
    A tests/qapi-schema/features-deprecated-type.out
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out
    M tests/qapi-schema/test-qapi.py
    M tests/test-qmp-cmds.c
    M tests/test-qmp-event.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2020-03-17' into 
staging

QAPI patches for 2020-03-17

# gpg: Signature made Tue 17 Mar 2020 20:50:54 GMT
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "address@hidden"
# gpg: Good signature from "Markus Armbruster <address@hidden>" [full]
# gpg:                 aka "Markus Armbruster <address@hidden>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-qapi-2020-03-17: (30 commits)
  net: Track netdevs in NetClientState rather than QemuOpt
  net: Complete qapi-fication of netdev_add
  qmp: constify QmpCommand and list
  qapi: Mark deprecated QMP parts with feature 'deprecated'
  qapi: New special feature flag "deprecated"
  qapi: Replace qmp_dispatch()'s TODO comment by an explanation
  qapi: Simplify how qmp_dispatch() gets the request ID
  qapi: Simplify how qmp_dispatch() deals with QCO_NO_SUCCESS_RESP
  qapi: Inline do_qmp_dispatch() into qmp_dispatch()
  qapi: Add feature flags to struct members
  qapi/schema: Call QAPIDoc.connect_member() in just one place
  qapi/schema: Rename QAPISchemaObjectType{Variant,Variants}
  qapi/schema: Reorder classes so related ones are together
  qapi/schema: Change _make_features() to a take feature list
  qapi/introspect: Factor out _make_tree()
  qapi/introspect: Rename *qlit* to reduce confusion
  qapi: Consistently put @features parameter right after @ifcond
  qapi: Add feature flags to remaining definitions
  qapi/schema: Clean up around QAPISchemaEntity.connect_doc()
  tests/test-qmp-event: Check event is actually emitted
  ...

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/0a4833b3b4bc...f57587c7d47b



reply via email to

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