Statistics
| Branch: | Revision:

root / hw / qdev.c @ 53111180

History | View | Annotate | Download (21.8 kB)

# Date Author Comment
312fd5f2 02/11/2013 04:13 pm Markus Armbruster

error: Strip trailing '\n' from error string arguments (again)

Commit 6daf194d and be62a2eb got rid of a bunch, but they keep coming
back. Tracked down with this Coccinelle semantic patch:

r
expression err, eno, cls, fmt;
position p;
@@
(...
b09995ae 02/01/2013 11:53 pm Paolo Bonzini

qdev: drop extra references at creation time

qdev_free and qbus_free have to do unparent+unref, because nobody else
drops the initial reference (the one included by object_initialize)
before them.

For device_init_func and do_device_add, this is trivially correct,...

9d127820 02/01/2013 11:53 pm Paolo Bonzini

qdev: add reference count to a device for the BusChild

Each device has a reference through the BusChild. This reference
was not accounted for, add it now.

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

6853d27a 02/01/2013 11:53 pm Paolo Bonzini

qdev: move deletion of children from finalize to unparent

A device will never be finalized as long as it has a reference from
other devices that sit on its buses. To ensure that the references
go away, deassociate a bus from its children in the unparent callback...

06f7f2bb 02/01/2013 11:53 pm Paolo Bonzini

qdev: move unrealization of devices from finalize to unparent

Similarly, a bus holds a reference back to the device, and this will
prevent the device from going away as soon as this reference is counted
properly. To avoid this, move the unrealization of devices to the...

62d7ba66 02/01/2013 11:53 pm Paolo Bonzini

qdev: add reference for the bus while it is referred to by the DeviceState

Now that the unparent callbacks are complete, we can correctly account
more missing references.

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

dc7389b7 02/01/2013 11:53 pm Paolo Bonzini

qdev: inline object_delete into qbus_free/qdev_free

We want object_delete to disappear, and we will do this one class at a
time. Inline it for the qdev case, which we will tackle first.

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

013e1182 02/01/2013 11:53 pm Paolo Bonzini

qdev: remove duplication between qbus_create and qbus_create_inplace

Move the common part to qbus_realize.

Acked-by: Andreas Färber <>
Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

39355c38 02/01/2013 11:53 pm Paolo Bonzini

qdev: change first argument of qbus_create_inplace to void *

Make it clear that no BUS macro is needed in the callers (in fact it
wouldn't work because the object has not been initialized yet with the
right class).

Suggested-by: Andreas Faerber <>...

249d4172 01/16/2013 02:27 am Andreas Färber

qdev: Prepare "realized" property

Introduce the QOM realizefn suggested by Anthony.
Detailed documentation is supplied in the qdev header.

For now this implements a default DeviceClass::realize callback that
just wraps DeviceClass::init, which it deprecates....

7983c8a3 01/16/2013 02:26 am Andreas Färber

qdev: Fold state enum into bool realized

Whether the device was initialized or not is QOM-level information and
currently unused. Drop it from device. This leaves the boolean state of
whether or not DeviceClass::init was called or not, a.k.a. "realized"....

d0508c36 01/10/2013 11:22 pm Paolo Bonzini

qdev: add qbus_reset_all

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

8c43a6f0 01/10/2013 11:11 pm Andreas Färber

Make all static TypeInfos const

Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register all
types natively through QEMU Object Model), TypeInfo as used in
the common, non-iterative pattern is no longer amended with information
and should therefore be const....

5d5b24d0 01/08/2013 10:03 pm Andreas Färber

qdev: Don't assume existence of parent bus on unparenting

Commit 667d22d1ae59da46b4c1fbd094ca61145f19b8c3 (qdev: move bus removal
to object_unparent) made the assumption that at unparenting time
parent_bus is not NULL. This assumption is unjustified since...

501a7ce7 12/23/2012 01:40 am Andreas Färber

Merge branch 'master' of git://git.qemu.org/qemu into qom-cpu

Adapt header include paths.

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

04a2d61e 12/19/2012 03:09 pm Eduardo Habkost

qdev: Coding style fixes

Add missing braces and break lines larger than 80 chars.

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

a404b612 12/19/2012 03:09 pm Eduardo Habkost

qdev-properties.c: Separate core from the code used only by qemu-system-*

This separates the qdev properties code in two parts:
- qdev-properties.c, that contains most of the qdev properties code;
- qdev-properties-system.c for code specific for qemu-system-*,...

9c17d615 12/19/2012 09:32 am Paolo Bonzini

softmmu: move include files to include/sysemu/

Signed-off-by: Paolo Bonzini <>

7b1b5d19 12/19/2012 09:31 am Paolo Bonzini

qapi: move include files to include/qobject/

Signed-off-by: Paolo Bonzini <>

1422e32d 12/19/2012 09:31 am Paolo Bonzini

net: reorganize headers

Move public headers to include/net, and leave private headers in net/.
Put the virtio headers in include/net/tap.h, removing the multiple copies
that existed. Leave include/net/tap.h as the interface for NICs, and
net/tap_int.h as the interface for OS-specific parts of the tap backend....

23e3fbec 12/06/2012 10:17 am Eduardo Habkost

qdev: qdev_create(): use error_report() instead of hw_error()

hw_error() is specific for fatal hardware emulation errors, not for
internal errors related to the qdev object/class abstraction or object
initialization.

Replace it with an error_report() call, followed by abort()....

667d22d1 11/26/2012 09:41 pm Paolo Bonzini

qdev: move bus removal to object_unparent

Add an ObjectClass method that is done at object_unparent time. It
should remove any backlinks to the object in the composition tree,
so that object_delete will be able to drop the last reference and
free the object....

64b625f4 11/26/2012 09:41 pm Paolo Bonzini

qdev: simplify (de)allocation of buses

All conditional deallocation can now be done with object_delete.
Remove the @qom_allocated and @glib_allocated fields; replace the latter
with a direct assignment of the @free function pointer.

Signed-off-by: Paolo Bonzini <>...

074a86fc 11/15/2012 03:18 am Anthony Liguori

qdev: Split up header so it can be used in cpu.h

Header file dependency is a frickin' nightmare right now. cpu.h tends
to get included in our 'include everything' header files but qdev also
needs to include those headers mainly for qdev-properties since it knows...

1e5b31e6 10/10/2012 04:13 am Peter A. G. Crosthwaite

qdev: allow multiple qdev_init_gpio_in() calls

Allow multiple qdev_init_gpio_in() calls for the one device. The first call will
define GPIOs 0-N-1, the next GPIOs N- ... . Allows different GPIOs to be handled
with different handlers. Needed when two levels of the QOM class heirachy both...

048d3612 10/06/2012 07:54 pm Aurelien Jarno

Merge branch 'trivial-patches' of git://github.com/stefanha/qemu

  • 'trivial-patches' of git://github.com/stefanha/qemu:
    versatilepb: Use symbolic indices for ARM PIC
    qdev: kill bogus comment
    qemu-barrier: Fix compiler version check for future gcc versions...
36b7f27d 10/06/2012 07:48 pm Aurelien Jarno

vl.c: convert *vga_enabled functions to QOM

And get rid of qdev_exists().

Signed-off-by: Aurelien Jarno <>

c36b7de6 10/05/2012 04:49 pm Eduardo Habkost

qdev: kill bogus comment

When the DeviceInfo code was removed, the comment describing
qdev_subclass_init() was left in the code by mistake. Remove it.

Cc:
Signed-off-by: Eduardo Habkost <>
Signed-off-by: Stefan Hajnoczi <>

a5cf8262 10/05/2012 03:58 pm Jim Meyering

scsi, pci, qdev, isa-bus, sysbus: don't let *_get_fw_dev_path return NULL

Use g_strdup rather than strdup, because the sole caller
(qdev_get_fw_dev_path_helper) assumes it gets non-NULL, and dereferences
it. Besides, in that caller, the allocated buffer is already freed with...

da5a44e8 08/24/2012 04:19 am Paolo Bonzini

qom: object_delete should unparent the object first

object_deinit is only called when the reference count goes to zero,
and yet tries to do an object_unparent. Now, object_unparent
either does nothing or it will decrease the reference count.
Because we know the reference count is zero, the object_unparent...

a005d073 08/01/2012 02:56 pm Stefan Hajnoczi

net: Remove VLANState

VLANState is no longer used and can be removed.

Signed-off-by: Stefan Hajnoczi <>
Signed-off-by: Zhi Yong Wu <>
Reviewed-by: Laszlo Ersek <>

7de3abe5 06/28/2012 12:26 am Anthony Liguori

qdev: fix use-after-free in the error path of qdev_init_nofail

From Markus:

Before:

$ qemu-system-x86_64 -display none -drive if=ide
qemu-system-x86_64: Device needs media, but drive is empty
qemu-system-x86_64: Initialization of device ide-hd failed...
8aca5215 06/18/2012 06:35 pm Anthony Liguori

Merge remote-tracking branch 'afaerber-or/qom-next-2' into staging

  • afaerber-or/qom-next-2: (22 commits)
    qom: Push error reporting to object_property_find()
    qdev: Remove qdev_prop_exists()
    qbus: Initialize in standard way
    qbus: Make child devices links...
fdae245f 06/18/2012 04:14 pm Paolo Bonzini

qdev: Remove qdev_prop_set_defaults

Instead, qdev_property_add_static can set the default.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Anthony Liguori <>
Signed-off-by: Andreas Färber <>

09e5ab63 06/18/2012 04:14 pm Anthony Liguori

qdev: Use wrapper for qdev_get_path

This makes it easier to remove it from BusInfo.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Paolo Bonzini <>
[AF: Drop now unnecessary NULL initialization in scsibus_get_dev_path()]...

8185d216 06/18/2012 04:14 pm Paolo Bonzini

qdev: Move SysBus initialization to sysbus.c

TYPE_SYSTEM_BUS will be local to hw/sysbus.c, so move existing references
to main_system_bus and system_bus_info there.

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

0d936928 06/18/2012 04:14 pm Anthony Liguori

qdev: Convert busses to QEMU Object Model

This is far less interesting than it sounds. We simply add an Object to each
BusState and then register the types appropriately. Most of the interesting
refactoring will follow in the next patches.

Since we're changing fundamental type names (BusInfo -> BusClass), it all needs...

f968fc68 06/18/2012 04:14 pm Anthony Liguori

qdev: Connect busses with their parent devices

This makes SysBus part of the root hierarchy and all busses children of
their respective parent DeviceState.

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

0866aca1 06/18/2012 04:14 pm Anthony Liguori

qbus: Make child devices links

Make qbus children show up as link<> properties. There is no stable
addressing for qbus children so we use an unstable naming convention.

This is okay in QOM though because the composition name is expected to
be what's stable....

ac7d1ba6 06/18/2012 04:14 pm Anthony Liguori

qbus: Initialize in standard way

Move code to an initfn and finalizer.
Replace do_qbus_create_inplace() with qbus_realize().

Signed-off-by: Anthony Liguori <>
Signed-off-by: Paolo Bonzini <>
Signed-off-by: Andreas Färber <>

8cb6789a 06/18/2012 04:14 pm Paolo Bonzini

qdev: Remove qdev_prop_exists()

Can be replaced everywhere with object_property_find().

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

89bfe000 06/18/2012 04:14 pm Paolo Bonzini

qom: Push error reporting to object_property_find()

Avoids duplicated error_set().

Signed-off-by: Paolo Bonzini <>
[AF: Also drop error_set() in object_property_del().]
Signed-off-by: Andreas Färber <>

2f262e06 06/18/2012 04:14 pm Paolo Bonzini

qdev: Push "type" property up to Object

Now that Object is a type, add an instance_init function and push
the "type" property from qdev to there.

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

bce54474 06/18/2012 04:14 pm Paolo Bonzini

qdev: Move bus properties to abstract superclasses

In qdev, each bus in practice identified an abstract superclass, but
this was mostly hidden. In QOM, instead, these abstract classes are
explicit so we can move bus properties there.

All bus property walks are removed, and all device property walks...

4b3582b0 06/18/2012 04:14 pm Paolo Bonzini

qdev: Clean up global properties

Now that global properties do not depend on buses anymore, set
them directly in the device instance_init function.

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

266ca11a 06/11/2012 10:55 pm Jason Baron

qdev: release parent properties on dc->init failure

While looking into hot-plugging bridges, I can create a qemu segfault via:

$ device_add pci-bridge

Bridge chassis not specified. Each bridge is required to be assigned a unique chassis id > 0. **
ERROR:qom/object.c:389:object_delete: assertion failed: (obj->ref == 0)...

f3be016d 05/12/2012 03:19 pm Anthony Liguori

qdev: Fix adding of ptr properties

ptr properties have neither a get/set or a print/parse which means that when
they're added they aren't treated as static or legacy properties.

Just assume properties like this are legacy properties and treat them as such....

dfe47e70 04/24/2012 05:50 pm Andreas Färber

qom: Refine container_get() to allow using a custom root

Specify the root to search from as argument. This avoids hardcoding
"/machine" in some places and makes it more flexible.

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

56f9107e 04/09/2012 08:35 pm Luiz Capitulino

qdev: qdev_unplug(): use error_set()

It currently uses qerror_report(), but next commit will convert
the drive_del command to the QAPI and this requires using
error_set().

One particularity of qerror_report() is that it knows when it's
running on monitor context or command-line context and prints the...

da57febf 04/02/2012 11:04 pm Paolo Bonzini

qdev: give all devices a canonical path

A strong limitation of QOM right now is that unconverted ports
(e.g. all...) do not give a canonical path to devices that are
part of the board. This in turn makes it impossible to replace
PROP_PTR with a QOM link for example....

f05f6b4a 04/02/2012 11:04 pm Paolo Bonzini

qdev: put all devices under /machine

Avoid cluttering too much the QOM root.

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

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)....