qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 7fbe79: qemuutil: remove qemu_set_fd_handler


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 7fbe79: qemuutil: remove qemu_set_fd_handler duplicate symbol
Date: Fri, 19 Mar 2021 06:43:28 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 7fbe791e693bf96f765d6ff88aa7636bac919368
      
https://github.com/qemu/qemu/commit/7fbe791e693bf96f765d6ff88aa7636bac919368
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2021-03-19 (Fri, 19 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>
Message-Id: <20210318155519.1224118-2-armbru@redhat.com>


  Commit: 4298bd1b5f127b4afbfccabdbcd9d6f7c171d7fc
      
https://github.com/qemu/qemu/commit/4298bd1b5f127b4afbfccabdbcd9d6f7c171d7fc
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-03-19 (Fri, 19 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: <20210318155519.1224118-3-armbru@redhat.com>


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

  Changed paths:
    M include/qapi/compat-policy.h
    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/qmp-dispatch.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: <20210318155519.1224118-4-armbru@redhat.com>


  Commit: e63b14feb8c5a051574a828a4757e6c75e97188c
      
https://github.com/qemu/qemu/commit/e63b14feb8c5a051574a828a4757e6c75e97188c
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-03-19 (Fri, 19 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: <20210318155519.1224118-5-armbru@redhat.com>


  Commit: ada89710e64d4bfa91c9977a27251cae01c8aa6b
      
https://github.com/qemu/qemu/commit/ada89710e64d4bfa91c9977a27251cae01c8aa6b
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-03-19 (Fri, 19 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: <20210318155519.1224118-6-armbru@redhat.com>


  Commit: 81befb2e716eb7387e73da870b32b2533a943123
      
https://github.com/qemu/qemu/commit/81befb2e716eb7387e73da870b32b2533a943123
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-03-19 (Fri, 19 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: <20210318155519.1224118-7-armbru@redhat.com>


  Commit: 7087fddf768f5ebd2a99187cf8221d4449e60361
      
https://github.com/qemu/qemu/commit/7087fddf768f5ebd2a99187cf8221d4449e60361
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-03-19 (Fri, 19 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: <20210318155519.1224118-8-armbru@redhat.com>


  Commit: a698e66023e3e5094a85aabeb94053bf805f7835
      
https://github.com/qemu/qemu/commit/a698e66023e3e5094a85aabeb94053bf805f7835
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-03-19 (Fri, 19 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>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210318155519.1224118-9-armbru@redhat.com>


  Commit: 6aa45e0f14f46cc080035a39e6aa2d6311ebd128
      
https://github.com/qemu/qemu/commit/6aa45e0f14f46cc080035a39e6aa2d6311ebd128
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-03-19 (Fri, 19 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: <20210318155519.1224118-10-armbru@redhat.com>


  Commit: 59f0e1a898755dab4ba41b3911269e331f21e178
      
https://github.com/qemu/qemu/commit/59f0e1a898755dab4ba41b3911269e331f21e178
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-03-19 (Fri, 19 Mar 2021)

  Changed paths:
    M include/qapi/compat-policy.h
    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/qmp-dispatch.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: <20210318155519.1224118-11-armbru@redhat.com>


  Commit: 64e9c1e5bc73192bbf740db40c5b2c3764dcaf05
      
https://github.com/qemu/qemu/commit/64e9c1e5bc73192bbf740db40c5b2c3764dcaf05
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2021-03-19 (Fri, 19 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: <20210318155519.1224118-12-armbru@redhat.com>


  Commit: ccf1d4553ac4a97151abb010ec85e8997a2f2d74
      
https://github.com/qemu/qemu/commit/ccf1d4553ac4a97151abb010ec85e8997a2f2d74
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2021-03-19 (Fri, 19 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-v3' 
into staging

QAPI patches patches for 2021-03-16

# gpg: Signature made Fri 19 Mar 2021 11:55:26 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-v3:
  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>

# Conflicts:
#       storage-daemon/qemu-storage-daemon.c


Compare: https://github.com/qemu/qemu/compare/92566947b3ac...ccf1d4553ac4



reply via email to

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