Statistics
| Branch: | Revision:

root / hw / qdev.c @ 71193433

History | View | Annotate | Download (20.4 kB)

# Date Author Comment
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)....

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