Statistics
| Branch: | Revision:

root / qdev-monitor.c @ feature-archipelago

History | View | Annotate | Download (20.2 kB)

# Date Author Comment
52aa17cb 02/26/2014 07:32 pm Bandan Das

qdev-monitor: set DeviceState opts before calling realize

Setting opts before the realize property is set allows the
following patch to make decisions based on whether the user
specified "rombar". This also avoids having to create a new
tristate property especially for this purpose...

61e8a923 02/20/2014 03:05 pm Peter Maydell

Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' into staging

QOM infrastructure fixes and device conversions

  • QTest cleanups and test cases for PCI NICs
  • NAND fix for "info qtree"
  • Cleanup and extension of QOM machine tests...
84d18f06 02/17/2014 06:57 pm Markus Armbruster

Use error_is_set() only when necessary

error_is_set(&var) is the same as var != NULL, but it takes
whole-program analysis to figure that out. Unnecessarily hard for
optimizers, static checkers, and human readers. Dumb it down to
obvious.

Gets rid of several dozen Coverity false positives....

0b7593e0 02/14/2014 10:12 pm Paolo Bonzini

qapi: Add human mode to StringOutputVisitor

This will be used by "info qtree". For numbers it prints both the
decimal and hex values. For sizes it rounds to the nearest power
of 2^10. For strings, it puts quotes around the string and separates
NULL and empty string....

dae3bda4 02/14/2014 10:12 pm Paolo Bonzini

qdev: Use human mode in "info qtree"

Reviewed-by: Igor Mammedov <>
Reviewed-by: Eric Blake <>
Signed-off-by: Paolo Bonzini <>
Signed-off-by: Andreas Färber <>

98a65284 02/14/2014 10:12 pm Paolo Bonzini

qdev: Inline qdev_prop_parse()

Reviewed-by: Igor Mammedov <>
Reviewed-by: Eric Blake <>
Signed-off-by: Paolo Bonzini <>
Signed-off-by: Andreas Färber <>

133fe774 01/14/2014 04:10 am Edgar E. Iglesias

Merge remote branch 'luiz/queue/qmp' into qmpq

  • luiz/queue/qmp:
    migration: qmp_migrate(): keep working after syntax error
    qerror: Remove assert_no_error()
    qemu-option: Remove qemu_opts_create_nofail
    target-i386: Remove assert_no_error usage
    hw: Remove assert_no_error usages...
87ea75d5 01/06/2014 10:02 pm Peter Crosthwaite

qemu-option: Remove qemu_opts_create_nofail

This is a boiler-plate _nofail variant of qemu_opts_create. Remove and
use error_abort in call sites.

null/0 arguments needs to be added for the id and fail_if_exists fields
in affected callsites due to argument inconsistency between the normal and...

11c308b1 12/24/2013 07:02 pm Markus Armbruster

qdev-monitor: Improve error message for -device nonexistant

Once upon a time, the error message was:

qemu: -device nonexistant: Device "nonexistant" not found.  Try -device '?' for a list.

But progress marches on, and conversion to QError (commit 0204276)...

061e84f7 12/24/2013 06:26 pm Markus Armbruster

qdev-monitor: Avoid device_add crashing on non-device driver name

Watch this:

$ upstream-qemu -nodefaults -S -display none -monitor stdio
QEMU 1.7.50 monitor - type 'help' for more information
(qemu) device_add rng-egd
/work/armbru/qemu/qdev-monitor.c:491:qdev_device_add: Object 0x2089b00 is not an instance of type device...
7ea5e78f 12/23/2013 01:27 am Markus Armbruster

qdev: Do not let the user try to device_add when it cannot work

Such devices have always been unavailable and omitted from the list of
available devices shown by device_add help. Until commit 18b6dad
silently broke the former, setting up nasty traps for unwary users,...

efec3dd6 12/23/2013 01:27 am Markus Armbruster

qdev: Replace no_user by cannot_instantiate_with_device_add_yet

In an ideal world, machines can be built by wiring devices together
with configuration, not code. Unfortunately, that's not the world we
live in right now. We still have quite a few devices that need to be...

2bcb0c62 11/05/2013 07:06 pm Andreas Färber

qdev-monitor: Avoid qdev as variable name

Prepares for bringing error cleanup code into canonical QOM form.

Includes a whitespace removal after curly brace by Stefan.

Signed-off-by: Stefan Hajnoczi <>
Reviewed-by: Igor Mammedov <>...

852e2c50 11/05/2013 07:06 pm Andreas Färber

qdev-monitor: Inline qdev_init() for device_add

For historic reasons, qdev_init() unparents the device on failure.
Inline this to make the error paths clearer and consistent.

Reviewed-by: Igor Mammedov <>
Signed-off-by: Andreas Färber <>

02a5c4c9 11/05/2013 07:06 pm Stefan Hajnoczi

qdev: Drop misleading qdev_free() function

The qdev_free() function name is misleading since all the function does
is unlink the device from its parent. The device is not necessarily
freed.

The device will be freed when its QObject refcount reaches zero. It is...

ee6abeb6 11/05/2013 07:06 pm Stefan Hajnoczi

qdev-monitor: Unref device when device_add fails

qdev_device_add() leaks the created device upon failure. I suspect this
problem crept in because qdev_free() unparents the device but does not
drop a reference - confusing name.

Cc: ...

f4d85795 11/05/2013 06:47 pm Andreas Färber

qdev-monitor: Clean up qdev_device_add() variable naming

Avoid confusion between object (obj) and object class (oc).
Tidy DeviceClass variable while at it (k -> dc).

Signed-off-by: Andreas Färber <>

2fa4e56d 11/05/2013 06:47 pm Igor Mammedov

qdev-monitor: Fix crash when device_add is called with abstract driver

User is able to crash running QEMU when following monitor
command is called:

device_add intel-hda-generic

Crash is caused by assertion in object_initialize_with_type()
when type is abstract....

1fc224b4 10/11/2013 07:36 pm Markus Armbruster

Mostly revert "qemu-help: Sort devices by logical functionality"

This reverts most of commit 3d1237fb2ab4edb926c717767bb5e31d6053a7c5.

The commit claims to sort the output of "-device help" "by
functionality rather than alphabetical". Issues:

  • The output was unsorted before, not alphabetically sorted....
a3400aee 10/11/2013 07:36 pm Markus Armbruster

qdev-monitor: Group "device_add help" and "info qdm" by category

Output is a long, unsorted list. Not very helpful. Print one list
per device category instead, with a header line identifying the
category, plus a list of uncategorized devices. Print each list in...

3d1237fb 07/29/2013 06:37 pm Marcel Apfelbaum

qemu-help: Sort devices by logical functionality

Categorize devices that appear as output to "-device ?" command
by logical functionality. Sort the devices by logical categories
before showing them to user.

The sort is done by functionality rather than alphabetical....

dfc6f865 07/27/2013 10:22 am Stefan Weil

misc: Use g_assert_not_reached for code which is expected to be unreachable

The macro g_assert_not_reached is a better self documenting replacement
for assert(0) or assert(false).

Signed-off-by: Stefan Weil <>
Signed-off-by: Michael Tokarev <>

b1fe9bcb 05/06/2013 08:40 pm Andreas Färber

qdev: Let qdev_prop_parse() pass through Error

Move error reporting to callers.

Reviewed-by: Eduardo Habkost <>
Signed-off-by: Andreas Färber <>

95e2af98 04/17/2013 06:24 pm Alexey Kardashevskiy

qbus: remove wrong error messages

The existing code shows the "Bus '%s' is full" message even if name
is specified and different from bus->name (i.e. match=0).

The patch excludes unnecessary error message.

Signed-off-by: Alexey Kardashevskiy <>...

2f7bd829 04/17/2013 12:10 am Andreas Färber

qdev: Fix device_add bus assumptions

Drop an unreachable fallback bus assignment to SysBus.

If no ,bus= is specified, only search busses recursively for bus type if
the DeviceClass has a bus_type specified. Handle resulting NULL cases.

Signed-off-by: Andreas Färber <>...

b4a42f81 03/01/2013 02:54 pm Paolo Bonzini

hw: move qdev-monitor.o to toplevel directory

qdev-monitor.c is the only "core qdev" file that is not used in
user-mode emulation, and it does not define anything that is used
by hardware models. Remove it from the hw/ directory and
remove hw/qdev-monitor.h from hw/qdev.h too; this requires...