Statistics
| Branch: | Revision:

root / hw / qdev.c @ cedd91d2

History | View | Annotate | Download (16.8 kB)

# Date Author Comment
286c2321 08/28/2009 04:43 am Gerd Hoffmann

qdev error logging

Use the new qemu_error() function in qdev.c

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

81a322d4 08/28/2009 04:43 am Gerd Hoffmann

qdev: add return value to init() callbacks.

Sorry folks, but it has to be. One more of these invasive qdev patches.

We have a serious design bug in the qdev interface: device init
callbacks can't signal failure because the init() callback has no
return value. This patch fixes it....

22f2e344 08/10/2009 09:11 pm Gerd Hoffmann

fix qdev_print_devinfo()

snprintf returns number of bytes needed for the output, not the number
of bytes actually written. Thus the math is wrong ...

Spotted by Markus Armbruster.

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

f6c64e0e 08/10/2009 09:11 pm Gerd Hoffmann

rename "info qdrv" to "info qdm"

As requested by avi: driver != device model.

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

f31d07d1 08/10/2009 09:05 pm Gerd Hoffmann

QemuOpts: switch over -device.

Make -device switch use the QemuOpts framework.
Everything should continue to work like it did before.

New: "-set device.$id.$property=$value" works.

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

bb87ece5 08/10/2009 09:05 pm Christoph Egger

tolower -> qemu_tolower

Use qemu_tolower() instead of tolower().
Fixes warning on NetBSD.

Signed-off-by: Christoph Egger <>
Signed-off-by: Anthony Liguori <>
Message-Id:

1b524b04 07/30/2009 05:50 pm Gerd Hoffmann

qdev: factor out qdev_print_devinfo.

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

9316d30f 07/30/2009 05:50 pm Gerd Hoffmann

qdev/core: add monitor command to list all drivers

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

751c6a17 07/27/2009 10:08 pm Gerd Hoffmann

kill drives_table

First step cleaning up the drives handling. This one does nothing but
removing drives_table[], still it became seriously big.

drive_get_index() is gone and is replaced by drives_get() which hands
out DriveInfo pointers instead of a table index. This needs adaption in...

d271de9f 07/27/2009 04:39 pm Gerd Hoffmann

qdev: create default bus names.

Create a default bus name if none is passed to qbus_create().

If the parent device has DeviceState->id set it will be used to create
the bus name,. i.e. -device lsi,id=foo will give you a scsi bus named
"foo.0".

If there is no id BusInfo->name (lowercased) will be used instead, i.e....

8ffb1bcf 07/27/2009 04:39 pm Gerd Hoffmann

qdev: bus walker + qdev_device_add()

This patch implements a parser and qdev tree walker for bus paths and
adds qdev_device_add on top of this.

A bus path can be:
(1) full path, i.e. /i440FX-pcihost/pci.0/lsi/scsi.0
(2) bus name, i.e. "scsi.0". Best used together with id= to make...

a9ff9df1 07/17/2009 02:18 pm Blue Swirl

Suppress a Sparse warning

Move the export to a file used by both qdev.c and sysbus.c.

Signed-off-by: Blue Swirl <>

ccb63de3 07/17/2009 01:28 am Gerd Hoffmann

qdev: add user-specified identifier to devices.

Add id field to DeviceState. Make "info qtree" print it.

This helps users and management apps identifying devices in monitor
output, which is especially useful with otherwise identical devices
such as two virtio disks....

81ebb98b 07/17/2009 01:28 am Gerd Hoffmann

qdev: factor out driver search to qdev_find_info()

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

b6b61144 07/17/2009 01:28 am Gerd Hoffmann

qdev/compat: compat property infrastructure.

This add support for switching devices into a compatibility mode
using device properties. Machine types can have a list of properties
for specific devices attached to allow the easy creation of machine
types compatible to older qemu versions....

3320e56e 07/17/2009 01:28 am Gerd Hoffmann

qdev: add no_user, alias and desc

no_user: prevent users from adding certain devices.
desc: description of the device.
alias: to allow user friendly shortcuts on the command line, i.e.
-device usbmouse instead of -device "QEMU USB Mouse" or
-device lsi instead of -device lsi53c895a...

ee6847d1 07/17/2009 01:28 am Gerd Hoffmann

qdev: rework device properties.

This patch is a major overhaul of the device properties. The properties
are saved directly in the device state struct now, the linked list of
property values is gone.

Advantages: * We don't have to maintain the list with the property values....

8167ee88 07/16/2009 11:47 pm Blue Swirl

Update to a hopefully more future proof FSF address

Signed-off-by: Blue Swirl <>

ae50b274 07/10/2009 12:58 am Mark McLoughlin

Don't leak VLANClientState on PCI hot remove

destroy_nic() requires that NICInfo::private by a PCIDevice pointer,
but then goes on to require that the same pointer matches
VLANClientState::opaque.

That is no longer the case for virtio-net since qdev and wasn't...

10c4c98a 07/09/2009 03:07 pm Gerd Hoffmann

qdev: replace bus_type enum with bus_info struct.

BusInfo is filled with name and size (pretty much like I did for
DeviceInfo as well). There is also a function pointer to print
bus-specific device information to the monitor. sysbus is hooked
up there, I've also added a print function for PCI....

042f84d0 07/09/2009 03:07 pm Gerd Hoffmann

qdev: remove DeviceType

The only purpose DeviceType serves is creating a linked list of
DeviceInfo structs. This removes DeviceType and add a next field to
DeviceInfo instead, so the DeviceInfo structs can be changed that way.
Elimitates a pointless extra level of indirection....

074f2fff 06/11/2009 03:47 pm Gerd Hoffmann

qdev: move name+size into DeviceInfo (v2)

Rationale: move device information from code to data structures.

v2: Adapt the drivers missed in the first version.

Signed-off-by: Gerd Hoffmann <>

f8e76fbf 06/11/2009 02:08 am Anthony Liguori

Merge branch 'net-queue'

  • net-queue: (28 commits)
    virtio-net: Increase filter and control limits
    virtio-net: Add new RX filter controls
    virtio-net: MAC filter optimization
    virtio-net: Fix MAC filter overflow handling
    virtio-net: reorganize receive_filter()...
b9aaf7f8 06/09/2009 09:38 pm Blue Swirl

Fix Sparse warning

Signed-off-by: Blue Swirl <>

463af534 06/09/2009 01:38 pm Mark McLoughlin

net: add fd_readv() handler to qemu_new_vlan_client() args

This, apparently, is the style we prefer - all VLANClientState
should be an argument to qemu_new_vlan_client().

Signed-off-by: Mark McLoughlin <>

cda9046b 06/09/2009 01:38 pm Mark McLoughlin

net: re-name vc->fd_read() to vc->receive()

VLANClientState's fd_read() handler doesn't read from file
descriptors, it adds a buffer to the client's receive queue.

Re-name the handlers to make things a little less confusing.

Signed-off-by: Mark McLoughlin <>

98ba2632 06/08/2009 08:36 pm Gerd Hoffmann

qdev: c99 initilaizers for bus_type_names

Signed-off-by: Gerd Hoffmann <>

db241f40 06/06/2009 04:49 am Paul Brook

Fix typo

Signed-off-by: Paul Brook <>

cae4956e 06/05/2009 05:53 pm Gerd Hoffmann

qdev: add monitor command to dump the tree.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Paul Brook <>

1431b6a1 06/05/2009 05:52 pm Paul Brook

Record device property types

Record device property types, and provide a list of properties at device
registration time.

Add a "device" property type that holds a reference to annother device.

Signed-off-by: Paul Brook <>

aca312af 06/04/2009 01:24 pm Gerd Hoffmann

qdev: kill DeviceState->name

is redundant with DeviceState->type->name

Signed-off-by: Gerd Hoffmann <>

067a3ddc 05/26/2009 04:56 pm Paul Brook

Remove qdev irq sink handling

We have both IRQ sinks and GPIO inputs. These are in principle exactly
the same thing, so remove the former.

Signed-off-by: Paul Brook <>

02e2da45 05/23/2009 02:13 am Paul Brook

Add common BusState

Implement and use a common device bus state. The main side-effect is
that creating a bus and attaching it to a parent device are no longer
separate operations. For legacy code we allow a NULL parent, but that
should go away eventually....

89a740e1 05/17/2009 04:55 pm Paul Brook

Consistently use uint64_t for int properties

I apparently failed to do this properly on the first attempt.

Signed-off-by: Paul Brook <>

6f68ecb2 05/15/2009 12:35 am Paul Brook

qdev scsi bus infrastructure

Signed-off-by: Paul Brook <>

9d07d757 05/15/2009 12:35 am Paul Brook

PCI network qdev conversion

Signed-off-by: Paul Brook <>

aae9460e 05/15/2009 12:35 am Paul Brook

Basic qdev infrastructure.

Signed-off-by: Paul Brook <>

4d6ae674 05/15/2009 12:35 am Paul Brook

qdev child bus support

Signed-off-by: Paul Brook <>