Statistics
| Branch: | Revision:

root / hw / qdev.c @ 93148aa5

History | View | Annotate | Download (17.4 kB)

# Date Author Comment
4ed658ca 02/17/2012 05:58 pm Andreas Färber

qdev: Fix qdev_try_create() semantics

Since QOM'ification, qdev_try_create() uses object_new() internally,
which asserts "type != NULL" when the type is not registered.
This was revealed by the combination of kvmclock's kvm_enabled() check
and early QOM type registration....

83f7d43a 02/15/2012 05:39 pm Andreas Färber

qom: Unify type registration

Replace device_init() with generalized type_init().

While at it, unify naming convention: type_init([$prefix_]register_types)
Also, type_init() is a function, so add preceding blank line where
necessary and don't put a semicolon after the closing brace....

dd0ba250 02/07/2012 02:52 pm Paolo Bonzini

qdev: let QOM free properties

Drop the special free callback. Instead, register a "regular"
release method in the non-legacy property.

Reviewed-by: Anthony Liguori <>
Signed-off-by: Paolo Bonzini <>

4f2d3d70 02/07/2012 02:52 pm Paolo Bonzini

qdev: initialize properties via QOM

Similarly, use the object properties also to set the default
values of the qdev properties. This requires reordering
registration and initialization.

Reviewed-by: Anthony Liguori <>
Signed-off-by: Paolo Bonzini <>

d822979b 02/07/2012 02:52 pm Paolo Bonzini

qdev: remove direct calls to print/parse

There's no need to call into ->parse and ->print manually. The
QOM legacy properties do that for us.

Furthermore, in some cases legacy and static properties have exactly
the same behavior, and we could drop the legacy properties right away....

68ee3569 02/07/2012 02:52 pm Paolo Bonzini

qdev: allow reusing get/set for legacy property

In some cases, a legacy property does need a special print method
but not a special parse method. In this case, we can reuse the get/set
from the static (non-legacy) property.

If neither parse nor print is needed, though, do not register the...

9674bfe4 02/03/2012 06:41 pm Anthony Liguori

qdev: split out common init to instance_init

This gets us closer to being able to object_new() a qdev type and have a
functioning object verses having to call qdev_create().

Signed-off-by: Anthony Liguori <>

9fbe6127 02/03/2012 06:41 pm Anthony Liguori

qdev: refactor away qdev_create_from_info

Note that the FIXME gets fixed in series 4/4. We need to convert BusState to
QOM before we can make parent_bus a link.

Signed-off-by: Anthony Liguori <>

ee46d8a5 02/03/2012 06:41 pm Anthony Liguori

qdev: split out UI portions into a new function

qdev-monitor.c deals with the -device, device_add, and info qdm/qtree
interfaces.

Signed-off-by: Anthony Liguori <>

0beb4942 02/03/2012 06:41 pm Anthony Liguori

qdev: nuke qdev_init_chardev()

I'm sure the intentions were good here, but there's no reason this should be in
qdev. Move it to qemu-char where it belongs.

Signed-off-by: Anthony Liguori <>

57c9fafe 02/03/2012 06:41 pm Anthony Liguori

qom: move properties from qdev to object

This is mostly code movement although not entirely. This makes properties part
of the Object base class which means that we can now start using Object in a
meaningful way outside of qdev.

Signed-off-by: Anthony Liguori <>

60adba37 02/03/2012 06:41 pm Anthony Liguori

qdev: implement cleanup logic in finalize

Signed-off-by: Anthony Liguori <>

6acbe4c6 02/03/2012 06:41 pm Anthony Liguori

qdev: remove baked in notion of aliases (v2)

Limit them to the device_add functionality. Device aliases were a hack based
on the fact that virtio was modeled the wrong way. The mechanism for aliasing
is very limited in that only one alias can exist for any device....

212ad111 02/03/2012 06:41 pm Anthony Liguori

qdev: kill off DeviceInfo list

Teach the various bits of code that need to walk through available devices to
do so via QOM.

Signed-off-by: Anthony Liguori

d307af79 02/03/2012 06:41 pm Anthony Liguori

qdev: kill off DeviceInfo

It is no longer used in the tree since everything is done natively through
QEMU Object Model.

Signed-off-by: Anthony Liguori <>

6e008585 02/03/2012 06:41 pm Anthony Liguori

qdev: remove info from class

Now DeviceInfo is no longer used after object construction. All of the
relevant members have been moved to DeviceClass.

Signed-off-by: Anthony Liguori <>

d253e096 02/03/2012 06:41 pm Anthony Liguori

qdev: allow classes to overload qdev functions

This allows us to drop per-Device registration functions by allowing the
class_init functions to overload qdev methods.

Signed-off-by: Anthony Liguori <>

18b6dade 02/03/2012 06:41 pm Anthony Liguori

qdev: refactor device creation to allow bus_info to be set only in class

As we use class_init to set class members, DeviceInfo no longer holds this
information.

Signed-off-by: Anthony Liguori <>

4be9f0d1 02/03/2012 06:41 pm Anthony Liguori

qdev: make DeviceInfo private

Introduce accessors and remove any code that directly accesses DeviceInfo
members.

Signed-off-by: Anthony Liguori <>

40021f08 01/27/2012 06:50 pm Anthony Liguori

pci: convert to QEMU Object Model

Signed-off-by: Anthony Liguori <>

94afdadc 01/27/2012 06:50 pm Anthony Liguori

qdev: use a wrapper to access reset and promote reset to a class method

Signed-off-by: Anthony Liguori <>

3cc90eb2 01/27/2012 06:50 pm Anthony Liguori

qdev: add a interface to register subclasses

In order to introduce inheritance while still using the qdev registration
interfaces, we need to be able to use a parent other than TYPE_DEVICE. Add a
new interface that allows this.

Signed-off-by: Anthony Liguori <>

3dde52d2 01/27/2012 06:50 pm Anthony Liguori

qdev: add class_init to DeviceInfo

Since we are still dynamically creating TypeInfo, we need to chain the
class_init function in order to be able to make use of it within subclasses of
TYPE_DEVICE.

This will disappear once we register TypeInfos directly....

f79f2bfc 01/27/2012 06:50 pm Anthony Liguori

qdev: don't access name through info

We already have a QOM interface for this so let's use it.

Signed-off-by: Anthony Liguori <>

30fbb9fc 01/27/2012 06:50 pm Anthony Liguori

qdev: move qdev->info to class

Right now, DeviceInfo acts as the class for qdev. In order to switch to a
proper ObjectClass derivative, we need to ween all of the callers off of
interacting directly with the info pointer.

Signed-off-by: Anthony Liguori <>

32fea402 01/27/2012 06:28 pm Anthony Liguori

qdev: integrate with QEMU Object Model (v2)

This is a very shallow integration. We register a TYPE_DEVICE but only use
QOM as basically a memory allocator. This will make all devices show up as
QOM objects but they will all carry the TYPE_DEVICE.

Signed-off-by: Anthony Liguori <>...

a369da5f 01/22/2012 09:27 am Blue Swirl

vga: improve VGA logic

Improve VGA selection logic, push check for device availabilty to vl.c.
Create the devices at board level unconditionally.

Remove now unused pci_try_create*() functions.

Make PCI VGA devices optional.

Reviewed-by: Jan Kiszka <>...

024a6fbd 01/13/2012 06:20 pm Anthony Liguori

qdev: fix device_del by refactoring reference counting

Commit 8eb0283 broken device_del by having too overzealous reference counting
checks. Move the reference count checks to qdev_free(), make sure to remove
the parent link on free, and decrement the reference count on property removal....

1de81d28 12/20/2011 12:39 am Anthony Liguori

qdev: fix hotplug when no -device is specified

The peripheral[-anon] containers are initialized lazily but since they sit on
sysbus, they can not be created after realize. This was causing an abort() to
occur during hotplug if no -device option was used....

cafe5bdb 12/19/2011 06:27 pm Paolo Bonzini

qom: distinguish "legacy" property type name from QOM type name

Reviewed-by: Anthony Liguori <>
Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

ca2cc788 12/19/2011 06:27 pm Paolo Bonzini

qom: register qdev properties also as non-legacy properties

Push legacy properties into a "legacy-..." namespace, and make them
available with correct types too.

For now, all properties come in both variants. This need not be the
case for string properties. We will revisit this after -device is...

0d41d9aa 12/19/2011 06:27 pm Paolo Bonzini

qom: fix swapped parameters

Reviewed-by: Anthony Liguori <>
Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

e3cb6ba6 12/19/2011 06:27 pm Paolo Bonzini

qom: push permission checks up into qdev_property_add_legacy

qdev_property_get and qdev_property_set can generate permission
denied errors themselves. Do not duplicate this functionality in
qdev_get/set_legacy_property, and clean up excessive indentation....

7db4c4e8 12/19/2011 06:27 pm Paolo Bonzini

qom: interpret the return value when setting legacy properties

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

b2b6c39a 12/15/2011 05:20 pm Anthony Liguori

qom: optimize qdev_get_canonical_path using a parent link

The full tree search was a bit unreasonable.

Signed-off-by: Anthony Liguori <>

6a146eba 12/15/2011 05:20 pm Anthony Liguori

qom: add string property type

Signed-off-by: Anthony Liguori <>

cd34d667 12/15/2011 05:20 pm Anthony Liguori

qdev: add a qdev_get_type() function and expose as a 'type' property

Signed-off-by: Anthony Liguori <>

dc45c21f 12/15/2011 05:20 pm Anthony Liguori

qdev: provide a path resolution (v2)

There are two types of supported paths--absolute paths and partial paths.

Absolute paths are derived from the root device and can follow child<> or
link<> properties. Since they can follow link<> properties, they can be...

3de1c3e8 12/15/2011 05:20 pm Anthony Liguori

qom: add child properties (composition) (v3)

Child properties express a relationship of composition.

Signed-off-by: Anthony Liguori <>

83e94fb8 12/15/2011 05:20 pm Anthony Liguori

qom: add link properties (v2)

Links represent an ephemeral relationship between devices. They are meant to
replace the qdev concept of busses by allowing more informal relationships
between devices.

Links are fairly limited in their usefulness without implementing QOM-style...

1bdaacb1 12/15/2011 05:20 pm Anthony Liguori

qdev: add explicitly named devices to the root complex

We first add a 'peripheral' container to the root device that we add user
created devices to. This provides all user created devices with a unique and
isolated namespace.

Signed-off-by: Anthony Liguori <>

8eb02831 12/15/2011 05:20 pm Anthony Liguori

dev: add an anonymous peripheral container

Signed-off-by: Anthony Liguori <>

85ed303b 12/15/2011 05:20 pm Anthony Liguori

qom: add a reference count to qdev objects

To ensure that a device isn't removed from the graph until all of its links are
broken.

Signed-off-by: Anthony Liguori <>

44677ded 12/15/2011 05:20 pm Anthony Liguori

qom: add new dynamic property infrastructure based on Visitors (v2)

qdev properties are settable only during construction and static to classes.
This isn't flexible enough for QOM.

This patch introduces a property interface for qdev that provides dynamic...

a5296ca9 12/15/2011 05:20 pm Anthony Liguori

qom: register legacy properties as new style properties (v2)

Expose all legacy properties through the new QOM property mechanism. The qdev
property types are exposed through the 'legacy<>' namespace. They are always
visited as strings since they do their own string parsing....

a10f07a7 12/15/2011 05:20 pm Anthony Liguori

qom: introduce root device

This is based on Jan's suggestion for how to do unique naming. The root device
is the root of composition. All devices are reachable via child<> links from
this device.

Signed-off-by: Anthony Liguori <>

f9fbd2fd 12/15/2011 05:20 pm Anthony Liguori

qdev: provide an interface to return canonical path from root (v2)

The canonical path is the path in the composition tree from the root to the
device. This is effectively the name of the device.

This is an incredibly unefficient implementation that will be optimized in...

542379f4 11/10/2011 02:29 pm Markus Armbruster

qdev: Fix crash on -device '?=x'

Spotted by Coverity.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Stefan Hajnoczi <>

d8bb00d6 10/28/2011 08:25 pm Paolo Bonzini

qdev: switch children device list to QTAILQ

SCSI buses will need to read the children list first-to-last. This
requires using a QTAILQ, because hell breaks loose if you just try
inserting at the tail (thus reversing the order of all existing
visits from last-to-first to first-to-tail)....

a8467c7a 09/16/2011 05:06 pm Gerd Hoffmann

qdev: print bus properties too

Make qdev_device_help print both device and bus properties.
Helps libvirt to figure whenever bus properties such as
PCI.multifunction are supported present or not.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

e92714c7 08/11/2011 04:37 pm Peter Maydell

hw/qdev: Don't crash if qdev_create(NULL, ...) fails

If an attempt to create a qdev device on the default sysbus (by passing
NULL as the bus to qdev_create) fails, print a useful error message
rather than crashing trying to dereference a NULL pointer.

Signed-off-by: Peter Maydell <>...

2da8bb92 08/05/2011 06:57 pm Isaku Yamahata

qdev: Eliminate duplicate reset

qbus_reset_all_fn was registered twice, so a lot of device reset
functions were also called twice when QEMU started.
Which was introduced by 80376c3fc2c38fdd45354e4b0eb45031f35587ed
This patch fixes it by making the main_system_bus creation not register...

5ab28c83 07/29/2011 04:17 pm Jan Kiszka

qdev: Reset hot-plugged devices

Device models rely on the core invoking their reset handlers after init.
We do this in the cold-plug case, but so far we miss this step after
hot-plug.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

6eed1856 07/23/2011 06:19 pm Jan Kiszka

net: Consistently use qemu_macaddr_default_if_unset

Drop the open-coded MAC assignment from net_init_nic and replace it with
standard qemu_macaddr_default_if_unset which is also used by qdev. That
avoid creating colliding MACs when instantiating NICs via different...

6daf194d 06/24/2011 11:13 am Markus Armbruster

Strip trailing '\n' from error_report()'s first argument

error_report() prepends location, and appends a newline. The message
constructed from the arguments should not contain a newline. Fix the
obvious offenders.

Signed-off-by: Markus Armbruster <>...

48e2faf2 06/22/2011 03:18 pm Peter Maydell

net: Warn about "-net nic" options which were ignored

Diagnose the case where the user asked for a NIC via "-net nic"
but the board didn't instantiate that NIC (for example where the
user asked for two NICs but the board only supports one). Note
that this diagnostic doesn't apply to NICs created through -device,...

3b29a101 04/07/2011 04:25 pm Michael Tokarev

qdev: Fix comment around qdev_init_nofail()

In previous life qdev_init_nofail() used to call hw_error() which
did register dump and other scary things. Now it calls
error_report() and does a regular exit(1). Fix the comment
to match reality.

Signed-off-by: Michael Tokarev <>...

0bcdeda7 02/12/2011 10:27 am Blue Swirl

qdev: add creation function that may fail

Signed-off-by: Blue Swirl <>

27d6bf40 01/31/2011 11:42 am Markus Armbruster

blockdev: Fix regression in -drive if=scsi,index=N

Before commit 622b520f, index=12 meant bus=1,unit=5.

Since the commit, it means bus=0,unit=12. The drive is created, but
not the guest device. That's because the controllers we use with
if=scsi drives (lsi53c895a and esp) support only 7 units, and...

13839974 01/31/2011 11:24 am Markus Armbruster

blockdev: New drive_get_next(), replacing qdev_init_bdrv()

qdev_init_bdrv() doesn't belong into qdev.c; it's about drives, not
qdevs. Rename to drive_get_next, move to blockdev.c, drop the bogus
DeviceState argument, and return DriveInfo instead of
BlockDriverState....

0ac8ef71 01/05/2011 12:14 pm Alex Williamson

qdev: Track runtime machine modifications

Create a trivial interface to track whether the machine has been
modified since boot. Adding or removing devices will trigger this
to return true. An example usage scenario for such an interface is
the rtl8139 driver which includes a cpu_register_io_memory() value...

a2ee6b4f 12/24/2010 10:35 am Isaku Yamahata

qdev: export qdev_find_recursive() for later use

This patch exports qdev_find_recursive() for later use.

Signed-off-by: Isaku Yamahata <>
Signed-off-by: Michael S. Tsirkin <>

f530cce3 12/21/2010 02:06 pm Michael S. Tsirkin

qdev: remove an unused function

qbus_reset_all is unused, remove it

Signed-off-by: Michael S. Tsirkin <>

80376c3f 12/20/2010 03:16 pm Isaku Yamahata

qbus: register reset handler for qbus whose parent is NULL

Stefan Weil reported the regression caused by
ec990eb622ad46df5ddcb1e94c418c271894d416 as follows

The second regression also occurs with MIPS malta.
Networking no longer works with the default pcnet nic....

68694897 12/19/2010 02:06 pm Stefan Weil

qdev: sysbus_get_default must not return a NULL pointer (fix regression)

Every system should have some sort of main system bus,
so sysbus_get_default should always return a valid bus.

Without this patch, at least mipssim and malta no longer
start but raise a null pointer access exception (caused by...

1ca4d09a 12/11/2010 11:32 pm Gleb Natapov

Add bootindex parameter to net/block/fd device

If bootindex is specified on command line a string that describes device
in firmware readable way is added into sorted list. Later this list will
be passed into firmware to control boot order.

Signed-off-by: Gleb Natapov <>...

81699d8a 11/22/2010 10:00 am Anthony Liguori

qbus: add functions to walk both devices and busses

There are some cases where you want to walk the busses, in particular, when
searching for a bus either by name or DeviceInfo.
Paolo suggested that we model the return values on how GCC's walkers work which...

ec990eb6 11/22/2010 10:00 am Anthony Liguori

qdev: reset qdev along with qdev tree

This patch changes the reset handling so that qdev has no knowledge of the
global system reset. Instead, a new bus/device level function is introduced
that allows all devices/buses on the bus/device to be reset using a depth...

b4694b7c 11/22/2010 10:00 am Isaku Yamahata

qdev: introduce reset call back for qbus level

and make it called via qbus_reset_all().
The qbus reset callback will be used by pci bus reset.

Signed-off-by: Isaku Yamahata <>
Signed-off-by: Anthony Liguori <>
Signed-off-by: Michael S. Tsirkin <>

5af0a04b 11/22/2010 10:00 am Isaku Yamahata

qdev: trigger reset from a given device

Introduce a helper function which triggers reset from a given device.
Will be used by pci bus emulation.

Signed-off-by: Isaku Yamahata <>
Signed-off-by: Anthony Liguori <>
Signed-off-by: Michael S. Tsirkin <>

2446333c 08/24/2010 06:22 pm Blue Swirl

Rearrange block headers

Changing block.h or blockdev.h resulted in recompiling most objects.

Move DriveInfo typedef and BlockInterfaceType enum definitions
to qemu-common.h and rearrange blockdev.h use to decrease churn.

Signed-off-by: Blue Swirl <>

3329f07b 08/23/2010 01:11 am Gerd Hoffmann

QemuOpts: make most qemu_*_opts static

Switch tree to lookup-by-name using qemu_find_opts().
Also hook up virtfs options so qemu_find_opts works for them too.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

5efb397f 07/06/2010 06:48 pm Anthony Liguori

Merge remote branch 'kwolf/for-anthony' into staging

0be71e32 07/06/2010 06:36 pm Alex Williamson

savevm: Add DeviceState param

When available, we'd like to be able to access the DeviceState
when registering a savevm. For buses with a get_dev_path()
function, this will allow us to create more unique savevm
id strings.

Signed-off-by: Alex Williamson <>...

bd6c9a61 07/06/2010 06:05 pm Markus Armbruster

qdev: Don't hw_error() in qdev_init_nofail()

Some of the failures are internal errors, and hw_error() is okay then.
But the common way to fail is bad user input, e.g. -global
isa-fdc.driveA=foo where drive foo has an unsupported rerror value.

exit(1) instead....

a4673e27 06/14/2010 06:33 pm Anthony Liguori

Merge remote branch 'kwolf/for-anthony' into staging

Conflicts:
hw/pc.c

e163ae7b 06/10/2010 07:50 pm Isaku Yamahata

qbus: fix memory leak in qbus_free()

BusState::name is allocated in qbus_create_inplace().
So it should be freed by qbus_free().

Signed-off-by: Isaku Yamahata <>
Signed-off-by: Blue Swirl <>

d21357df 06/04/2010 12:43 pm Markus Armbruster

qdev: Don't leak string property value on hot unplug

parse_string() qemu_strdup()s the property value. It is never freed.
It needs to be freed along with the device. Otherwise, the value of
scsi-disk property "ver" gets leaked when hot-unplugging the disk, for...

637503d1 06/01/2010 09:48 pm Luiz Capitulino

Monitor: Drop QMP documentation from code

Previous commit added QMP documentation to the qemu-monitor.hx
file, it's is a copy of this information.

While it's good to keep it near code, maintaining two copies of
the same information is too hard and has little benefit as we...

4d2ffa08 05/15/2010 05:23 pm Jan Kiszka

vmstate: Add support for alias ID

Some legacy users (mostly PC devices) of vmstate_register manage
instance IDs on their own, and that unfortunately in a way that is
incompatible with automatically generated ones. This so far prevents
switching those users to vmstates that are registered by qdev....

cc601cb7 04/19/2010 12:46 am Markus Armbruster

qdev: Convert qdev_unplug() to QError

Note: our device unplug methods don't need conversion work, because
they can't currently fail.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Luiz Capitulino <>

17a38eaa 04/19/2010 12:46 am Markus Armbruster

monitor: convert do_device_del() to QObject, QError

Signed-off-by: Markus Armbruster <>
Signed-off-by: Luiz Capitulino <>

e17ba87c 04/19/2010 12:46 am Markus Armbruster

error: Use QERR_INVALID_PARAMETER_VALUE instead of QERR_INVALID_PARAMETER

Signed-off-by: Markus Armbruster <>
Signed-off-by: Luiz Capitulino <>

c7e4e8ce 03/16/2010 06:45 pm Markus Armbruster

monitor: Use argument type 'O' for device_add

While there, improve the params help text.

8bc27249 03/16/2010 06:45 pm Markus Armbruster

monitor: convert do_device_add() to QObject

fc98eb43 03/16/2010 06:45 pm Markus Armbruster

qdev: Relax parsing of bus option

Treat multiple successive slashes as a one slash. Ignore trailing
slashes. This is how POSIX pathnames work.

ac8dae67 03/16/2010 06:45 pm Markus Armbruster

qdev: Convert qbus_find() to QError

3801cf8a 03/16/2010 06:45 pm Markus Armbruster

Revert "qdev: Use QError for 'device not found' error"

This reverts commit 3ced9f7a36189aed94d8bf86f3f5087a53012455.

The next commit will convert all of qdev_device_add() to QError, and
it'll be clearer with this partial conversion reverted.

0204276b 03/16/2010 06:45 pm Markus Armbruster

error: Convert do_device_add() to QError

Conversion to QObject is still missing.

8212c64f 03/16/2010 06:45 pm Markus Armbruster

qemu-option: Move the implied first name into QemuOptsList

We sometimes permit omitting the first option name, for example
-device foo is short for -device driver=foo. The name to use
("driver" in the example) is passed as argument to qemu_opts_parse()....

fdcfa190 03/16/2010 06:45 pm Markus Armbruster

qdev: convert setting device properties to QError

036f7166 03/16/2010 06:01 pm Markus Armbruster

qdev: Hide "ptr" properties from users

Users can't set them, so qdev_device_help() shouldn't list them. Fix
that. Also make qdev_prop_parse() hide them instead of printing a
meaningless "has no parser" error message.

Their value means nothing to users, so qdev_print_props() shouldn't...

1ecda02b 03/16/2010 05:58 pm Markus Armbruster

error: Replace qemu_error() by error_report()

error_report() terminates the message with a newline. Strip it it
from its arguments.

This fixes a few error messages lacking a newline:
net_handle_fd_param()'s "No file descriptor named %s found", and
tap_open()'s "vnet_hdr=1 requested, but no kernel support for...

ab5b027e 03/16/2010 05:58 pm Markus Armbruster

error: Rename qemu_error_new() to qerror_report()

327867b6 03/16/2010 05:58 pm Markus Armbruster

qdev: Fix -device and device_add to handle unsuitable bus gracefully

"device_add isa-serial,bus=pci.0" kills QEMU. Not good.

0c17542d 03/16/2010 05:58 pm Markus Armbruster

qdev: Factor qdev_create_from_info() out of qdev_create()

To make it obvious that -device and device_add can't die in
hw_error().

c64eafaf 03/16/2010 05:58 pm Markus Armbruster

qdev: Hide "no_user" devices from users

Users can't create them, so qdev_device_help() shouldn't list them.
Fix that.

Also make qdev_device_add() pretend they don't exist. Before, it
rejected them with a "can't be added via command line" message, which...

8a9662ca 03/16/2010 05:55 pm Markus Armbruster

error: Don't abuse qemu_error() for non-error in qdev_device_help()

qdev_device_help() prints device information with qemu_error(). A
later commit will make qemu_error() print additional stuff that is
only appropriate for proper errors, and then this will break. Use...

53db16b5 03/16/2010 05:55 pm Markus Armbruster

error: Don't abuse qemu_error() for non-error in qbus_find()

qbus_find() adds an informational line to error messages, and prints
both lines with one qemu_error(). Use error_printf() for the
informational line instead.

While there, simplify: instead of printing buffers filled by...