Statistics
| Branch: | Revision:

root @ de5071c5

# Date Author Comment
de5071c5 09/12/2009 12:58 pm Blue Swirl

Fix a Sparse warning about redefinition of offsetof()

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

620150dc 09/12/2009 09:19 am Blue Swirl

Try to fix BSD breakage by 806b60248218bd5f74a8b070f5a99a864e8e51c6

Signed-off-by: Blue Swirl <>

15cc9235 09/12/2009 09:19 am Blue Swirl

Include sys-queue.h early to override system queue definitions on BSD

Signed-off-by: Blue Swirl <>

47faadc6 09/12/2009 09:19 am Blue Swirl

Unbreak BSD: use qemu_fdatasync instead of fdatasync

Signed-off-by: Blue Swirl <>

b2e3b6e9 09/12/2009 02:18 am malc

Use proper format conversion specifier when printing size_t value

And untabify this while we are at it.

Signed-off-by: malc <>

2182349d 09/12/2009 01:50 am malc

oss: Unbreak mmaping the ability to mmap oss fd on Linux

Signed-off-by: malc <>

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

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

Signed-off-by: malc <>

713a98f8 09/12/2009 01:50 am malc

audio: poll mode infrastructure

Signed-off-by: malc <>

dd8a5649 09/12/2009 01:50 am malc

oss: poll mode handling

Signed-off-by: malc <>

8b438ba3 09/12/2009 01:50 am malc

alsa: poll mode handling

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

2637c754 09/11/2009 07:10 pm Gleb Natapov

kvm_arch_get_registers() shouldn't be called directly

Direct call to kvm_arch_get_registers() bypass logic in
cpu_synchronize_state()

Signed-off-by: Gleb Natapov <>
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 <>

274dfed8 09/11/2009 07:10 pm Anthony Liguori

Make get_ticks_per_sec() a static inline

ticks_per_sec is a constant. There's no need to store it as a variable as it
never changes since our time is based on units.

Convert get_ticks_per_sec() to a static inline and move the constant into
qemu-timer.h. Remove all references to QEMU_TIMER_BASE so that we consistently...

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

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

vmstate: port cpu_comon

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

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

timers: Createt TimersState and put all timers state there

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

2faf58cd 09/11/2009 06:19 pm Juan Quintela

timers: move them to VMState

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

b03b2e48 09/11/2009 06:19 pm Juan Quintela

timers: remove useless check

loadvm_state is called from: vl.c during startup, vmstart() is called after finishing loading. The other caller do_loadvm() does the call after a vm_stop(). At both places where we can be saving state we are stoped a few lines before...

1a621c8d 09/11/2009 06:19 pm Juan Quintela

ram: remove support for loading v1

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

94fb0909 09/11/2009 06:19 pm Juan Quintela

ram: Remove SaveVM Version 2 support

It don't work. It fails in this check

if (qemu_get_be32(f) != last_ram_offset)

With 512MB of ram, values were for me:

v = 20c00000 last_ram_offset = 20840000

Last time that some code changed that was this one....

bbfe1408 09/11/2009 06:19 pm Juan Quintela

Remove SaveVM v2 support

In previosu series I remove v2 support for RAM (that was the version that was
supported when SaveVM v3 appeared). Now we can't load RAM for any image saved in SaveVM v2, we can as well remove SaveVM v2 entirely.

Note: That SaveVM RAM was at v2 when General SaveVM support went from v2 to v3 makes talking about versions confusing at least...

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

convert windows console chardev to QemuOpts.

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

48b76496 09/11/2009 06:19 pm Gerd Hoffmann

convert tty + parport chardevs to QemuOpts.

new cmd line syntax:
-chardev tty,id=name,path=/dev/tty*
-chardev parport,id=name,path=/dev/parport*

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

6ea314d9 09/11/2009 06:19 pm Gerd Hoffmann

convert vc chardev to QemuOpts.

new cmd line syntax:
-chardev vc,id=name
-chardev vc,id=name,width=pixels,height=pixels
-chardev vc,id=name,cols=chars,rows=chars

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

7591c5c1 09/11/2009 06:19 pm Gerd Hoffmann

convert mux chardev to QemuOpts.

new cmd line syntax: you can add mux=1 to any chardev to enable muxing,
then attach it multiple times, like this:

-chardev pty,name=mux,mux=on

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

7e1b35b4 09/11/2009 06:19 pm Gerd Hoffmann

convert udp chardev to QemuOpts.

While being at it: create a new inet_dgram_opts() function for udp setup,
so udp can handle IPv6 now.

new cmd line syntax:
-chardev udp,id=name,host=remotehost,port=remoteport,\
localaddr=bindaddr,localport=bindport...

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

Allow -serial chardev:<name>

Lets put -chardev into use now. With this patch applied chardev:name is
accepted as chardev specification everywhere, i.e. now you can:

-chardev stdio,id=ttyS0
-serial chardev:ttyS0

which does the same as '-serial stdio"....

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

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

monitor: fix muxing

make the mux driver send mux_in and mux_out events when switching
focus while hooking up more handlers.

stop using CharDriverState->focus in monitor.c, track state using
the mux events instead. This also removes the implicit assumtion...

799f1f23 09/11/2009 06:19 pm Gerd Hoffmann

move mux focus field from CharDriverState to MuxDriver

Now that monitor stopped using focus we can make it internal
to the mux driver.

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

2af2bf67 09/11/2009 06:19 pm Gerd Hoffmann

sockets: add unix_connect_opts

Add unix_connect_opts(). Does the same as unix_connect(), but uses
QemuOpts. unix_connect() is a compatibility wrapper for
unix_connect_opts() now and should go away some day.

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

62b6adfb 09/11/2009 06:19 pm Gerd Hoffmann

sockets: add unix_listen_opts

Add unix_listen_opts(). Does the same as unix_listen(), but uses
QemuOpts. unix_listen() is a compatibility wrapper for
unix_listen_opts() now and should go away some day.

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

108af7b9 09/11/2009 06:19 pm Gerd Hoffmann

sockets: add unix_*_opts for windows.

Add unix_*_opts function dummys for windows.

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

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

sockets: add inet_connect_opts

Add inet_connect_opts(). Does the same as inet_connect(), but uses
QemuOpts. inet_connect() is a compatibility wrapper for
inet_connect_opts() now and should go away some day.

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

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

sockets: add inet_listen_opts

Add inet_listen_opts(). Does the same as inet_listen(), but uses
QemuOpts. inet_listen() is a compatibility wrapper for
inet_listen_opts() now and should go away some day.

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

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

convert unix+tcp chardevs to QemuOpts.

new cmd line syntax:
unix socket:
-chardev socket,id=name,path=/path/to/socket
tcp socket:
-chardev socket,id=name,host=hostaddr|ipaddr,port=portnr

server and nowait options work as usual. Alternatively you can use...

4490dadf 09/11/2009 06:19 pm Gerd Hoffmann

convert pty chardev to QemuOpts.

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

3c17affb 09/11/2009 06:19 pm Gerd Hoffmann

convert stdio chardev to QemuOpts.

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

96729cbd 09/11/2009 06:19 pm Gerd Hoffmann

QemuOpts: split option parser into two functions.

looking for id= and creating a new QemuOpts instance is splitted from
the actual option parser code now, so the parser can be called from
other contexts too.

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

9d868d45 09/11/2009 06:19 pm Gerd Hoffmann

qemu-option.h include protectors

qemu-option.h has no protection against including it twice.
This patch adds the usual "#ifndef header" bits.

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

191bc01b 09/11/2009 06:19 pm Gerd Hoffmann

switch chardev to QemuOpts: infrastructure, null device

start switching chardevs to QemuOpts. This patch adds the
infrastructure and converts the null device.

The patch brings two new functions:

qemu_chr_open_opts()
same as qemu_chr_open(), but uses QemuOpts instead of a...

7d31544f 09/11/2009 06:19 pm Gerd Hoffmann

convert file+pipe chardevs to QemuOpts.

new cmd line syntax:
-chardev file,id=name,path=/path/to/file
-chardev pipe,id=name,path=/path/to/pipe

Signed-off-by: Gerd Hoffmann <>
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...

6f1953c4 09/11/2009 06:19 pm Christoph Hellwig

block: use fdatasync instead of fsync if possible

If we are flushing the caches for our image files we only care about the
data (including the metadata required for accessing it) but not things
like timestamp updates. So try to use fdatasync instead of fsync to...

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

block: add aio_flush operation

Instead stalling the VCPU while serving a cache flush try to do it
asynchronously. Use our good old helper thread pool to issue an
asynchronous fdatasync for raw-posix. Note that while Linux AIO
implements a fdatasync operation it is not useful for us because...

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

c4c0e236 09/11/2009 06:19 pm Jim Paris

usb-linux.c: fix buffer overflow

In usb-linux.c:usb_host_handle_control, we pass a 1024-byte buffer and
length to the kernel. However, the length was provided by the caller
of dev->handle_packet, and is not checked, so the kernel might provide
too much data and overflow our buffer....

aeec26d3 09/11/2009 06:19 pm Stefan Weil

Fix conditional compilation (MIPS host)

Compilation for MIPS host (not part of official QEMU)
checks __mips_isa_rev which is not always defined.

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

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

40b4f539 09/11/2009 06:18 pm Kevin Wolf

Add bdrv_aio_multiwrite

One performance problem of qcow2 during the initial image growth are
sequential writes that are not cluster aligned. In this case, when a first
requests requires to allocate a new cluster but writes only to the first
couple of sectors in that cluster, the rest of the cluster is zeroed - just...

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

02b33596 09/11/2009 11:38 am Edgar E. Iglesias

microblaze: Trap if QEMU finds an unknown insns.

If PVR settings enable illegal insn trap, trap when QEMU finds an
insn it knows nothing about.

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

a12f6507 09/11/2009 11:35 am Edgar E. Iglesias

microblaze: Correct prio between MMU and unaligned exceptions.

The microblaze gives MMU faults priority. For stores we still
have a flaw that the value leaks to memory in the case of an
unaligned exception.

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

97f90cbf 09/11/2009 11:27 am Edgar E. Iglesias

microblaze: HW Exception fixes.

  • Correct PVR checks for masking off individual exceptions.
  • Correct FPU exception code.
  • Set EAR on unaligned and unassigned exceptions.

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

487a4d60 09/11/2009 10:13 am Aurelien Jarno

Update OpenBIOS images to r577

Signed-off-by: Aurelien Jarno <>

abb6ae2c 09/11/2009 12:38 am malc

X86_64: Use proper jumps/calls when displacement exceeds +-2G

Signed-off-by: malc <>

3c854e47 09/10/2009 08:09 pm malc

Remove bit-rotten threshold handling

Thanks to Toshiya Takeda for bringing up an unrelated issue which led
to this.

Signed-off-by: malc <>

fbd5de9b 09/10/2009 07:27 pm malc

F_DUPFD_CLOEXEC is not universally available

The same issue (and the same patch to the byte) was experienced/proposed
by Vince Weaver.

Signed-off-by: malc <>

720036a5 09/10/2009 07:05 pm malc

Add information w.r.t default GUS IRQ assigment

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