qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] c45f8e: qemuutil: remove qemu_set_fd_handler


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] c45f8e: qemuutil: remove qemu_set_fd_handler duplicate symbol
Date: Wed, 17 Mar 2021 09:29:30 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: c45f8e08a9a87f96e155ec2363d52c11fcda4bbf
      
https://github.com/qemu/qemu/commit/c45f8e08a9a87f96e155ec2363d52c11fcda4bbf
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2021-03-16 (Tue, 16 Mar 2021)

  Changed paths:
    M stubs/meson.build
    R stubs/set-fd-handler.c

  Log Message:
  -----------
  qemuutil: remove qemu_set_fd_handler duplicate symbol

libqemuutil has two definitions of qemu_set_fd_handler.  This
is not needed since the only users of the function are
qemu-io.c and the emulators, both of which already include
util/main-loop.c.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <d0c5aa88-029e-4328-7a53-482a3010c5f8@redhat.com>
Tested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>


  Commit: 7c9e885c3a0892058cb6fe7d9ccc13bf475d04f7
      
https://github.com/qemu/qemu/commit/7c9e885c3a0892058cb6fe7d9ccc13bf475d04f7
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-03-16 (Tue, 16 Mar 2021)

  Changed paths:
    A include/qapi/compat-policy.h
    A qapi/compat.json
    M qapi/meson.build
    M qapi/qapi-schema.json
    M qapi/qmp-dispatch.c
    M qemu-options.hx
    M softmmu/vl.c

  Log Message:
  -----------
  qemu-options: New -compat to set policy for deprecated interfaces

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=<input-policy> configures what to do when
deprecated input is received.  Input policy can be "accept" (accept
silently), or "reject" (reject the request with an error).

-compat deprecated-output=<out-policy> configures what to do when
deprecated output is sent.  Output policy can be "accept" (pass on
unchanged), or "hide" (filter out the deprecated parts).

Default is "accept".  Policies other than "accept" are implemented
later in this series.

For now, -compat covers only syntactic aspects of QMP, i.e. stuff
tagged with feature 'deprecated'.  We may want to extend it to cover
semantic aspects, CLI, and experimental features.

Note that there is no good way for management application to detect
presence of -compat: it's not visible output of query-qmp-schema or
query-command-line-options.  Tolerable, because it's meant for
testing.  If running with -compat fails, skip the test.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210312153210.2810514-2-armbru@redhat.com>
[Since: comments in qapi/compat.json fixed up]


  Commit: 6f27ccc4b8db881e08280cdcc99513bb73554446
      
https://github.com/qemu/qemu/commit/6f27ccc4b8db881e08280cdcc99513bb73554446
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-03-16 (Tue, 16 Mar 2021)

  Changed paths:
    M include/qapi/qobject-output-visitor.h
    M include/qapi/visitor-impl.h
    M include/qapi/visitor.h
    M qapi/qapi-visit-core.c
    M qapi/qobject-output-visitor.c
    M qapi/trace-events
    M scripts/qapi/commands.py
    M scripts/qapi/visit.py
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out
    M tests/unit/test-qmp-cmds.c

  Log Message:
  -----------
  qapi: Implement deprecated-output=hide for QMP command results

This policy suppresses deprecated bits in output, and thus permits
"testing the future".  Implement it for QMP command results.  Example:
when QEMU is run with -compat deprecated-output=hide, then

    {"execute": "query-cpus-fast"}

yields

    {"return": [{"thread-id": 9805, "props": {"core-id": 0, "thread-id": 0, 
"socket-id": 0}, "qom-path": "/machine/unattached/device[0]", "cpu-index": 0, 
"target": "x86_64"}]}

instead of

    {"return": [{"arch": "x86", "thread-id": 22436, "props": {"core-id": 0, 
"thread-id": 0, "socket-id": 0}, "qom-path": "/machine/unattached/device[0]", 
"cpu-index": 0, "target": "x86_64"}]}

Note the suppression of deprecated member "arch".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210312153210.2810514-3-armbru@redhat.com>


  Commit: 804bd6de62d1a2046c2f0d57d6ff0928fbe88984
      
https://github.com/qemu/qemu/commit/804bd6de62d1a2046c2f0d57d6ff0928fbe88984
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-03-16 (Tue, 16 Mar 2021)

  Changed paths:
    M scripts/qapi/events.py
    M tests/unit/test-qmp-event.c

  Log Message:
  -----------
  qapi: Implement deprecated-output=hide for QMP events

This policy suppresses deprecated bits in output, and thus permits
"testing the future".  Implement it for QMP events: suppress
deprecated ones.

No QMP event is deprecated right now.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210312153210.2810514-4-armbru@redhat.com>


  Commit: e7055d45a192cd1ea72073bc3b9b5b8a510c9506
      
https://github.com/qemu/qemu/commit/e7055d45a192cd1ea72073bc3b9b5b8a510c9506
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-03-16 (Tue, 16 Mar 2021)

  Changed paths:
    M scripts/qapi/events.py
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out
    M tests/unit/test-qmp-event.c

  Log Message:
  -----------
  qapi: Implement deprecated-output=hide for QMP event data

This policy suppresses deprecated bits in output, and thus permits
"testing the future".  Implement it for QMP event data: suppress
deprecated members.

No QMP event data is deprecated right now.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210312153210.2810514-5-armbru@redhat.com>


  Commit: 7bec000fe5503598a667a76d70b2e1d12d9b81ac
      
https://github.com/qemu/qemu/commit/7bec000fe5503598a667a76d70b2e1d12d9b81ac
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-03-16 (Tue, 16 Mar 2021)

  Changed paths:
    M monitor/misc.c
    M monitor/monitor-internal.h
    M monitor/qmp-cmds-control.c
    M qapi/introspect.json
    M storage-daemon/qemu-storage-daemon.c

  Log Message:
  -----------
  monitor: Drop query-qmp-schema 'gen': false hack

QMP commands return their response as a generated QAPI type, which the
monitor core converts to JSON via QObject.

query-qmp-schema's response is the generated introspection data.  This
is a QLitObject since commit 7d0f982bfb "qapi: generate a literal
qobject for introspection", v2.12).  Before, it was a string.  Instead
of converting QLitObject / string -> QObject -> QAPI type
SchemaInfoList -> QObject -> JSON, we take a shortcut: the command is
'gen': false, so it can return the QObject instead of the QAPI type.
Slightly simpler and more efficient.

The next commit will filter the response for output policy, and this
is easier in the SchemaInfoList representation.  Drop the shortcut.

This replaces the manual command registration by a generated one.  The
manual registration makes the command available before the machine is
built by passing flag QCO_ALLOW_PRECONFIG.  To keep it available
there, we need need to add 'allow-preconfig': true to its definition
in the schema.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210312153210.2810514-6-armbru@redhat.com>
[Commit message typo fixed]


  Commit: 16b45d1332269aea6063930e2ea133e1dd92660a
      
https://github.com/qemu/qemu/commit/16b45d1332269aea6063930e2ea133e1dd92660a
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-03-16 (Tue, 16 Mar 2021)

  Changed paths:
    M monitor/qmp-cmds-control.c

  Log Message:
  -----------
  qapi: Implement deprecated-output=hide for QMP introspection

This policy suppresses deprecated bits in output, and thus permits
"testing the future".  Implement it for QMP command query-qmp-schema:
suppress information on deprecated commands, events and object type
members, i.e. anything that has the special feature flag "deprecated".

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210312153210.2810514-7-armbru@redhat.com>


  Commit: ef1bcbc1cf35f72b4f8c9c66369a281912256aff
      
https://github.com/qemu/qemu/commit/ef1bcbc1cf35f72b4f8c9c66369a281912256aff
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-03-16 (Tue, 16 Mar 2021)

  Changed paths:
    M tests/unit/test-util-sockets.c

  Log Message:
  -----------
  test-util-sockets: Add stub for monitor_set_cur()

Without this stub, the next commit fails to link.  I suspect the real
cause is 947e47448d "monitor: Use getter/setter functions for
cur_mon".

Cc: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20210312153210.2810514-8-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>


  Commit: 106a6f38c05694703284da7c8b3dd2f1e2f993a0
      
https://github.com/qemu/qemu/commit/106a6f38c05694703284da7c8b3dd2f1e2f993a0
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-03-16 (Tue, 16 Mar 2021)

  Changed paths:
    M include/qapi/qmp/dispatch.h
    M qapi/qmp-dispatch.c
    M scripts/qapi/commands.py
    M tests/unit/test-qmp-cmds.c

  Log Message:
  -----------
  qapi: Implement deprecated-input=reject for QMP commands

This policy rejects deprecated input, and thus permits "testing the
future".  Implement it for QMP commands: make deprecated ones fail.
Example: when QEMU is run with -compat deprecated-input=reject, then

    {"execute": "query-cpus"}

fails like this

    {"error": {"class": "CommandNotFound", "desc": "Deprecated command 
query-cpus disabled by policy"}}

When the deprecated command is removed, the error will change to

    {"error": {"class": "CommandNotFound", "desc": "The command query-cpus has 
not been found"}}

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210312153210.2810514-9-armbru@redhat.com>


  Commit: 82d2609325ae94d8aaf6332249466d5c16f2d28b
      
https://github.com/qemu/qemu/commit/82d2609325ae94d8aaf6332249466d5c16f2d28b
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-03-16 (Tue, 16 Mar 2021)

  Changed paths:
    M include/qapi/qobject-input-visitor.h
    M include/qapi/visitor-impl.h
    M include/qapi/visitor.h
    M qapi/qapi-visit-core.c
    M qapi/qobject-input-visitor.c
    M qapi/trace-events
    M scripts/qapi/commands.py
    M scripts/qapi/visit.py
    M tests/unit/test-qmp-cmds.c

  Log Message:
  -----------
  qapi: Implement deprecated-input=reject for QMP command arguments

This policy rejects deprecated input, and thus permits "testing the
future".  Implement it for QMP command arguments: reject commands with
deprecated ones.  Example: when QEMU is run with -compat
deprecated-input=reject, then

    {"execute": "eject", "arguments": {"device": "cd"}}

fails like this

    {"error": {"class": "GenericError", "desc": "Deprecated parameter 'device' 
disabled by policy"}}

When the deprecated parameter is removed, the error will change to

    {"error": {"class": "GenericError", "desc": "Parameter 'device' is 
unexpected"}}

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210312153210.2810514-10-armbru@redhat.com>


  Commit: 5b728a7754e32ff6dac3501ded3ba820ef2edc7b
      
https://github.com/qemu/qemu/commit/5b728a7754e32ff6dac3501ded3ba820ef2edc7b
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-03-16 (Tue, 16 Mar 2021)

  Changed paths:
    M qapi/compat.json
    M qapi/qmp-dispatch.c
    M qapi/qobject-input-visitor.c
    M qemu-options.hx

  Log Message:
  -----------
  qapi: New -compat deprecated-input=crash

Policy "crash" calls abort() when deprecated input is received.

Bugs in integration tests may mask the error from policy "reject".
Provide a larger hammer: crash outright.  Masking that seems unlikely.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210312153210.2810514-11-armbru@redhat.com>


  Commit: e9a395710edcddecb0554be9e15b6674d2c151ef
      
https://github.com/qemu/qemu/commit/e9a395710edcddecb0554be9e15b6674d2c151ef
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-03-17 (Wed, 17 Mar 2021)

  Changed paths:
    A include/qapi/compat-policy.h
    M include/qapi/qmp/dispatch.h
    M include/qapi/qobject-input-visitor.h
    M include/qapi/qobject-output-visitor.h
    M include/qapi/visitor-impl.h
    M include/qapi/visitor.h
    M monitor/misc.c
    M monitor/monitor-internal.h
    M monitor/qmp-cmds-control.c
    A qapi/compat.json
    M qapi/introspect.json
    M qapi/meson.build
    M qapi/qapi-schema.json
    M qapi/qapi-visit-core.c
    M qapi/qmp-dispatch.c
    M qapi/qobject-input-visitor.c
    M qapi/qobject-output-visitor.c
    M qapi/trace-events
    M qemu-options.hx
    M scripts/qapi/commands.py
    M scripts/qapi/events.py
    M scripts/qapi/visit.py
    M softmmu/vl.c
    M storage-daemon/qemu-storage-daemon.c
    M stubs/meson.build
    R stubs/set-fd-handler.c
    M tests/qapi-schema/qapi-schema-test.json
    M tests/qapi-schema/qapi-schema-test.out
    M tests/unit/test-qmp-cmds.c
    M tests/unit/test-qmp-event.c
    M tests/unit/test-util-sockets.c

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

QAPI patches patches for 2021-03-16

# gpg: Signature made Tue 16 Mar 2021 10:15:25 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

* remotes/armbru/tags/pull-qapi-2021-03-16:
  qapi: New -compat deprecated-input=crash
  qapi: Implement deprecated-input=reject for QMP command arguments
  qapi: Implement deprecated-input=reject for QMP commands
  test-util-sockets: Add stub for monitor_set_cur()
  qapi: Implement deprecated-output=hide for QMP introspection
  monitor: Drop query-qmp-schema 'gen': false hack
  qapi: Implement deprecated-output=hide for QMP event data
  qapi: Implement deprecated-output=hide for QMP events
  qapi: Implement deprecated-output=hide for QMP command results
  qemu-options: New -compat to set policy for deprecated interfaces
  qemuutil: remove qemu_set_fd_handler duplicate symbol

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


Compare: https://github.com/qemu/qemu/compare/569a9481034b...e9a395710edc



reply via email to

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