qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] fc48ff: qobject: Use 'bool' for qbool


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] fc48ff: qobject: Use 'bool' for qbool
Date: Tue, 23 Jun 2015 06:00:06 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: fc48ffc39ed1060856475e4320d5896f26c945e8
      
https://github.com/qemu/qemu/commit/fc48ffc39ed1060856475e4320d5896f26c945e8
  Author: Eric Blake <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M block/qapi.c
    M block/quorum.c
    M block/vvfat.c
    M include/qapi/qmp/qbool.h
    M monitor.c
    M qapi/qmp-input-visitor.c
    M qapi/qmp-output-visitor.c
    M qobject/json-parser.c
    M qobject/qbool.c
    M qobject/qdict.c
    M qobject/qjson.c
    M qom/object.c
    M tests/check-qjson.c
    M tests/test-qmp-event.c
    M tests/test-qmp-output-visitor.c
    M util/qemu-option.c

  Log Message:
  -----------
  qobject: Use 'bool' for qbool

We require a C99 compiler, so let's use 'bool' instead of 'int'
when dealing with boolean values.  There are few enough clients
to fix them all in one pass.

Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Acked-by: Luiz Capitulino <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 34acbc95229f9f841bde83691a5af949c15e105b
      
https://github.com/qemu/qemu/commit/34acbc95229f9f841bde83691a5af949c15e105b
  Author: Eric Blake <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M hmp.c
    M hw/pci/pcie_aer.c
    M include/qapi/qmp/qdict.h
    M monitor.c
    M qobject/qdict.c
    M tests/test-qmp-output-visitor.c

  Log Message:
  -----------
  qobject: Use 'bool' inside qdict

Now that qbool is fixed, let's fix getting and setting a bool
value to a qdict member to also use C99 bool rather than int.

I audited all callers to ensure that the changed return type
will not cause any changed semantics.

Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Acked-by: Luiz Capitulino <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 19f2db5c84e563597bd8b3c3190aef591060dec2
      
https://github.com/qemu/qemu/commit/19f2db5c84e563597bd8b3c3190aef591060dec2
  Author: Bandan Das <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M monitor.c

  Log Message:
  -----------
  monitor: remove debug prints

The preferred solution is to use tracepoints and there
is good chance of bitrot with the debug prints not being
enabled at compile time. Remove them.

Suggested-by: Markus Armbruster <address@hidden>
Signed-off-by: Bandan Das <address@hidden>
Acked-by: Luiz Capitulino <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: ae50212ff717f3d295ebff352eb7d6cc08332b7e
      
https://github.com/qemu/qemu/commit/ae50212ff717f3d295ebff352eb7d6cc08332b7e
  Author: Bandan Das <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M monitor.c

  Log Message:
  -----------
  monitor: cleanup parsing of cmd name and cmd arguments

There's too much going on in monitor_parse_command().
Split up the arguments parsing bits into a separate function
monitor_parse_arguments(). Let the original function check for
command validity and sub-commands if any and return data (*cmd)
that the newly introduced function can process and return a
QDict. Also, pass a pointer to the cmdline to track current
parser location.

Suggested-by: Markus Armbruster <address@hidden>
Signed-off-by: Bandan Das <address@hidden>
Acked-by: Luiz Capitulino <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: dd41eea77129a4cd8ae5170b02e0fee175af314e
      
https://github.com/qemu/qemu/commit/dd41eea77129a4cd8ae5170b02e0fee175af314e
  Author: Bandan Das <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M monitor.c

  Log Message:
  -----------
  monitor: Point to "help" command on syntax error

When a command fails due to incorrect syntax or input, suggest using
the "help" command to get more information about the command.  This
is only applicable for HMP.

Signed-off-by: Bandan Das <address@hidden>
Acked-by: Luiz Capitulino <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: e549d2aaeba1cfac207c9a9675cc203e6372a22e
      
https://github.com/qemu/qemu/commit/e549d2aaeba1cfac207c9a9675cc203e6372a22e
  Author: Bandan Das <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M monitor.c

  Log Message:
  -----------
  monitor: Fix failure path for "S" argument

Since the "S" argument type is only used with the "?" flag,
the bug can't bite.

Signed-off-by: Bandan Das <address@hidden>
Acked-by: Luiz Capitulino <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 5bcda5f7349da01aded719b595f32ce2b9d396db
      
https://github.com/qemu/qemu/commit/5bcda5f7349da01aded719b595f32ce2b9d396db
  Author: Peter Crosthwaite <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M monitor.c

  Log Message:
  -----------
  monitor: Split mon_get_cpu fn to remove ENV_GET_CPU

The monitor currently has one helper, mon_get_cpu() which will return
an env pointer. The target specific users of this API want an env, but
all the target agnostic users really just want the cpu pointer. These
users then need to use the target-specifically defined ENV_GET_CPU to
navigate back up to the CPU from the ENV. Split the API for the two
uses cases to remove all need for ENV_GET_CPU.

Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
Signed-off-by: Peter Crosthwaite <address@hidden>
Acked-by: Luiz Capitulino <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: d49190c4208f2c556c3a01962a81f8a85d522bb1
      
https://github.com/qemu/qemu/commit/d49190c4208f2c556c3a01962a81f8a85d522bb1
  Author: Peter Crosthwaite <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M disas.c
    M include/disas/disas.h
    M include/qemu/log.h
    M monitor.c
    M target-alpha/translate.c
    M target-arm/translate-a64.c
    M target-arm/translate.c
    M target-cris/translate.c
    M target-i386/translate.c
    M target-lm32/translate.c
    M target-m68k/translate.c
    M target-microblaze/translate.c
    M target-mips/translate.c
    M target-openrisc/translate.c
    M target-ppc/translate.c
    M target-s390x/translate.c
    M target-sh4/translate.c
    M target-sparc/translate.c
    M target-tricore/translate.c
    M target-unicore32/translate.c
    M target-xtensa/translate.c

  Log Message:
  -----------
  disas: Remove uses of CPU env

disas does not need to access the CPU env for any reason. Change the
APIs to accept CPU pointers instead. Small change pattern needs to be
applied to all target translate.c. This brings us closer to making
disas.o a common-obj and less architecture specific in general.

Cc: Richard Henderson <address@hidden>
Cc: Peter Maydell <address@hidden>
Cc: "Edgar E. Iglesias" <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Eduardo Habkost <address@hidden>
Cc: Michael Walle <address@hidden>
Cc: Aurelien Jarno <address@hidden>
Cc: Leon Alrae <address@hidden>
Cc: Jia Liu <address@hidden>
Cc: Alexander Graf <address@hidden>
Cc: Mark Cave-Ayland <address@hidden>
Cc: Bastian Koppelmann <address@hidden>
Cc: Guan Xuetao <address@hidden>
Cc: Max Filippov <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Signed-off-by: Peter Crosthwaite <address@hidden>
Acked-by: Luiz Capitulino <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: a5ec494e274ddcad6d487e3872e16964ef57e0de
      
https://github.com/qemu/qemu/commit/a5ec494e274ddcad6d487e3872e16964ef57e0de
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M qdev-monitor.c

  Log Message:
  -----------
  qdev-monitor: Stop error avalanche in qbus_find_recursive()

Reproducer:

    $ qemu-system-x86_64 -nodefaults -device virtio-rng-pci -device 
virtio-rng-pci -device virtio-rng-device,bus=virtio-bus
    qemu-system-x86_64: -device virtio-rng-device,bus=virtio-bus: Bus 
'virtio-bus' is full
    qemu-system-x86_64: -device virtio-rng-device,bus=virtio-bus: Bus 
'virtio-bus' is full
    qemu-system-x86_64: -device virtio-rng-device,bus=virtio-bus: Bus 
'virtio-bus' not found

qbus_find_recursive() reports the "is full" error itself, and leaves
reporting "not found" to its caller.  The result is confusion.  Write
it a function contract that permits leaving all error reporting to the
caller, and implement it.  Update callers to detect and report "is
full".

Screwed up when commit 1395af6 added the max_dev limit and the "is
full" error condition to enforce it.

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


  Commit: ed238ba2a0239368dd0cec9bfaf3300a5bd303ce
      
https://github.com/qemu/qemu/commit/ed238ba2a0239368dd0cec9bfaf3300a5bd303ce
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M qdev-monitor.c

  Log Message:
  -----------
  qdev-monitor: Fix check for full bus

Property bus has always been too screwed up to be really usable for
values other than plain bus IDs.  This just fixes a bug that crept in
in commit 1395af6 "qdev: add a maximum device allowed field for the
bus."

It doesn't always fail when it should:

    $ qemu-system-x86_64 -nodefaults -device virtio-serial-pci -device 
virtio-rng-device,bus=pci.0/virtio-serial-pci/virtio-bus

Happily plugs the virtio-rng-device into the virtio-bus provided by
virtio-serial-pci, even though its only slot is already occupied by a
virtio-serial-device.

And sometimes fails when it shouldn't:

    $ qemu-system-x86_64 -nodefaults -device virtio-serial-pci -device 
virtserialport,bus=virtio-bus/virtio-serial-device

Yes, the virtio-bus is full, but the virtio-serial-bus provided by
virtio-serial-device isn't, and that's the one we're trying to use.

Root cause: we check "bus full" when we resolve the first element of
the path.  That's the correct one only when it's also the last one.

Fix by moving the "bus full" check to right before we return a bus.

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


  Commit: d282842999b914c38c8be4659012aa619c22af8b
      
https://github.com/qemu/qemu/commit/d282842999b914c38c8be4659012aa619c22af8b
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M include/qapi/qmp/qerror.h
    M qdev-monitor.c

  Log Message:
  -----------
  qdev-monitor: Convert qbus_find() to Error

As usual, the conversion breaks printing explanatory messages after
the error: actual printing of the error gets delayed, so the
explanations precede rather than follow it.

Pity.  Disable them for now.  See also commit 7216ae3.

While there, eliminate QERR_BUS_NOT_FOUND, and clean up unusual
spelling in the error message.

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


  Commit: 4caa489d1337c1a72d2e36185e4586ad246b98e1
      
https://github.com/qemu/qemu/commit/4caa489d1337c1a72d2e36185e4586ad246b98e1
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M qdev-monitor.c

  Log Message:
  -----------
  qdev-monitor: Propagate errors through set_property()

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>


  Commit: f006cf7fa9a63ba8e4ccf57d46231ce594301727
      
https://github.com/qemu/qemu/commit/f006cf7fa9a63ba8e4ccf57d46231ce594301727
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M include/monitor/qdev.h
    M qdev-monitor.c
    M vl.c

  Log Message:
  -----------
  qdev-monitor: Propagate errors through qdev_device_add()

Also polish an error message while I'm touching the line anyway,

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>


  Commit: 70b9433109ed99217b812f19800de550e2e0ecd5
      
https://github.com/qemu/qemu/commit/70b9433109ed99217b812f19800de550e2e0ecd5
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M blockdev.c
    M hmp.c
    M hw/usb/dev-network.c
    M include/qemu/option.h
    M include/ui/console.h
    M monitor.c
    M net/net.c
    M qdev-monitor.c
    M qemu-img.c
    M qemu-io.c
    M qemu-nbd.c
    M qmp.c
    M tests/test-opts-visitor.c
    M tests/test-qemu-opts.c
    M tpm.c
    M ui/vnc.c
    M util/qemu-option.c
    M vl.c

  Log Message:
  -----------
  QemuOpts: Wean off qerror_report_err()

qerror_report_err() is a transitional interface to help with
converting existing monitor commands to QMP.  It should not be used
elsewhere.

The only remaining user in qemu-option.c is qemu_opts_parse().  Is it
used in QMP context?  If not, we can simply replace
qerror_report_err() by error_report_err().

The uses in qemu-img.c, qemu-io.c, qemu-nbd.c and under tests/ are
clearly not in QMP context.

The uses in vl.c aren't either, because the only QMP command handlers
there are qmp_query_status() and qmp_query_machines(), and they don't
call it.

Remaining uses:

* drive_def(): Command line -drive and such, HMP drive_add and pci_add

* hmp_chardev_add(): HMP chardev-add

* monitor_parse_command(): HMP core

* tmp_config_parse(): Command line -tpmdev

* net_host_device_add(): HMP host_net_add

* net_client_parse(): Command line -net and -netdev

* qemu_global_option(): Command line -global

* vnc_parse_func(): Command line -display, -vnc, default display, HMP
  change, QMP change.  Bummer.

* qemu_pci_hot_add_nic(): HMP pci_add

* usb_net_init(): Command line -usbdevice, HMP usb_add

Propagate errors through qemu_opts_parse().  Create a convenience
function qemu_opts_parse_noisily() that passes errors to
error_report_err().  Switch all non-QMP users outside tests to it.

That leaves vnc_parse_func().  Propagate errors through it.  Since I'm
touching it anyway, rename it to vnc_parse().

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Luiz Capitulino <address@hidden>


  Commit: 1459407e88632e6d66cd6b71326eaf78e0a80772
      
https://github.com/qemu/qemu/commit/1459407e88632e6d66cd6b71326eaf78e0a80772
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  vl: Avoid qerror_report() outside QMP command handlers

qerror_report() is a transitional interface to help with converting
existing monitor commands to QMP.  It should not be used elsewhere.
Replace by error_report() in initial startup helpers parse_sandbox()
and parse_add_fd().

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Luiz Capitulino <address@hidden>


  Commit: c6bf0f7ffa90c720377eb6bddd27037041acbc5b
      
https://github.com/qemu/qemu/commit/c6bf0f7ffa90c720377eb6bddd27037041acbc5b
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  vl: Use error_report() for --display errors

Results in nicer error messages.  Before this patch:

    Invalid GTK option string: gtk,lirum-larum

After:

    qemu-system-x86_64: -display gtk,lirum-larum: Invalid GTK option string

Of course, the thing ought to use QemuOpts instead of parsing by hand.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Luiz Capitulino <address@hidden>


  Commit: 75158ebbe259f0bd8bf435e8f4827a43ec89c877
      
https://github.com/qemu/qemu/commit/75158ebbe259f0bd8bf435e8f4827a43ec89c877
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M backends/rng-egd.c
    M blockdev-nbd.c
    M blockdev.c
    M hmp.c
    M include/qapi/qmp/qerror.h
    M net/net.c
    M qdev-monitor.c
    M qmp.c
    M qom/object.c
    M ui/input.c

  Log Message:
  -----------
  qerror: Eliminate QERR_DEVICE_NOT_FOUND

Error classes other than ERROR_CLASS_GENERIC_ERROR should not be used
in new code.  Hiding them in QERR_ macros makes new uses hard to spot.
Fortunately, there's just one such macro left.  Eliminate it with this
coccinelle semantic patch:

    @@
    expression EP, E;
    @@
    -error_set(EP, QERR_DEVICE_NOT_FOUND, E)
    +error_set(EP, ERROR_CLASS_DEVICE_NOT_FOUND, "Device '%s' not found", E)

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Luiz Capitulino <address@hidden>


  Commit: c6bd8c706a799eb0fece99f468aaa22b818036f3
      
https://github.com/qemu/qemu/commit/c6bd8c706a799eb0fece99f468aaa22b818036f3
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M backends/rng-egd.c
    M backends/rng-random.c
    M backends/rng.c
    M backends/tpm.c
    M balloon.c
    M block.c
    M block/backup.c
    M block/commit.c
    M block/mirror.c
    M block/qcow.c
    M block/qcow2.c
    M block/qed.c
    M block/quorum.c
    M block/snapshot.c
    M block/stream.c
    M block/vmdk.c
    M blockdev-nbd.c
    M blockdev.c
    M blockjob.c
    M cpus.c
    M dump.c
    M hmp.c
    M hw/core/nmi.c
    M hw/core/qdev-properties-system.c
    M hw/core/qdev-properties.c
    M hw/core/qdev.c
    M hw/intc/openpic.c
    M hw/net/rocker/qmp-norocker.c
    M hw/pci/pci-stub.c
    M hw/ppc/spapr_pci.c
    M hw/s390x/s390-virtio.c
    M hw/usb/redirect.c
    M include/qapi/qmp/qerror.h
    M migration/migration.c
    M migration/savevm.c
    M monitor.c
    M net/net.c
    M qapi/opts-visitor.c
    M qapi/qapi-visit-core.c
    M qapi/qmp-dispatch.c
    M qapi/qmp-input-visitor.c
    M qapi/string-input-visitor.c
    M qdev-monitor.c
    M qemu-img.c
    M qga/commands-posix.c
    M qga/commands-win32.c
    M qga/main.c
    M qmp.c
    M qom/object.c
    M stubs/arch-query-cpu-def.c
    M target-i386/cpu.c
    M tpm.c
    M ui/vnc.c
    M util/qemu-option.c

  Log Message:
  -----------
  qerror: Clean up QERR_ macros to expand into a single string

These macros expand into error class enumeration constant, comma,
string.  Unclean.  Has been that way since commit 13f59ae.

The error class is always ERROR_CLASS_GENERIC_ERROR since the previous
commit.

Clean up as follows:

* Prepend every use of a QERR_ macro by ERROR_CLASS_GENERIC_ERROR, and
  delete it from the QERR_ macro.  No change after preprocessing.

* Rewrite error_set(ERROR_CLASS_GENERIC_ERROR, ...) into
  error_setg(...).  Again, no change after preprocessing.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Luiz Capitulino <address@hidden>


  Commit: 8b53a19675d2329695179e47aa3797692fb0d9ba
      
https://github.com/qemu/qemu/commit/8b53a19675d2329695179e47aa3797692fb0d9ba
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M tpm.c

  Log Message:
  -----------
  tpm: Avoid qerror_report() outside QMP command handlers

qerror_report() is a transitional interface to help with converting
existing monitor commands to QMP.  It should not be used elsewhere.
Replace by error_report().

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Luiz Capitulino <address@hidden>


  Commit: 485febc6d1382a82e4e1640729fffbf0c1392a44
      
https://github.com/qemu/qemu/commit/485febc6d1382a82e4e1640729fffbf0c1392a44
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M hmp.c
    M include/monitor/monitor.h
    M include/monitor/qdev.h
    M include/net/net.h
    M monitor.c
    M net/net.c
    M qdev-monitor.c
    M qmp-commands.hx
    M qmp.c
    M scripts/qapi-commands.py
    M util/qemu-error.c

  Log Message:
  -----------
  qmp: Wean off qerror_report()

The traditional QMP command handler interface

    int qmp_FOO(Monitor *mon, const QDict *params, QObject **ret_data);

doesn't provide for returning an Error object.  Instead, the handler
is expected to stash it in the monitor with qerror_report().

When we rebased QMP on top of QAPI, we didn't change this interface.
Instead, commit 776574d introduced "middle mode" as a temporary aid
for converting existing QMP commands to QAPI one by one.  More than
three years later, we're still using it.

Middle mode has two effects:

* Instead of the native input marshallers

      static void qmp_marshal_input_FOO(QDict *, QObject **, Error **)

  it generates input marshallers conforming to the traditional QMP
  command handler interface.

* It suppresses generation of code to register them with
  qmp_register_command()

  This permits giving them internal linkage.

As long as we need qmp-commands.hx, we can't use the registry behind
qmp_register_command(), so the latter has to stay for now.

The former has to go to get rid of qerror_report().  Changing all QMP
commands to fit the QAPI mold in one go was impractical back when we
started, but by now there are just a few stragglers left:
do_qmp_capabilities(), qmp_qom_set(), qmp_qom_get(), qmp_object_add(),
qmp_netdev_add(), do_device_add().

Switch middle mode to generate native input marshallers, and adapt the
stragglers.  Simplifies both the monitor code and the stragglers.

Rename do_qmp_capabilities() to qmp_capabilities(), and
do_device_add() to qmp_device_add, because that's how QMP command
handlers are named today.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Luiz Capitulino <address@hidden>


  Commit: 4629ed1e98961bbe678db68ef5f4342ff174a6c3
      
https://github.com/qemu/qemu/commit/4629ed1e98961bbe678db68ef5f4342ff174a6c3
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M block/qapi.c
    M include/monitor/monitor.h
    M include/qapi/qmp/qerror.h
    M include/qapi/qmp/qobject.h
    M monitor.c
    M qobject/Makefile.objs
    R qobject/qerror.c
    M qobject/qjson.c
    M stubs/Makefile.objs
    M stubs/mon-is-qmp.c
    R stubs/mon-set-error.c

  Log Message:
  -----------
  qerror: Finally unused, clean up

Remove it except for two things in qerror.h:

* Two #include to be cleaned up separately to avoid cluttering this
  patch.

* The QERR_ macros.  Mark as obsolete.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Luiz Capitulino <address@hidden>


  Commit: d49b68364414d649b8e26232f2a600d415611662
      
https://github.com/qemu/qemu/commit/d49b68364414d649b8e26232f2a600d415611662
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M audio/spiceaudio.c
    M audio/wavcapture.c
    M block.c
    M block/curl.c
    M block/dmg.c
    M block/io.c
    M block/iscsi.c
    M block/qcow2-snapshot.c
    M block/raw-posix.c
    M block/raw-win32.c
    M block/ssh.c
    M block/vhdx-log.c
    M block/vmdk.c
    M block/vvfat.c
    M blockdev.c
    M cpus.c
    M hw/9pfs/virtio-9p.c
    M hw/char/virtio-serial-bus.c
    M hw/core/qdev-properties.c
    M hw/core/qdev.c
    M hw/display/g364fb.c
    M hw/display/tcx.c
    M hw/i386/pc.c
    M hw/ide/ahci.c
    M hw/misc/ivshmem.c
    M hw/pci/pci.c
    M hw/ppc/virtex_ml507.c
    M hw/s390x/virtio-ccw.c
    M hw/scsi/vhost-scsi.c
    M hw/timer/hpet.c
    M hw/tpm/tpm_passthrough.c
    M hw/usb/bus.c
    M hw/usb/ccid-card-passthru.c
    M hw/usb/dev-serial.c
    M hw/usb/dev-storage.c
    M hw/usb/host-libusb.c
    M hw/usb/redirect.c
    M include/qapi/qmp/qerror.h
    M migration/migration.c
    M migration/qemu-file-buf.c
    M migration/qemu-file.c
    M migration/rdma.c
    M migration/savevm.c
    M net/net.c
    M net/slirp.c
    M qdev-monitor.c
    M qemu-char.c
    M qemu-io-cmds.c
    M qemu-io.c
    M qemu-nbd.c
    M slirp/misc.c
    M target-i386/cpu.c
    M target-s390x/kvm.c
    M tpm.c
    M ui/input.c
    M ui/spice-core.c
    M ui/vnc.c
    M util/osdep.c
    M util/qemu-error.c
    M vl.c

  Log Message:
  -----------
  qerror: Move #include out of qerror.h

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Luiz Capitulino <address@hidden>


  Commit: cc7a8ea740ec74a144e866a1d24aa6b490e31923
      
https://github.com/qemu/qemu/commit/cc7a8ea740ec74a144e866a1d24aa6b490e31923
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M backends/hostmem.c
    M balloon.c
    M block.c
    M block/backup.c
    M block/commit.c
    M block/mirror.c
    M block/qcow.c
    M block/quorum.c
    M block/snapshot.c
    M block/stream.c
    M block/vmdk.c
    M blockdev.c
    M blockjob.c
    M dump.c
    M hmp.c
    M hw/char/serial-pci.c
    M hw/dma/xilinx_axidma.c
    M hw/misc/ivshmem.c
    M hw/net/xilinx_axienet.c
    M hw/pci/pci-stub.c
    M hw/pci/pcie.c
    M hw/pci/shpc.c
    M hw/ppc/virtex_ml507.c
    M hw/s390x/s390-virtio.c
    M hw/usb/redirect.c
    M hw/virtio/virtio-rng.c
    M include/block/block_int.h
    M include/monitor/monitor.h
    M include/qemu/sockets.h
    M migration/migration.c
    M migration/savevm.c
    M monitor.c
    M net/net.c
    M numa.c
    M qapi/qmp-output-visitor.c
    M qapi/string-output-visitor.c
    M qdev-monitor.c
    M qemu-img.c
    M qmp.c
    M qobject/json-parser.c
    M scripts/qapi-commands.py
    M stubs/dump.c
    M target-arm/cpu.c
    M target-i386/kvm.c
    M ui/vnc.c
    M util/qemu-config.c

  Log Message:
  -----------
  Include qapi/qmp/qerror.h exactly where needed

In particular, don't include it into headers.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Luiz Capitulino <address@hidden>


  Commit: a0b1a66ea39bca011108734147a72232a4d08c7a
      
https://github.com/qemu/qemu/commit/a0b1a66ea39bca011108734147a72232a4d08c7a
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-22 (Mon, 22 Jun 2015)

  Changed paths:
    M balloon.c
    M blockdev-nbd.c
    M hw/core/platform-bus.c
    M hw/display/qxl.c
    M hw/i386/pc.c
    M hw/ide/ahci.c
    M hw/ppc/spapr_vio.c
    M hw/s390x/event-facility.c
    M hw/s390x/s390-virtio-bus.c
    M hw/s390x/s390-virtio.c
    M hw/s390x/virtio-ccw.c
    M hw/usb/ccid-card-emulated.c
    M hw/usb/ccid-card-passthru.c
    M hw/usb/dev-serial.c
    M hw/usb/dev-smartcard-reader.c
    M hw/usb/hcd-ehci.h
    M hw/usb/redirect.c
    M include/block/block_int.h
    M include/monitor/qdev.h
    M include/sysemu/balloon.h
    M include/ui/console.h
    M include/ui/qemu-spice.h
    M migration/migration.c
    M net/l2tpv3.c
    M qmp.c
    M target-s390x/kvm.c
    M tpm.c
    M ui/input-legacy.c
    M ui/spice-display.c
    M ui/vnc-jobs.c

  Log Message:
  -----------
  Include monitor/monitor.h exactly where needed

In particular, don't include it into headers.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Luiz Capitulino <address@hidden>


  Commit: a3206972a9eab65ec8e8f9ae320ad628ba4b58f1
      
https://github.com/qemu/qemu/commit/a3206972a9eab65ec8e8f9ae320ad628ba4b58f1
  Author: Peter Maydell <address@hidden>
  Date:   2015-06-23 (Tue, 23 Jun 2015)

  Changed paths:
    M audio/spiceaudio.c
    M audio/wavcapture.c
    M backends/hostmem.c
    M backends/rng-egd.c
    M backends/rng-random.c
    M backends/rng.c
    M backends/tpm.c
    M balloon.c
    M block.c
    M block/backup.c
    M block/commit.c
    M block/curl.c
    M block/dmg.c
    M block/io.c
    M block/iscsi.c
    M block/mirror.c
    M block/qapi.c
    M block/qcow.c
    M block/qcow2-snapshot.c
    M block/qcow2.c
    M block/qed.c
    M block/quorum.c
    M block/raw-posix.c
    M block/raw-win32.c
    M block/snapshot.c
    M block/ssh.c
    M block/stream.c
    M block/vhdx-log.c
    M block/vmdk.c
    M block/vvfat.c
    M blockdev-nbd.c
    M blockdev.c
    M blockjob.c
    M cpus.c
    M disas.c
    M dump.c
    M hmp.c
    M hw/9pfs/virtio-9p.c
    M hw/char/serial-pci.c
    M hw/char/virtio-serial-bus.c
    M hw/core/nmi.c
    M hw/core/platform-bus.c
    M hw/core/qdev-properties-system.c
    M hw/core/qdev-properties.c
    M hw/core/qdev.c
    M hw/display/g364fb.c
    M hw/display/qxl.c
    M hw/display/tcx.c
    M hw/dma/xilinx_axidma.c
    M hw/i386/pc.c
    M hw/ide/ahci.c
    M hw/intc/openpic.c
    M hw/misc/ivshmem.c
    M hw/net/rocker/qmp-norocker.c
    M hw/net/xilinx_axienet.c
    M hw/pci/pci-stub.c
    M hw/pci/pci.c
    M hw/pci/pcie.c
    M hw/pci/pcie_aer.c
    M hw/pci/shpc.c
    M hw/ppc/spapr_pci.c
    M hw/ppc/spapr_vio.c
    M hw/ppc/virtex_ml507.c
    M hw/s390x/event-facility.c
    M hw/s390x/s390-virtio-bus.c
    M hw/s390x/s390-virtio.c
    M hw/s390x/virtio-ccw.c
    M hw/scsi/vhost-scsi.c
    M hw/timer/hpet.c
    M hw/tpm/tpm_passthrough.c
    M hw/usb/bus.c
    M hw/usb/ccid-card-emulated.c
    M hw/usb/ccid-card-passthru.c
    M hw/usb/dev-network.c
    M hw/usb/dev-serial.c
    M hw/usb/dev-smartcard-reader.c
    M hw/usb/dev-storage.c
    M hw/usb/hcd-ehci.h
    M hw/usb/host-libusb.c
    M hw/usb/redirect.c
    M hw/virtio/virtio-rng.c
    M include/block/block_int.h
    M include/disas/disas.h
    M include/monitor/monitor.h
    M include/monitor/qdev.h
    M include/net/net.h
    M include/qapi/qmp/qbool.h
    M include/qapi/qmp/qdict.h
    M include/qapi/qmp/qerror.h
    M include/qapi/qmp/qobject.h
    M include/qemu/log.h
    M include/qemu/option.h
    M include/qemu/sockets.h
    M include/sysemu/balloon.h
    M include/ui/console.h
    M include/ui/qemu-spice.h
    M migration/migration.c
    M migration/qemu-file-buf.c
    M migration/qemu-file.c
    M migration/rdma.c
    M migration/savevm.c
    M monitor.c
    M net/l2tpv3.c
    M net/net.c
    M net/slirp.c
    M numa.c
    M qapi/opts-visitor.c
    M qapi/qapi-visit-core.c
    M qapi/qmp-dispatch.c
    M qapi/qmp-input-visitor.c
    M qapi/qmp-output-visitor.c
    M qapi/string-input-visitor.c
    M qapi/string-output-visitor.c
    M qdev-monitor.c
    M qemu-char.c
    M qemu-img.c
    M qemu-io-cmds.c
    M qemu-io.c
    M qemu-nbd.c
    M qga/commands-posix.c
    M qga/commands-win32.c
    M qga/main.c
    M qmp-commands.hx
    M qmp.c
    M qobject/Makefile.objs
    M qobject/json-parser.c
    M qobject/qbool.c
    M qobject/qdict.c
    R qobject/qerror.c
    M qobject/qjson.c
    M qom/object.c
    M scripts/qapi-commands.py
    M slirp/misc.c
    M stubs/Makefile.objs
    M stubs/arch-query-cpu-def.c
    M stubs/dump.c
    M stubs/mon-is-qmp.c
    R stubs/mon-set-error.c
    M target-alpha/translate.c
    M target-arm/cpu.c
    M target-arm/translate-a64.c
    M target-arm/translate.c
    M target-cris/translate.c
    M target-i386/cpu.c
    M target-i386/kvm.c
    M target-i386/translate.c
    M target-lm32/translate.c
    M target-m68k/translate.c
    M target-microblaze/translate.c
    M target-mips/translate.c
    M target-openrisc/translate.c
    M target-ppc/translate.c
    M target-s390x/kvm.c
    M target-s390x/translate.c
    M target-sh4/translate.c
    M target-sparc/translate.c
    M target-tricore/translate.c
    M target-unicore32/translate.c
    M target-xtensa/translate.c
    M tests/check-qjson.c
    M tests/test-opts-visitor.c
    M tests/test-qemu-opts.c
    M tests/test-qmp-event.c
    M tests/test-qmp-output-visitor.c
    M tpm.c
    M ui/input-legacy.c
    M ui/input.c
    M ui/spice-core.c
    M ui/spice-display.c
    M ui/vnc-jobs.c
    M ui/vnc.c
    M util/osdep.c
    M util/qemu-config.c
    M util/qemu-error.c
    M util/qemu-option.c
    M vl.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2015-06-22' 
into staging

Monitor patches

# gpg: Signature made Mon Jun 22 18:56:18 2015 BST using RSA key ID EB918653
# gpg: Good signature from "Markus Armbruster <address@hidden>"
# gpg:                 aka "Markus Armbruster <address@hidden>"

* remotes/armbru/tags/pull-monitor-2015-06-22: (24 commits)
  Include monitor/monitor.h exactly where needed
  Include qapi/qmp/qerror.h exactly where needed
  qerror: Move #include out of qerror.h
  qerror: Finally unused, clean up
  qmp: Wean off qerror_report()
  tpm: Avoid qerror_report() outside QMP command handlers
  qerror: Clean up QERR_ macros to expand into a single string
  qerror: Eliminate QERR_DEVICE_NOT_FOUND
  vl: Use error_report() for --display errors
  vl: Avoid qerror_report() outside QMP command handlers
  QemuOpts: Wean off qerror_report_err()
  qdev-monitor: Propagate errors through qdev_device_add()
  qdev-monitor: Propagate errors through set_property()
  qdev-monitor: Convert qbus_find() to Error
  qdev-monitor: Fix check for full bus
  qdev-monitor: Stop error avalanche in qbus_find_recursive()
  disas: Remove uses of CPU env
  monitor: Split mon_get_cpu fn to remove ENV_GET_CPU
  monitor: Fix failure path for "S" argument
  monitor: Point to "help" command on syntax error
  ...

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


Compare: https://github.com/qemu/qemu/compare/0c8ff723bd29...a3206972a9ea

reply via email to

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