Statistics
| Branch: | Revision:

root / hw @ ef816d83

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

01985dcf 10/05/2009 05:32 pm Gerd Hoffmann

Implement scsi device destruction

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

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

pci: use qdev for device destruction.

pci_unregister_device is static now and hooked into Devicestate->exit.
qdev_free(pci_device) works now.

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

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

pci: move unregister from PCIDevice to PCIDeviceInfo

One more cleanup while being at it ;)

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

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

usb: hook unplug into qdev, cleanups + fixes.

Hook into DeviceInfo->exit().

handle_destroy() must not free the state struct, this is handled
by the new usb_qdev_exit() function now.

qdev_free(usb_device) works now.

Fix usb hub to qdev_free() all connected devices on unplug....

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

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

usb: hotplug windup

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

1f850f10 10/05/2009 05:32 pm Gerd Hoffmann

switch ide bus to inplace allocation.

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

21eea4b3 10/05/2009 05:32 pm Gerd Hoffmann

support inplace allocation for pci bus, split irq init.

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

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

convert pci bridge to qdev

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

7cd9eee0 10/05/2009 05:32 pm Gerd Hoffmann

piix_pci: kill PIIX3IrqState

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

021f0674 10/05/2009 05:32 pm Gerd Hoffmann

parallel: convert isa to qdev

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

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

switch scsi bus to inplace allocation.

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

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

switch usb bus to inplace allocation.

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

6875204c 10/05/2009 05:32 pm Jan Kiszka

Enable host-clock-based RTC

Switch RTC emulations to the new host_clock instead of vm_clock by
default. This has the advantage that the emulated RTC will follow
automatically the host time while it might be tuned via NTP. vm_clock
can still be selected by passing '-rtc clock=vm' on the command line....

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

d5b61ddd 10/05/2009 05:32 pm Jan Kiszka

musicpal: Add VMState support

Register all relevant fields of Musicpal device states with the VMState
framework. This involves a few type changes of state variables.

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

0148fde5 10/05/2009 05:32 pm Luiz Capitulino

Fix exit on 'pci_add' Monitor command

If the user issues one of the following commands to the Monitor:

pci_add pci_addr=auto nic model=None
pci_add pci_addr=auto nic model=?

QEMU will exit, because the function used to perform sanity
checks (qemu_check_nic_model_list()) exits on error....

f11f6a5f 10/05/2009 05:32 pm Juan Quintela

vmstate: Add suppot for field_exist() test

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

2e87c5b9 10/05/2009 05:32 pm Jan Kiszka

musicpal: Catch null TX qeueues

They likely represent invalid queues that should be skipped. We already
do this for RX queues. Wish I had a spec...

Credits go to malc for analyzing the issue and suggesting this fix.

Signed-off-by: Jan Kiszka <>...

708afdf3 10/05/2009 05:32 pm Jan Kiszka

musicpal: Rework GPIO input events

The qdev_gpio conversion of 343ec8e caused come polarity mismatch of key
event pins and left an overly complex solution behind. Take this chance
and refactor the GPIO input system of the Musicpal, moving it closer to
reality:...

243cd13c 10/05/2009 05:32 pm Jan Kiszka

musicpal: Clean up typecasts

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

49fedd0d 10/05/2009 05:32 pm Jan Kiszka

musicpal: Coding style fixes

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

30624c92 10/05/2009 05:32 pm Jan Kiszka

musicpal: True reset support for GPIO

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

267c4840 10/05/2009 05:32 pm Jan Kiszka

musicpal: True reset support for audio device

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

c88d6bde 10/05/2009 05:32 pm Jan Kiszka

musicpal: Make PIT emulation more robust

Stop the periodic timers of the PIT on reset, disabling via the control
register and invalid parameters.

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

f89a8e4e 10/05/2009 05:32 pm Juan Quintela

Add *TL functions to vmstate

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

f0495f56 10/05/2009 05:32 pm Juan Quintela

vmstate: port twl92230 device

Just don't look. struct tm members are ints' and they are sent as uint16_t.
VMState code complains as it should. Have to create hacky int32_as_uint16
type. Don't ever think about copying it

Signed-off-by: Juan Quintela <>...

19df438b 10/05/2009 05:32 pm Juan Quintela

vmstate: add support for arrays of pointers

We need this to send arrays of timers

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

e69f0602 10/05/2009 05:32 pm Juan Quintela

lm832x: make fields to have the same types that they are saved/loaded

They were saved as uint8_t already. To make things simpler, I just
reg == -1 used to indicate an error, I create LM832x_GENERAL_ERROR
with vale 0xff to represet it

Signed-off-by: Juan Quintela <>...

aa1e3b28 10/05/2009 05:32 pm Juan Quintela

vmstate: port lm832x device

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

6b0e766f 10/05/2009 05:32 pm Juan Quintela

vmstate: remove i2c_slave_load/save

All its users moved to vmstate

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

b6bd0bdc 10/05/2009 05:32 pm Juan Quintela

vmstate: add uint8 array

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

1894839f 10/05/2009 05:32 pm Juan Quintela

vmstate: create VMSTATE_I2C_SLAVE

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

c1d803b3 10/05/2009 05:32 pm Juan Quintela

vmstate: port wm8750 device

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

7cb45faa 10/05/2009 05:32 pm Juan Quintela

vmstate: port max7310 device

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

840e9cef 10/05/2009 05:32 pm Juan Quintela

vmstate: create VMSTATE_STRUCT_POINTER

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

0211364d 10/05/2009 05:32 pm Juan Quintela

vmstate: port pxa2xx_i2c device

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

aed7278d 10/05/2009 05:32 pm Juan Quintela

vmstate: port ssd0303 device

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

289070c7 10/05/2009 05:32 pm Juan Quintela

vmstate: create VMSTATE_INT16_ARRAY

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

6f3a7798 10/05/2009 05:32 pm Juan Quintela

tmp105: change len and alorm to uint8_t

They were using only with very small integers, and they are sent/read as
bytes. They can't become negative as far as I can see

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

371a4468 10/05/2009 05:32 pm Juan Quintela

vmstate: port tmp105 device

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

b53d44e5 10/05/2009 05:32 pm Juan Quintela

twl92230: change pwrbtn_state to uint8_t

its value is always the level of an interrupt, 0 or 1

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

d4bfa4d7 10/05/2009 05:32 pm Juan Quintela

vmstate: remove const from pre_save() functions

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

db596c53 10/05/2009 05:32 pm Juan Quintela

vmstate: remove ps2_kbd_load_old()

Now that we have version_id on post_load() we don't need the old load
function

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

6680f01c 10/05/2009 05:32 pm Juan Quintela

vmstate: Add support for sending partial arrays

This one is needed for changees happening on fdc. It allows you to send
arrays of structs whose size we want to send it is another field with type
uint8_t. (If you have been able to read the whole sentence without...

c7cc172d 10/05/2009 05:32 pm Juan Quintela

qdev: Add support for uint8_t

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

5b7f5327 10/05/2009 05:32 pm Juan Quintela

i2c: addresses are load/save as uint8_t values, change types to reflect this

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

8d0eb050 10/05/2009 05:32 pm Juan Quintela

vmstate: port i2c_bus device

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

bcbe8068 10/05/2009 05:32 pm Juan Quintela

vmstate: port i2c_slave device

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

f22f5b07 10/05/2009 05:32 pm Juan Quintela

cirrus_vga: also assign gr0/1 when writting shadow_gr0/1

This is a regression/bug caused by previous vga_cleanup. This fixes
Ubuntu installer reported by:
Pierre Riteau

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

50af3246 10/05/2009 05:32 pm Juan Quintela

vga: move back dirty_log functions to vga.c

They are needed there on qemu-kvm.

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

84e2e3eb 10/05/2009 05:32 pm Juan Quintela

vmstate: remove const for put operations

In a later patch, we introduce pre_save() and post_save() functions.
The whole point of that operation is to change things in the state.
Without this patch, we have to remove the const qualifier in each
use with a cast...

e59fb374 10/05/2009 05:32 pm Juan Quintela

vmstate: add version_id argument to post_load

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

4e3db917 10/05/2009 05:29 pm Aurelien Jarno

Revert "eepro100: Remove unused device status entries"

This reverts commit 3031efabd0bb744126a53f32c5426580b5d394d5.

c4c270e2 10/04/2009 03:59 pm Stefan Weil

eepro100: Add more i825xx devices

The new devices added here are still not functional -
partially because some patches are still missing,
partially because I cannot test them. Nevertheless
they belong to the same family and will be supported
by this driver some day....

3031efab 10/04/2009 03:54 pm Stefan Weil

eepro100: Remove unused device status entries

A lot of entries are unused (they were added by copy + paste
from other drivers during development of eepro100.c).

Removing them from nic_save, nic_load makes any
old saved status incompatible, so a new version...

317b7e67 10/04/2009 02:24 pm Michael S. Tsirkin

hw/omap_dma: add matching {} in if 0

MULTI_REQ is never defined, so it doesn't matter much, but since
we have an if statement there, let's add {} to clarify what it
should do if it's uncommented, and indent the code properly.

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

c227f099 10/02/2009 12:12 am Anthony Liguori

Revert "Get rid of _t suffix"

In the very least, a change like this requires discussion on the list.

The naming convention is goofy and it causes a massive merge problem. Something
like this must be presented on the list first so people can provide input...

99a0949b 10/01/2009 09:45 pm malc

Get rid of _t suffix

Some not so obvious bits, slirp and Xen were left alone for the time
being.

Signed-off-by: malc <>

084bd071 09/30/2009 09:56 pm Michael S. Tsirkin

escc: fix another coding style nit

Fix another place with =- to be "= ".
to avoid confusion with old-style "
="
(which we also have, and needs to be fixed).

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

a0d98a71 09/30/2009 09:45 pm Michael S. Tsirkin

escc: fix coding style nit

Put space between = and - assigning a negative number
to avoid confusion with old-style "-="
(which we also have, and needs to be fixed).

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

f90554ad 09/30/2009 09:45 pm Michael S. Tsirkin

omap_dma: fix unbalanced { in commented out code

Fix unbalanced {} in commented out code.

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

bdd7e1bc 09/30/2009 09:45 pm Michael S. Tsirkin

twl92230: fix old style increment/decrement usage

Modern compilers do not parse "=-" as decrement:
you must use "-=" for that. Same for "=+"/"+=".

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

067d01de 09/27/2009 12:48 am Stefan Weil

eepro100: Fix format strings in debug messages

size_t arguments need %zu instead of %d.

Signed-off-by: Stefan Weil <>
Signed-off-by: Aurelien Jarno <>

41cbc23c 09/27/2009 12:48 am Stefan Weil

eepro100: Replace sprintf by snprintf

Signed-off-by: Stefan Weil <>
Signed-off-by: Aurelien Jarno <>

fd9ae2ec 09/27/2009 12:48 am Stefan Weil

eepro100: Remove unused code

Signed-off-by: Stefan Weil <>
Signed-off-by: Aurelien Jarno <>

aac443e6 09/27/2009 12:48 am Stefan Weil

eepro100: Enhanced logging and comments

  • Use TRACE macro to allow different logging flags.
  • Add new debugging messages and clean existing ones.

Signed-off-by: Stefan Weil <>
Signed-off-by: Aurelien Jarno <>

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

38972938 09/25/2009 10:52 pm Juan Quintela

gcc wants 1st static and then const

Signed-off-by: Juan Quintela <>
Signed-off-by: Blue Swirl <>

86178a57 09/25/2009 10:51 pm Juan Quintela

static and inline should came before the type of the functions

Signed-off-by: Juan Quintela <>
Signed-off-by: Blue Swirl <>

2b321d69 09/25/2009 10:51 pm Juan Quintela

Use proper typedef syntax

Why this ever compiled is a mistery to me.

Signed-off-by: Juan Quintela <>
Signed-off-by: Blue Swirl <>

979ba184 09/25/2009 05:34 pm Stefan Weil

Fix spelling in comment

replace Convery -> Convert

Cc: Paul Brook <>
Signed-off-by: Stefan Weil <>
Signed-off-by: Aurelien Jarno <>

d89c682f 09/25/2009 05:31 pm Stefan Weil

Suppress some variants of English in comments

Replace surpress, supress by suppress.

Signed-off-by: Stefan Weil <>
Signed-off-by: Aurelien Jarno <>

16d55035 09/21/2009 11:21 pm Blue Swirl

Fix Sparse warning about invalid access past the end of 'mode'

Signed-off-by: Blue Swirl <>

284b08f1 09/21/2009 10:50 pm Blue Swirl

Fix Sparse warning about obsolete struct initializer

Signed-off-by: Blue Swirl <>

6f4fc367 09/21/2009 09:39 pm Blue Swirl

Add 'static' to please Sparse

Signed-off-by: Blue Swirl <>

b9d38e95 09/21/2009 09:11 pm Blue Swirl

Fix Sparse warnings about using plain integer as NULL pointer

Signed-off-by: Blue Swirl <>

bd390e64 09/20/2009 07:19 pm Blue Swirl

Compile ne2000 only once

Signed-off-by: Blue Swirl <>

afcea8cb 09/20/2009 07:05 pm Blue Swirl

ioports: remove unused env parameter and compile only once

The CPU state parameter is not used, remove it and adjust callers. Now we
can compile ioport.c once for all targets.

Signed-off-by: Blue Swirl <>

5e520a7d 09/20/2009 06:35 pm Blue Swirl

Compile msix only once

Get page size in device init.

Signed-off-by: Blue Swirl <>

ca20cf32 09/20/2009 05:58 pm Blue Swirl

Compile loader only once

Callers must pass ELF machine, byte swapping and symbol LSB clearing
information to ELF loader. A.out loader needs page size information, pass
that too as a parameter.

Extract prototypes to a separate file. Move loader.[ch] and elf_ops.h under hw....

9801c7b4 09/20/2009 11:02 am Blue Swirl

Compile wdt_i6300esb only once

Signed-off-by: Blue Swirl <>

cdd0935c 09/19/2009 08:59 pm Blue Swirl

PPC: make system bus parent of PCI bus

Signed-off-by: Blue Swirl <>

cc9952f3 09/19/2009 06:44 pm Blue Swirl

ESP: convert to VMState

Signed-off-by: Blue Swirl <>

4f4cc0ef 09/18/2009 01:04 pm malc

audio: use muldiv64 where it makes sense

Signed-off-by: malc <>

2d6ee8e7 09/16/2009 09:58 pm Juergen Lock

qemu serial: lost tx irqs (affecting FreeBSD's new uart(4) driver)

Well one problem seems to be the rx condition,
... if ((s->ier & UART_IER_RDI) && (s->lsr & UART_LSR_DR))
is not enough to trigger an irq, yet still causes the following
conditions not to be checked anymore at all....

e1a0e47f 09/16/2009 01:15 am Aurelien Jarno

escc: fix IRQ routing, broken by 6c319c82223a1766c5d64a20051e5c6ab7b53951

The logic of Zilog makes channel B the first device and channel A the
second one.

Signed-off-by: Aurelien Jarno <>

dea21e97 09/15/2009 11:05 pm Gerd Hoffmann

ide/isa: convert to qdev.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

feef3102 09/15/2009 11:04 pm Gerd Hoffmann

ide/pci: convert to qdev.

With this patch applied ide drives (when attached to a pci adapter) can
be created via -device, like this:

-drive if=none,id=mydisk,file=/path/to/disk.img
-device ide-drive,drive=mydisk,bus=ide.0,unit=0

Note that creating a master on ide1 doesn't work that way. That is a...

9a43dba0 09/15/2009 11:00 pm Gerd Hoffmann

ide/pci: fix indention

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

da4d0419 09/15/2009 10:23 pm Gerd Hoffmann

ide/qdev: add ide bus.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

88804180 09/15/2009 10:23 pm Gerd Hoffmann

split away drive init from ide_init2()

This allows the ide bus being initialized without drives attached
and the drives being attached and initialization later on as
separate step.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

71077c1c 09/15/2009 10:23 pm Gerd Hoffmann

qdev/pci: add pci_create_noinit()

Like pci_create_simple() but doesn't call qdev_init(), so one can
set properties before initializing the device.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

ffabf037 09/15/2009 02:17 am Aurelien Jarno

mips malta: ensure that the serial ports are associated with a device

The serial ports should be present even if associated with a null device
as some firmware wants to initialize them.

Signed-off-by: Aurelien Jarno <>

387f4a5a 09/15/2009 02:16 am Aurelien Jarno

hw/serial: don't create a char device if none is specified

When creating null devices, there is no way to ensure the unicity of
the labels. Bail out with an error message instead.

Signed-off-by: Aurelien Jarno <>

b37fc148 09/14/2009 07:40 pm Gerd Hoffmann

unbreak ppc/prep

Changes: * added isa bus, hooked up to the system bus. Not sure this is correct,
but 'info pci' lists lists no pci-isa bridge in the machine ...). * switches the default cpu to one which actually works.

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

f80237d4 09/14/2009 06:33 pm Blue Swirl

Add an ISA bus version of m48t59

Many thanks to Gerd Hoffmann for finding and fixing a bug in the initial
version.

Signed-off-by: Blue Swirl <>

042eb37a 09/14/2009 12:16 pm Daniel Jacobowitz

Fix Linux task preemption on Versatile board

Recent versions of the Linux kernel will not preempt CPU-intensive
tasks unless the clock used by sched_clock() works. On -M versatilepb
that's the 24MHz timer in the system controller. It's a very simple
timer, so implement it....