qemu-commits
[Top][All Lists]
Advanced

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

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


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] b1eee9: qemuutil: remove qemu_set_fd_handler duplicate symbol
Date: Fri, 19 Mar 2021 11:01:14 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: b1eee9bb6de5902a8eabff4a9e7556855fadea6c
      
https://github.com/qemu/qemu/commit/b1eee9bb6de5902a8eabff4a9e7556855fadea6c
  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: 6dd75472d58d3d199eb5003a8d2ec2334c68f18f
      
https://github.com/qemu/qemu/commit/6dd75472d58d3d199eb5003a8d2ec2334c68f18f
  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: 91fa93e516d080d440ead2ad4f88960545bd5b2c
      
https://github.com/qemu/qemu/commit/91fa93e516d080d440ead2ad4f88960545bd5b2c
  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: 278fc2f7d3425dfbc6aa91644bffc65e94afad7c
      
https://github.com/qemu/qemu/commit/278fc2f7d3425dfbc6aa91644bffc65e94afad7c
  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: a291a38fa1db6a67bd9046da26a48e82c591ca49
      
https://github.com/qemu/qemu/commit/a291a38fa1db6a67bd9046da26a48e82c591ca49
  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: 624fa80c8c199229af7ff42eb20b5b2ab851e4ee
      
https://github.com/qemu/qemu/commit/624fa80c8c199229af7ff42eb20b5b2ab851e4ee
  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: 2df68d777c7abfb80a260021b3db3283f37843a1
      
https://github.com/qemu/qemu/commit/2df68d777c7abfb80a260021b3db3283f37843a1
  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: 130d4824222cf062ed8ee3c5ab9fa2bd852b33b6
      
https://github.com/qemu/qemu/commit/130d4824222cf062ed8ee3c5ab9fa2bd852b33b6
  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: d2032598c434fe385145ee6ea58007a19ef7e723
      
https://github.com/qemu/qemu/commit/d2032598c434fe385145ee6ea58007a19ef7e723
  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: db29164103e53ae7c112086127e3d1c92b1d4d89
      
https://github.com/qemu/qemu/commit/db29164103e53ae7c112086127e3d1c92b1d4d89
  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: dbb675c19aa6ca328f4449ccd1ff605f9cb744e9
      
https://github.com/qemu/qemu/commit/dbb675c19aa6ca328f4449ccd1ff605f9cb744e9
  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: 2e1293cbaac75e84f541f9acfa8e26749f4c3562
      
https://github.com/qemu/qemu/commit/2e1293cbaac75e84f541f9acfa8e26749f4c3562
  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-v4' 
into staging

QAPI patches patches for 2021-03-16

# gpg: Signature made Fri 19 Mar 2021 15:06:52 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-v4:
  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/8631a430e65e...2e1293cbaac7



reply via email to

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