Statistics
| Branch: | Revision:

root / hw @ 4f4cc0ef

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

fad8c772 09/14/2009 11:44 am Edgar E. Iglesias

pflash_cfi01: Correct debug build, no functional changes.

Signed-off-by: Edgar E. Iglesias <>

a6124103 09/14/2009 08:21 am malc

ne2000-isa: Do not free memory owned by qdev

Signed-off-by: malc <>

c5ff6d54 09/13/2009 11:32 am Blue Swirl

Sparc64: make system bus parent of PCI bus

Signed-off-by: Blue Swirl <>

075cd324 09/13/2009 11:32 am Blue Swirl

x86: move a declaration to header

Signed-off-by: Blue Swirl <>

675d6f82 09/13/2009 11:32 am Blue Swirl

x86: add 'const'

Signed-off-by: Blue Swirl <>

6a0b9cc9 09/12/2009 06:20 pm Reimar Döffinger

Make string arrays used to convert numbers to strings when DEBUG_EEPRO100 is enabled const.

Signed-off-by: Reimar Döffinger <>
Signed-off-by: Blue Swirl <>

d8becc35 09/12/2009 06:00 pm Jan Kiszka

Fix xen build after sys-queue renaming

Signed-off-by: Jan Kiszka <>
Signed-off-by: Blue Swirl <>

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

435c247a 09/12/2009 01:50 am malc

gus: Do not manually free the state, qdev does it for us

Signed-off-by: malc <>

057fa65c 09/12/2009 01:50 am malc

audio: remove lsbindex/popcount in favour of host-utils's ctz32

Signed-off-by: malc <>

e6cb4d45 09/11/2009 07:10 pm Juan Quintela

vmstate: port hpet device

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

747791f1 09/11/2009 07:10 pm Juan Quintela

vmstate: port serial device

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

7e72abc3 09/11/2009 07:10 pm Juan Quintela

vmstate: port cirrus_vga device

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

bcb58d9a 09/11/2009 07:10 pm Juan Quintela

vmstate: port vmmouse device

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

3c619b59 09/11/2009 07:10 pm Juan Quintela

vmstate: port pckbd device

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

80a04bbe 09/11/2009 07:10 pm Juan Quintela

vmstate: add uint64 array support

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

3e9e9888 09/11/2009 07:10 pm Juan Quintela

vmstate: port ioapic device

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

67f0875e 09/11/2009 07:10 pm Juan Quintela

hpet: it is imposible that qemu_timer field is NULL at this point

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

7b5045c5 09/11/2009 07:10 pm Juan Quintela

vmstate: port dma device

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

7d2edd40 09/11/2009 07:10 pm Juan Quintela

vmstate: port fw_cfg device

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

77eea838 09/11/2009 07:10 pm Juan Quintela

vmstate: port i8259 device

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

80cd83e7 09/11/2009 07:10 pm Juan Quintela

vmstate: add support for uint8_t equal

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

d7a6c270 09/11/2009 07:10 pm Juan Quintela

vmstate: port fdc device

We can't move fifo back to an embeded array because it needs to be aligned

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

632cf073 09/11/2009 07:10 pm Juan Quintela

vmstate: add support for arrays of uint16_t

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

1eb7538b 09/11/2009 07:10 pm Juan Quintela

vmstate: add sensible arguments to vmstate_unregister()

vmsd alone is not enugh, because we can have several structs saved with the same description (vmsd).

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

752ff2fa 09/11/2009 07:10 pm Juan Quintela

vmstate: rename run_after_load() -> post_load()

This naming was used in kvm tree, and is easier to remember

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

fd4d52de 09/11/2009 07:10 pm Juan Quintela

vmstate: Add pre_load() hook

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

8fb0791d 09/11/2009 07:10 pm Juan Quintela

vmstate: Add pre/post_save() hooks

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

6ee093c9 09/11/2009 06:19 pm Juan Quintela

Unexport ticks_per_sec variable. Create get_ticks_per_sec() function

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

06113719 09/11/2009 06:19 pm Gerd Hoffmann

qdev: add parser for chardev properties

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

f0457e8d 09/11/2009 06:19 pm Gerd Hoffmann

convert msmouse chardev to QemuOpts.

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

dc1c21e6 09/11/2009 06:19 pm Gerd Hoffmann

convert braille chardev to QemuOpts.

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

ed757e14 09/11/2009 06:19 pm Yan Vugenfirer

VirtIO: Fix QEMU crash during Windows PNP tests

Hello,

In some cases bus driver can deassert "bus master" bit in PCI command
register. The driver will no longer be able to update related registers in
the device. Eventually it will cause QEMU to exit in "virtqueue_num_heads"...

d03f09cc 09/11/2009 06:19 pm Markus Armbruster

qdev: Fix i6300 upcast

Use DO_UPCAST() instead of container_of() to go from PCIDevice to
I6300State. This ensures that PCIDevice is the first member of struct
I6300State.

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

711bf3d9 09/11/2009 06:19 pm Michael S. Tsirkin

qemu: make virtio-blk PCI compliant by default

commit bf011293faaa7f87e4de83185931e7411b794128 made virtio-blk-pci not
PCI-compliant, since it makes region 0 (which is an i/o region)
size > 256, and, since PCI 2.1, i/o regions are limited to 256 bytes size....

b8193adb 09/11/2009 06:19 pm Michael S. Tsirkin

qemu: init all queues to NO_VECTOR value

initialize vectors for all vqs to VIRTIO_NO_VECTOR rather than 0 which
is a valid vector. This fixes migration which happened before driver
was loaded.

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

e900a7b7 09/11/2009 06:19 pm Christoph Hellwig

block: add enable_write_cache flag

Add a enable_write_cache flag in the block driver state, and use it to
decide if we claim to have a volatile write cache that needs controlled
flushing from the guest. The flag is off if cache=writethrough is
defined because O_DSYNC guarantees that every write goes to stable...

b0484ae4 09/11/2009 06:19 pm Christoph Hellwig

ide: use bdrv_aio_flush

Signed-off-by: Christoph Hellwig <>
Signed-off-by: Anthony Liguori <>

aa659be3 09/11/2009 06:19 pm Christoph Hellwig

virtio-blk: add volatile writecache feature

Add a new VIRTIO_BLK_F_WCACHE feature to virtio-blk to indicate that we have
a volatile write cache that needs controlled flushing. Implement a
VIRTIO_BLK_T_FLUSH operation to flush it.

Signed-off-by: Christoph Hellwig <>...

1c3173b9 09/11/2009 06:18 pm Anthony Liguori

Revert "don't call cpu_sychronize_state from reset handlers"

This reverts commit 733318ea9c6d846a6a047b87619e7d9d6e9707d1.

Signed-off-by: Anthony Liguori <>

91553dcc 09/11/2009 06:18 pm Kevin Wolf

virtio-blk: Use bdrv_aio_multiwrite

It is quite common for virtio-blk to submit more than one write request in a
row to the qemu block layer. Use bdrv_aio_multiwrite to allow block drivers to
optimize its handling of the requests.

Signed-off-by: Kevin Wolf <>...

31226166 09/10/2009 06:59 pm malc

Fix formatting

a5e8e46b 09/10/2009 06:59 pm malc

Fix formatting, get rid of conf and fix description

41875be5 09/10/2009 06:59 pm malc

Fix formatting and and description field

9453c5bc 09/10/2009 06:48 pm Gerd Hoffmann

qdev/isa: convert ne2000

Also split the isa bits into a separate source file, so we don't drag in
a dependency for isa-bus.o for machines which want ne2k_pci only.

Signed-off-by: Gerd Hoffmann <>

11d23c35 09/10/2009 06:48 pm Gerd Hoffmann

qdev/isa: finish pckbd conversion

drop old init path and switch remaining users to
isa_create_simple().

Signed-off-by: Gerd Hoffmann <>

32e0c826 09/10/2009 06:48 pm Gerd Hoffmann

qdev/isa: convert real time clock

Signed-off-by: Gerd Hoffmann <>

f7b4f61f 09/10/2009 06:48 pm Gerd Hoffmann

qdev/isa: convert soundblaster

Signed-off-by: Gerd Hoffmann <>

f8ba7846 09/10/2009 06:48 pm Gerd Hoffmann

qdev/isa: convert cs4231a sound card

Signed-off-by: Gerd Hoffmann <>

9df34396 09/10/2009 06:48 pm Gerd Hoffmann

qdev/isa: convert gravis ultrasound

Signed-off-by: Gerd Hoffmann <>

2e15e23b 09/10/2009 06:47 pm Gerd Hoffmann

qdev: simplify isa irq assignments

isa-bus owns the isa irqs now, so it can hand them out directly.
There is no need for the separate isa_connect_irqs step, drop it.

Also hard-code isa interrupts which can't be configured anyway.

Signed-off-by: Gerd Hoffmann <>

787aa97a 09/10/2009 06:47 pm Gerd Hoffmann

qdev: tag isabus-bridge as no-user

isabus-bridge isn't supposed to be added via -device ...

Signed-off-by: Gerd Hoffmann <>

924f6d72 09/10/2009 06:47 pm Gerd Hoffmann

qdev: add isa_create() function

Like isa_create_simple, but doesn't call qdev_init, so one can set
properties after creating and before initializing the device.

Signed-off-by: Gerd Hoffmann <>

679a37af 09/10/2009 06:47 pm Gerd Hoffmann

isapc: pick a more sane default cpu for such old hardware.

Signed-off-by: Gerd Hoffmann <>

316940b0 09/10/2009 06:47 pm Gerd Hoffmann

qdev: add property type for 32bit signed integers.

Signed-off-by: Gerd Hoffmann <>

86c86157 09/10/2009 06:47 pm Gerd Hoffmann

qdev: drop iobase properties from isa bus

Lot of ISA devices work at fixed addresses, so having iobase
as bus property doesn't make much sense. Devices which can
have different iobases will get a device property.

Also simply hard-code stuff which can't be configured anyway....

2c8d9340 09/10/2009 06:47 pm Gerd Hoffmann

isapc: Fix irq routing

Only send irqs to ioapic in case we have one.
Fixes qemu segfault.

Signed-off-by: Gerd Hoffmann <>

13f5545d 09/10/2009 02:20 am Juan Quintela

Fix VMSTATE_PCI_DEVICE version

PCI device entries have to have a default version, not 2, because they are
used in the midle of other structures that can have any version number.

We can't use proper versioning here until we have SubSections support.
Why we didn't noticed before? Because in a PC, the only device ported with...

98815437 09/10/2009 01:31 am Bernhard Kauer

RTC polling mode broken

The RTC emulation does not set the IRQ flags independent of the IRQ enable bits.

The original MC146818A datasheet from 1984 notes:
"flag bits in Register C [...] are set independent of the
state of the corresponding enable bits in Register B"...

733318ea 09/10/2009 01:31 am Glauber Costa

don't call cpu_sychronize_state from reset handlers

Doing this will make the vcpu ioctl be issued from the I/O thread, instead
of cpu thread. The correct behaviour is to call it from within the cpu thread,
as soon as we are ready to go.

Signed-off-by: Glauber Costa <>...

d6fd1e66 09/09/2009 10:57 pm Stefan Weil

eepro100: Clean code which sets the PCI device id

  • Use function pci_config_set_device_id
  • Use new macro PCI_DEVICE_ID_INTEL_82557

Signed-off-by: Stefan Weil <>
Signed-off-by: Anthony Liguori <>

0859df68 09/09/2009 10:57 pm Naphtali Sprei

Fix for commit 3f9cb1c14dc368f41447db5f78d6248c4f100ad4

Here's a patch to fix the issue introduced by me, as Reimar Döffinger pointed out,

Reimar Döffinger wrote:

On Thu, Aug 13, 2009 at 03:01:20PM +0300, Naphtali Sprei wrote:

Bug fix for segfault when run as i82551 HW:...

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

qdev: integrate reset

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

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

qdev: convert rtl8139 to 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 <>

20bb8277 09/09/2009 10:57 pm Gerd Hoffmann

qdev: convert tcx to reset + vmsd

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,......
7fc2f2c0 09/09/2009 10:57 pm Gerd Hoffmann

qdev/scsi+usb: convert usb-storage to qdev.

Full coverage with properties and everything. You can add virtual usb
sticks this way now:

-drive if=none,id=pendrive,path=/some/where
-device usb-storage,drive=pendrive

-usbdevice disk:/path/to/image continues to work....

274945b6 09/09/2009 10:55 pm Gerd Hoffmann

qdev/usb: add some convinience aliases.

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

6cf9b6f1 09/09/2009 10:55 pm Gerd Hoffmann

qdev/usb: convert uhci.

Hookup pci device into qdev.

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

5b19d9a2 09/09/2009 10:55 pm Gerd Hoffmann

qdev/usb: convert ohci.

Drop num_ports argument for usb_ohci_init_pci(), everybody
calls it with num_ports == 3, so it is pointless.

Convert ohci pci device into qdev.
TODO: convert non-pci ohci adapters.

You can add a OHCI USB Controller to your virtual pc now using...

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

806b6024 09/09/2009 10:55 pm Gerd Hoffmann

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

  • Add USBBus. * Add USBDeviceInfo, move device callbacks here. * Add usb-qdev helper functions. * Switch drivers to qdev.

TODO: * make the rest of qemu aware of usb busses and kill the FIXMEs
added by this patch....

a5d2f727 09/09/2009 10:55 pm Gerd Hoffmann

qdev/usb: make qemu aware of usb busses.

Move usb code from vl.c to usb-bus.c and make it use the new data
structures added by qdev conversion. qemu usb core should be able
to handle multiple USB busses just fine now (untested though).

Kill some usb_*_init() legacy functions, use usb_create_simple()...

b863d514 09/09/2009 10:55 pm Juan Quintela

cirrus_vga: rename cirrus_hook_read_cr() cirrus_vga_read_cr()

Simplify the logic to do everything inside the function. Return 0xff if index is out of range independetly of DEBUG_CIRRUS

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

4ec1ce04 09/09/2009 10:55 pm Juan Quintela

cirrus_vga: rename cirrus_hook_write_cr() cirrus_vga_write_cr()

Simplify the logic to do everything inside the function.

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

93ec8b32 09/09/2009 10:55 pm Juan Quintela

cirrus_vga: CIRRUS_HOOK_* is not used anymore

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

31c63201 09/09/2009 10:55 pm Juan Quintela

cirrus_vga: rename cirrus_hook_write_sr() cirrus_vga_write_sr()

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

5deaeee3 09/09/2009 10:55 pm Juan Quintela

cirrus_vga: rename cirrus_hook_read_palette() cirrus_vga_read_palette()

Simplify the logic to do everything inside the function

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

86948bb1 09/09/2009 10:55 pm Juan Quintela

cirrus_vga: rename cirrus_hook_write_palette() cirrus_vga_write_palette()

Simplify the logic to do everything inside the function

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

f705db9d 09/09/2009 10:55 pm Juan Quintela

cirrus_vga: rename cirrus_hook_read_gr() cirrus_vga_read_gr()

Simplify the logic to do everything inside the function.

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

22286bc6 09/09/2009 10:55 pm Juan Quintela

cirrus_vga: rename cirrus_hook_write_gr() cirrus_vga_write_gr()

Simplify the logic to do everything inside the function.

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

957c9db5 09/09/2009 10:55 pm Juan Quintela

cirrus_vga: make cirrus_read_hidden_dac() return its result

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

a46007a0 09/09/2009 10:55 pm Juan Quintela

vga and cirrus_vga: substitute switch for equivalent assigntment

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

cedd91d2 09/09/2009 10:55 pm Juan Quintela

vga: Rename last VGAState occurrences to VGACommonState

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

8a82c322 09/09/2009 10:55 pm Juan Quintela

cirrus_vga: rename cirrus_hook_read_sr() cirrus_vga_read_sr()

And make it a real function

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