Statistics
| Branch: | Revision:

root / hw / qdev.c @ 3a9d8549

History | View | Annotate | Download (24.2 kB)

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

75422b0d 03/08/2010 07:30 pm Amit Shah

qdev: Add a DEV_NVECTORS_UNSPECIFIED enum for unspecified nr of MSI vectors

net.c used a constant to signify no MSI vectors were specified. Extend
that to all qdev devices.

Signed-off-by: Amit Shah <>
Reported-by: "Michael S. Tsirkin" <>...

0f853a38 02/19/2010 11:53 pm Kevin Wolf

qdev: Free opts on failed do_device_add

If the device can't be created, don't leak the QemuOpts and release the id of
the device that should have been added by the failed device_add.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Anthony Liguori <>

ff952ba2 02/03/2010 08:39 pm Markus Armbruster

qdev: Fix exit code for -device ?

Help was shoehorned into device creation, qdev_device_add(). Since
help doesn't create a device, it returns NULL, which looks to callers
just like failed device creation. Monitor handler do_device_add()
doesn't care, but main() exits unsuccessfully....

08350cf0 02/03/2010 08:39 pm Markus Armbruster

qdev: Add help for device properties

Option "-device DRIVER,?" and monitor command "device_add DRIVER,?"
print the supported properties instead of creating a device. The
former also terminates the program.

This is commit 2ba6edf0 (just reverted) done right....

117f8eb8 02/03/2010 08:39 pm Markus Armbruster

qdev: Add rudimentary help for property value

This provides the same information as reverted commit 2ba6edf0. Not
much, just better than nothing.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

98b19252 01/20/2010 04:25 pm Amit Shah

virtio-console: qdev conversion, new virtio-serial-bus

This commit converts the virtio-console device to create a new
virtio-serial bus that can host console and generic serial ports. The
file hosting this code is now called virtio-serial-bus.c.

The virtio console is now a very simple qdev device that sits on the...

458fb679 12/12/2009 03:59 pm Gerd Hoffmann

qdev: make compat stuff more generic

This patch renames the compat properties into global properties and
makes them more generic. The compatibility stuff is only one of
multiple possible users now.

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

70cca6d8 12/03/2009 06:04 pm Juan Quintela

qdev: enable vmstate_unregister() support

Now vmstate_unregister have the right type

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

3ced9f7a 12/03/2009 05:41 pm Luiz Capitulino

qdev: Use QError for 'device not found' error

Please, note that we will lose the "Try -device '?' for a list"
hint as it's qdev specific.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

593831de 11/12/2009 07:23 pm Amit Shah

qdev: Check if unplug handler exists before calling it

A bus may have hotplugging enabled but not have the 'unplug'
callback defined, which would lead to a crash on trying to
unplug a device on the bus.

Fix by introducing an assert to check if the callback is valid....

0958b4cc 10/30/2009 03:39 pm Gerd Hoffmann

usb core: use qdev for -usbdevice

This patchs adds infrastructure to handle -usbdevice via qdev callbacks.
USBDeviceInfo gets a name field (for the -usbdevice driver name) and a
callback for -usbdevice parameter parsing.

The new usbdevice_create() function walks the qdev driver list and looks...

1cc33683 10/27/2009 07:28 pm Gerd Hoffmann

zap DeviceState->nd

No users left.
Also cleanup obsolete helper functions.

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

97b15621 10/27/2009 07:28 pm Gerd Hoffmann

virtio: use qdev properties for configuration.

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

ed16ab5a 10/27/2009 07:28 pm Gerd Hoffmann

qdev/net: common nic property bits

Add a new type for properties common to all nics.
Add helper functions and macros to deal with it.

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

283c7c63 10/15/2009 05:32 pm Mark McLoughlin

net: allow NICs to be connected to netdevs

Introduce a 'peer' member to VLANClientState as an alternative
to a vlan. The idea being that packets are transfered directly
from peer clients rather than going through a vlan.

Patchworks-ID: 35516
Signed-off-by: Mark McLoughlin <>...

5c17ca25 10/07/2009 04:54 pm Markus Armbruster

Clean up test for qdev_init() failure

Some callers test for != 0, some for < 0. Normalize to < 0.

Patchworks-ID: 35171
Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

e23a1b33 10/07/2009 04:54 pm Markus Armbruster

New qdev_init_nofail()

Like qdev_init(), but terminate program via hw_error() instead of
returning an error value.

Use it instead of qdev_init() where terminating the program on failure
is okay, either because it's during machine construction, or because...

18cfeb52 10/07/2009 04:54 pm Markus Armbruster

Make qdev_init() destroy the device on failure

Before, every caller had to do this. Only two actually did.

Patchworks-ID: 35170
Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

cdaed7c7 10/06/2009 10:46 pm Gerd Hoffmann

qdev: move comment

Move comment back next to main_system_bus to avoid confusion.

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

c8cd1fcd 10/05/2009 05:32 pm Amit Shah

qdev: show name of device that fails init

When initialising a device fails, show the name of the failing device.

The current behaviour is to silently exit on such errors.

Signed-off-by: Amit Shah <>
Signed-off-by: Anthony Liguori <>

7f23f812 10/05/2009 05:32 pm Michael S. Tsirkin

qemu/qdev: type safety in reset handler

Add type safety to qdev reset handlers, by declaring them as
DeviceState * rather than void *.

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

ef80b466 10/05/2009 05:32 pm Gerd Hoffmann

store a pointer to QemuOpts in DeviceState, release it when zapping a device.

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

131ec1bd 10/05/2009 05:32 pm Gerd Hoffmann

qdev: device free fixups.

Two bug fixes: * When freeing a device we unregister even stuff we didn't register in
the first place because the ->init() callback failed. * When freeing a device with child busses attached, we fail to zap the
child bus (and the devices attached to it)....

d29275f1 10/05/2009 05:32 pm Gerd Hoffmann

Add exit callback to DeviceInfo.

This adds a exit callback for device destruction to DeviceInfo, so
we can hook cleanups into qdev device destruction.

Followup patches will put that into use.

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

3418bd25 10/05/2009 05:32 pm Gerd Hoffmann

qdev hotplug: infrastructure and monitor commands.

Adds device_add and device_del commands. device_add accepts accepts
the same syntax like the -device command line switch. device_del
expects a device id. So you should tag your devices with ids if you...

cd739fb6 10/05/2009 05:32 pm Gerd Hoffmann

allow qdev busses allocations be inplace

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

3df04ac3 09/25/2009 10:57 pm Mark McLoughlin

Fix coding style issue

Replace:

if (-1  foo())

with:

if (foo()  -1)

While this coding style is not in direct contravention of our currently
ratified CODING_STYLE treaty, it could be argued that the Article 3 of
the European Convention on Human Rights (prohibiting torture and "inhuman...

72cf2d4f 09/12/2009 10:36 am Blue Swirl

Fix sys-queue.h conflict for good

Problem: Our file sys-queue.h is a copy of the BSD file, but there are
some additions and it's not entirely compatible. Because of that, there have
been conflicts with system headers on BSD systems. Some hacks have been
introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...

959f733a 09/09/2009 10:57 pm Gerd Hoffmann

qdev: integrate reset

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

391a079e 09/09/2009 10:57 pm Gerd Hoffmann

qdev: integrate vmstate

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

d52affa7 09/09/2009 10:57 pm Gerd Hoffmann

qdev/scsi: add scsi bus support to qdev, convert drivers.

  • Add SCSIBus. * Add SCSIDeviceInfo, move device callbacks here. * add qdev/scsi helper functions. * convert drivers.

Adding scsi disks via -device works now, i.e. you can do:

-drive id=sda,if=none,......
75570088 09/09/2009 10:55 pm Gerd Hoffmann

qdev: add error message to qdev_device_add().

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

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

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