Statistics
| Branch: | Revision:

root @ b09ea7d5

# Date Author Comment
b09ea7d5 06/22/2009 06:15 pm Gleb Natapov

Handle init/sipi in a main cpu exec loop. (v2)

This should fix compilation problem in case of CONFIG_USER_ONLY.

Currently INIT/SIPI is handled in the context of CPU that sends IPI.
This patch changes this to handle them like all other events in a main
cpu exec loop. When KVM will gain thread per vcpu capability it will...

4a244704 06/22/2009 06:10 pm Anthony Liguori

Disable _FORTIFY_SOURCE to fix Ubuntu build with -Werror

This eliminates the results unused warnings.

Signed-off-by: Anthony Liguori <>

406c8df3 06/22/2009 06:10 pm Glauber Costa

Make nic option rom loading less painful.

The code how it is today, is totally painful to read and keep.
To begin with, the code is duplicated with the option rom loading
code that linux_boot and vga are already using.

This patch introduces a "bootable" state in NICInfo structure,...

024431b3 06/22/2009 06:10 pm Filip Navara

Add O_BINARY to open call in net_dump_init.

Fix the pcap dumps on Win32 and other systems where O_BINARY is required.

Signed-off-by: Filip Navara <>
Signed-off-by: Anthony Liguori <>

5774cf98 06/22/2009 06:10 pm Mark McLoughlin

virtio: make vring_desc_*() take phys addrs

Change the vring descriptor helpers to take the physical
address of the descriptor table rather than a virtqueue.

This is needed in order to allow these helpers to be used
with an indirect descriptor table.

Signed-off-by: Mark McLoughlin <>...

efeea6d0 06/22/2009 06:10 pm Mark McLoughlin

virtio: add support for indirect ring entries

Support a new feature flag for indirect ring entries. These are ring
entries which point to a table of buffer descriptors.

The idea here is to increase the ring capacity by allowing a larger
effective ring size whereby the ring size dictates the number of...

6eaa6847 06/22/2009 06:10 pm Gleb Natapov

Add pci_bus_reset() function.

To reset internal irq handling data structures.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Yaniv Kamay <>
Signed-off-by: Anthony Liguori <>

d2e9fd8f 06/20/2009 04:51 am malc

Apply TCGV_UNUSED on variables that GCC mistakenly thinks can be used
uninitialized

d999f7e0 06/20/2009 04:13 am malc

Restore consistent formatting of audio devices

03dfe9f8 06/19/2009 01:51 am Riku Voipio

linux-user: strace now handles guest stringscorrectly [v2]

On Tue, Jun 16, 2009 at 08:19:23PM -0500, Anthony Liguori wrote:

malc wrote:

On my system the above line causes gcc to emit:

In file included from /home/malc/x/rcs/git/qemu/linux-user/strace.c:12:...

5d928867 06/19/2009 01:46 am Jean-Christophe Dubois

fix qemu_alloc/qemu_free for audio subsystem

Signed-off-by: Jean-Christophe DUBOIS <>

97f155dd 06/18/2009 09:57 pm Gerd Hoffmann

alsa: fix warning

Signed-off-by: Gerd Hoffmann <>

b20a0083 06/18/2009 11:28 am Edgar E. Iglesias

xilinx-eth: Remove debug print.

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

42f1ced2 06/17/2009 10:23 pm Blue Swirl

Don't set IRQs on device reset and loadvm/savevm

Signed-off-by: Blue Swirl <>

eae6bcbf 06/17/2009 08:36 pm Blue Swirl

Call piix4_reset() on system reset.

Also zero pci_irq_levels on reset to avoid stuck irq after reset.

Based on 15a1956af94e36105494f782a752698103addf63 by Gleb Natapov.

Signed-off-by: Blue Swirl <>

0d0a7e69 06/17/2009 08:20 pm Blue Swirl

Don't set IRQs on device reset and loadvm/savevm

Signed-off-by: Blue Swirl <>

15a1956a 06/17/2009 08:05 pm Gleb Natapov

Call piix3_reset() on system reset.

Also zero pci_irq_levels on reset to avoid stuck irq after reset.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Yaniv Kamay <>

c8075ac3 06/17/2009 08:05 pm Gleb Natapov

Register usb-uhci reset function.

The device is not reset on system reset currently.
Without this patch RHEL4.8 hangs after reboot if -usbdevice table
is in use.

Signed-off-by: Gleb Natapov <>

bc26e55a 06/17/2009 08:01 pm Blue Swirl

Revert "Update irqs on reset and device load"

This reverts commit 3dcd219f09d6c1817bf9a132899e6b925f7a0914.

It is incorrect to call qemu_irq functions (or any other functions that
access other device state) during savevm/loadvm.

Signed-off-by: Blue Swirl <>

727170b6 06/17/2009 06:49 pm Blue Swirl

Allow user to specify CPU model

Signed-off-by: Blue Swirl <>

19a3da7f 06/17/2009 06:27 pm Blue Swirl

Fix opening of read only raw images

Signed-off-by: Blue Swirl <>

5c55ff99 06/17/2009 06:22 pm Blue Swirl

Replace ELF section hack with normal table

Signed-off-by: Blue Swirl <>

2e610050 06/17/2009 06:22 pm Blue Swirl

Concentrate rest of table entries to top

Signed-off-by: Blue Swirl <>

54623277 06/17/2009 06:22 pm Blue Swirl

Concentrate most table entries to top

Signed-off-by: Blue Swirl <>

e8eaa2c0 06/17/2009 06:22 pm Blue Swirl

Clean up GEN_HANDLER2

Signed-off-by: Blue Swirl <>

99e300ef 06/17/2009 06:22 pm Blue Swirl

Clean up GEN_HANDLER

Signed-off-by: Blue Swirl <>

77d4db01 06/16/2009 11:52 pm Eduardo Habkost

Fix vga_screen_dump_blank() PPM generation

vga_screen_dump_blank() was not generating a valid PPM file: the width of the
image made no sense (why it was multiplied by sizeof(uint32_t)?), and there was
only one sample per pixel, instead of three.

Signed-off-by: Eduardo Habkost <>...

cfde4bd9 06/16/2009 11:52 pm Isaku Yamahata

exec.c: remove unnecessary #if NB_MMU_MODES

remove unnecessary #if NB_MMU_MODES by using loop.

Signed-off-by: Isaku Yamahata <>
Acked-by: Edgar E. Iglesias <>
Signed-off-by: Anthony Liguori <>

aea2a33c 06/16/2009 11:52 pm Mark McLoughlin

Prevent CD-ROM media eject while device is locked

Section 10.8.25 ("START/STOP UNIT Command") of SFF-8020i states that
if the device is locked we should refuse to eject if the device is
locked.

ASC_MEDIA_REMOVAL_PREVENTED is the appropriate return in this case....

2ea42952 06/16/2009 11:52 pm Glauber Costa

set migration max downtime

provide a monitor command to allow one to set the maximum
downtime he is willing to suffer during migration, in seconds.
"ms", "us", "ns" and "s" are accepted as modifiers.

This parameter will be used by ram_save_live() code to determine...

a0a3fd60 06/16/2009 11:45 pm Glauber Costa

add non-arbitrary migration stop condition

Currently, we're entering migration's stage 3 when
a treshold of 10 pages remain to be transferred in the system.

This has hurt some users. However, any proposed threshold is
arbitrary by nature, and would only shift the annoyance....

7d9aa9c0 06/16/2009 11:36 pm Amit Shah

pci: add define for communication class devices

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

950f1472 06/16/2009 11:36 pm Glauber Costa

provide cpu_index to env mapping

There are some people interested in, given a cpu number,
pick its CPUState. KVM is an example, although not yet in tree.
This patch provides a way of doing that.

Signed-off-by: Glauber Costa <>
Signed-off-by: Anthony Liguori <>

09695a4a 06/16/2009 11:36 pm Stefan Weil

Fix help message for new configure option --enable-debug.

The new option is --enable-debug, not --disable-debug.

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

ef768138 06/16/2009 11:36 pm Andre Przywara

allow CPUID vendor override

KVM-enabled QEMU will always report the vendor ID of the physical CPU it is
running on. Allow to override this if explicitly requested on the
command line. It will not suffice to name a CPU type (like -cpu phenom),
but you have to explicitly set the vendor: -cpu phenom,vendor=AuthenticAMD...

538f3686 06/16/2009 11:36 pm Nitin A Kamble

QEMU KVM: i386: Fix the cpu reset state

As per the IA32 processor manual, the accessed bit is set to 1 in the
processor state after reset. qemu pc cpu_reset code was missing this
accessed bit setting.

Signed-off-by: Nitin A Kamble <>...

3fe5c14e 06/16/2009 11:36 pm Amit Shah

Remove dead code

vl.c contains some dead code that initialises a 'label' string with the name
of the char device being initialised. This is unused.

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

6a7ad299 06/16/2009 11:36 pm Dor Laor

Call qemu_bh_delete at bdrv_aio_bh_cb.

Also replave qemu_bh_cancel with qemu_bh_delete in bdrv_aio_cancel_em.
Otherwise the bh will live forever in the bh list.

Signed-off-by: Dor Laor <>
Signed-off-by: Anthony Liguori <>

8c14c173 06/16/2009 11:36 pm Jan Kiszka

kvm: Fix IRQ injection into full queue

User space may only inject interrupts during kvm_arch_pre_run if
ready_for_interrupt_injection is set in kvm_run. But that field is
updated on exit from KVM_RUN, so we must ensure that we enter the
kernel after potentially queuing an interrupt, otherwise we risk to...

49c47daa 06/16/2009 11:18 pm Sebastian Herbszt

lsi53c895a: Implement write access to DMA Byte Counter

Adds CASE_SET_REG24 and fixes the following errors:

lsi_scsi: error: Unhandled writeb 0x24 = 0x0
lsi_scsi: error: Unhandled writeb 0x25 = 0x0

Signed-off-by: Sebastian Herbszt <>
Signed-off-by: Anthony Liguori <>

5c5dafdc 06/16/2009 11:18 pm Gerd Hoffmann

virtio blk: fix warning.

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

bb0a18e1 06/16/2009 11:18 pm Gerd Hoffmann

vnc: improve numpad support for qemu console.

Reorganize qemu console emulation code. Make it look at the numlock
state and interpret numpad keys as arrow+friends (numlock off) or
digits (numlock on). While being at it also wind up the other numpad
keys....

e9179ce1 06/16/2009 11:18 pm Avi Kivity

Rearrange io_mem_init()

Move io_mem_init() downwards to avoid a forward declaration. No code change.

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

28c2c264 06/16/2009 11:18 pm Avi Kivity

Rename pci_register_io_region() to pci_register_bar()

This function is used to manage a PCI BAR, so make the more generic
pci_register_io_region() available to other uses.

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

bd8ee11a 06/16/2009 11:18 pm Sebastian Herbszt

lsi53c895a: Implement Scratch Byte Register

Fixes the following errors:

lsi_scsi: error: Unhandled writeb 0x3a = 0x0
lsi_scsi: error: readb 0x3a

Signed-off-by: Sebastian Herbszt <>
Signed-off-by: Anthony Liguori <>

4b9a2d6d 06/16/2009 11:18 pm Sebastian Herbszt

lsi53c895a: Implement read and write access to DMA Next Address

Fixes the following errors:

lsi_scsi: error: Unhandled writeb 0x28 = 0x0
lsi_scsi: error: Unhandled writeb 0x29 = 0x0
lsi_scsi: error: Unhandled writeb 0x2a = 0x0
lsi_scsi: error: Unhandled writeb 0x2b = 0x0...

9923e05e 06/16/2009 11:18 pm Kevin Wolf

update_refcount: Write complete sectors

When updating the refcount blocks in update_refcount(), write complete sectors
instead of updating single entries.

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

759754f0 06/16/2009 11:18 pm Luiz Capitulino

readline: Remove unneeded qemu_mallocz() check

qemu_mallocz() already checks for NULL returns, readline_init() doesn't
have to do it again.

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

2d22959d 06/16/2009 11:18 pm Jan Kiszka

mux-term: Localize timestamps

As we can have multiple multiplexed terminals, timestamp control and
tracking should better take place per MuxDriver.

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

4ab312f7 06/16/2009 11:18 pm Jan Kiszka

mux-term: Fix timestamp association

So far a new timestamp was generated after a full line had been
printed. Fix this.

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

dff84034 06/16/2009 11:18 pm Jan Kiszka

kvm: Restrict configure check to Linux

There is no point in trying to find KVM on anything else than Linux, at
least for the moment.

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

1eed09cb 06/16/2009 11:18 pm Avi Kivity

Remove io_index argument from cpu_register_io_memory()

The parameter is always zero except when registering the three internal
io regions (ROM, unassigned, notdirty). Remove the parameter to reduce
the API's power, thus facilitating future change.

Signed-off-by: Avi Kivity <>...

198a0039 06/16/2009 11:18 pm Gerd Hoffmann

vnc: rework VncState release workflow.

Split socket closing and releasing of VncState into two steps. First
close the socket and set the variable to -1 to indicate shutdown in
progress. Do the actual release in a few places where we can be sure it
doesn't cause trouble in form of use-after-free. Add some checks for a...

9ccb258e 06/16/2009 11:18 pm Kevin Wolf

qcow2: Change default cluster size to 64k

Larger cluster sizes mean less metadata. This has been discussion a few times,
let's do it now. This turns 64k clusters on by default for new images.

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

f7d0fe02 06/16/2009 11:18 pm Kevin Wolf

qcow2: Split out refcount handling

qcow2-refcount.c contains all functions which are related to cluster
allocation and management in the image file. A large part of this is the
reference counting of these clusters.

Also a header file qcow2.h is introduced which will contain the interface of...

45aba42f 06/16/2009 11:18 pm Kevin Wolf

qcow2: Split out guest cluster functions

qcow2-cluster.c contains all functions related to the management of guest
clusters, i.e. what the guest sees on its virtual disk. This code is about
mapping these guest clusters to host clusters in the image file using the...

c142442b 06/16/2009 11:18 pm Kevin Wolf

qcow2: Split out snapshot functions

qcow2-snapshot.c contains the code related to snapshotting.

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

ed6ccf0f 06/16/2009 11:18 pm Kevin Wolf

qcow2: Rename global functions

The qcow2 source is now split into several more manageable files. During the
conversion quite some functions that were static before needed to be changed to
be global to make the source compile again.

We were lucky enough not to get name conflicts with these additional global...

6583e3c7 06/16/2009 11:18 pm Kevin Wolf

l2_allocate: Write complete sectors

When modifying the L1 table, l2_allocate() needs to write complete sectors
instead of single entries. The L1 table is already in memory, reading it from
disk in the block layer to align the request is wasted performance....

4c1612d9 06/16/2009 11:18 pm Kevin Wolf

alloc_cluster_link_l2: Write complete sectors

When updating the L2 tables in alloc_cluster_link_l2(), write complete
sectors instead of updating single entries.

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

d3fa1e0f 06/16/2009 11:18 pm Markus Armbruster

qdev: Fix regression in "pci_add ... storage if=virtio, ..."

qemu_pci_hot_add_storage() runs qdev_init() twice. Broken in commit
07e3af9a "Virtio-blk qdev conversion".

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

736d0c25 06/16/2009 11:18 pm Avi Kivity

raw-posix: open flags use BDRV_ namespace, not posix namespace

The flags argument to raw_common_open() contain bits defined by the BDRV_O_*
namespace, not the posix O_* namespace.

Adjust to use the correct constants.

Signed-off-by: Avi Kivity <>...

11a1feb6 06/16/2009 11:18 pm Avi Kivity

raw-posix: Remove O_RDWR when attempting to open a file read-only

When we open a file, we first attempt to open it read-write, then fall back
to read-only. Unfortunately we reuse the flags from the previous attempt,
so both attempts try to open the file with write permissions, and fail....

537fe2d6 06/16/2009 11:18 pm Anthony Liguori

Make sure to use SDL_CFLAGS everywhere we include SDL headers

Signed-off-by: Anthony Liguori <>

5f106811 06/16/2009 04:58 pm Arnaud Patard (Rtp)

RFC: fix fcntl support in linux-user - new try

Hi,

This is a new try to fix the fcntl support in linux-user. I tried to
adress all comments but as the previous version is several weeks old,
it's possible that I've missed some.

This patch doesn't handle linux specific fcntl flags. My plan is to get...

df377d03 06/16/2009 04:58 pm Nathan Froyd

linux-user: initialize mmap_mutex properly

We initialize mmap_mutex in any child threads/processes, but we need to
correctly statically initialize it for the original process.

Signed-off-by: Nathan Froyd <>
Signed-off-by: Riku Voipio <>

d5b3a9b6 06/16/2009 04:58 pm Eduardo Habkost

linux-user/syscall.c: define _ATFILE_SOURCE

Needed to make sure the xxxat() functions are available.

Signed-off-by: Eduardo Habkost <>
Signed-off-by: Riku Voipio <>

3f9ac9b3 06/16/2009 04:58 pm Laurent Vivier

linux-user: remove duplicate tswap32() from do_getsockopt()

This issue has been detected with tests/linux-tests.c:

linux-test.c:330: getsockopt

327 len = sizeof(val);
328 chk_error(getsockopt(server_fd, SOL_SOCKET, SO_TYPE, &val, &len));
329 if (val != SOCK_STREAM)...

3ce34dfb 06/16/2009 04:58 pm vibisreenivasan

linux-user: add tee, splice and vmsplice

Add support for tee, splice and vmsplice.

Originally from: vibi sreenivasan <>

Riku: squashed patches together, added a test to configure
and removed compliler warning by picking up correct type for...

b975b83b 06/16/2009 04:56 pm Lionel Landwerlin

linux-user: Added IP_ADD_MEMBERSHIP/IP_DROP_MEMBERSHIP flags to setsockopt

linux-user: Added IP_ADD_MEMBERSHIP/IP_DROP_MEMBERSHIP flags to setsockopt

Signed-off-by: Lionel Landwerlin <>
Signed-off-by: Riku Voipio <>

6e3cb58f 06/16/2009 04:56 pm Lionel Landwerlin

linux-user: Added IP_(UN)BLOCK_SOURCE/IP_(ADD|DROP)_SOURCE_MEMBERSHIP flags to setsockopt

linux-user: Added IP_(UN)BLOCK_SOURCE/IP_(ADD|DROP)_SOURCE_MEMBERSHIP flags to setsockopt

Signed-off-by: Lionel Landwerlin <>
Signed-off-by: Riku Voipio <>

350d1779 06/16/2009 04:56 pm Martin Mohring

linux-user: include linux/fs.h

defines FIGETBSZ FIBMAP, allowing the respective ioctl's to
be implemented.

From: Martin Mohring <>
Signed-off-by: Riku Voipio <>

a29ccd63 06/16/2009 04:56 pm Martin Mohring

linux-user: support private futexes

Implemented the same way as in the kernel.

From: Martin Mohring <>
Signed-off-by: Riku Voipio <>

c4d2302e 06/16/2009 04:56 pm Riku Voipio

add futex wake op

Signed-off-by: Riku Voipio <>

4b627a23 06/16/2009 04:56 pm Riku Voipio

linux-user: update syscall list

In preparation for supporting pipe2()

Signed-off-by: Riku Voipio <>

099d6b0f 06/16/2009 04:56 pm Riku Voipio

linux-user: implement pipe2 [v3]

implement pipe2 syscall.

[v2] fix do_pipe on mips and sh4
[v3] use pipe2 to ensure atomicity, but only when it is available.

Signed-off-by: Riku Voipio <>

9ad197d9 06/16/2009 04:56 pm Riku Voipio

export mmap_find_vma for shmat

Signed-off-by: Riku Voipio <>

88a8c984 06/16/2009 04:56 pm Riku Voipio

Implement shm* syscalls and fix 64/32bit errors

No regressions were observed on either 64bit or 32bit
IA hosts.

Patch based on original patches by:
Kirill A. Shutemov <>
- Implement shm* syscalls
- Fix and cleanup IPCOP_shm* ipc calls handling...

edf8e2af 06/16/2009 04:56 pm Mika Westerberg

linux-user: implemented ELF coredump support for ARM target

When target process is killed with signal (such signal that
should dump core) a coredump file is created. This file is
similar than coredump generated by Linux (there are few exceptions
though)....

9edc5d79 06/16/2009 04:56 pm Mika Westerberg

linux-user: added x86 and x86_64 support for ELF coredump

Signed-off-by: Mika Westerberg <>
Signed-off-by: Riku Voipio <>

74d753ac 06/16/2009 04:56 pm Mika Westerberg

linux-user: strace now handles guest strings correctly [v2]

- to not to break strace with GUEST_BASE is set:
- Strace now can load and print guest strings correctly.
- Added printing support for commonly used flags in some syscalls
(e.g open, creat, mmap etc.)...

ebc996f3 06/16/2009 04:56 pm Riku Voipio

linux-user: fix utimensat

The glibc function for utimensat glibc returns -EINVAL when the path is null
which is a different behaviour with the syscall.

path can be null because internally the glibc is using utimensat with
path null when implmenting futimens. If path is null, call futimes...

44607123 06/16/2009 04:56 pm Arnaud Patard

Fix struct termios host - target translation

When converting the termios structure between host and target in
target_to_host_termios and host_to_target_termios, the c_cc[] array is
never initialised.
Calling memset() before using it allows to run successfully "stty echo /...

6f932f91 06/16/2009 04:56 pm Arnaud Patard

Return EOPNOTSUPP instead of ENOSYS for xattr syscalls

In current code, we're sending ENOSYS to target when a syscall for the
xattrs is done. This makes applications like ls complain loudly about
that and breaks scripts parsing the output. Moreover, iirc, implemented...

72716184 06/15/2009 10:35 pm Anthony Liguori

Incorporate changes from v2 of Gleb's RTC reset patch

Signed-off-by: Anthony Liguori <>

ba494313 06/15/2009 10:00 pm Edgar E. Iglesias

etrax: Don't pass CPUState to peripherals.

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

e510e05b 06/15/2009 08:53 pm Anthony Liguori

Merge commit 'block/master' into staging

  • commit 'block/master':
    raw-posix: cleanup ioctl methods
    block: add bdrv_probe_device method
    raw-posix: split hdev drivers
    raw-posix: add a raw_open_common helper
    raw-posix: always store open flags
    fix qemu_aio_flush...
f5de141b 06/15/2009 08:51 pm Anthony Liguori

Fix warning in qemu-nbd.c

qemu-nbd.c:349: error: ignoring return value of 'daemon', declared with attribute warn_unused_result

Signed-off-by: Anthony Liguori <>

63ec93db 06/15/2009 03:04 pm Christoph Hellwig

raw-posix: cleanup ioctl methods

Rename raw_ioctl and raw_aio_ioctl to hdev_ioctl and hdev_aio_ioctl as they
are only used for the host device. Also only add them to the method table
for the cases where we need them (generic hdev if linux and linux CDROM)...

508c7cb3 06/15/2009 03:04 pm Christoph Hellwig

block: add bdrv_probe_device method

Add a bdrv_probe_device method to all BlockDriver instances implementing
host devices to move matching of host device types into the actual drivers.
For now we keep exacly the old matching behaviour based on the devices names,...

f3a5d3f8 06/15/2009 02:55 pm Christoph Hellwig

raw-posix: split hdev drivers

Instead of declaring one BlockDriver for all host devices declared one
for each type: a generic one for normal disk devices, a Linux floppy
driver and a CDROM driver for Linux and FreeBSD. This gets rid of a lot
of messy ifdefs and switching based on the type in the various removal...

90babde0 06/15/2009 02:53 pm Christoph Hellwig

raw-posix: add a raw_open_common helper

raw_open and hdev_open contain the same basic logic. Add a new
raw_open_common helper containing the guts of the open routine
and call it from raw_open and hdev_open.

We use the new open_flags field in BDRVRawState to allow passing...

0e1d8f4c 06/15/2009 02:53 pm Christoph Hellwig

raw-posix: always store open flags

Both the Linux floppy and the FreeBSD CDROM host device need to store
the open flags so that they can re-open the device later. Store the
open flags unconditionally to remove the ifdef mess and simply the
calling conventions for the later patches in the series....

986c28d6 06/15/2009 02:52 pm Andrea Arcangeli

fix qemu_aio_flush

qemu_aio_wait by invoking the bh or one of the aio completion
callbacks, could end up submitting new pending aio, breaking the
invariant that qemu_aio_flush returns only when no pending aio is
outstanding (possibly a problem for migration as such)....

eeb7c03c 06/15/2009 05:50 am Gleb Natapov

Add rtc reset function.

On reset:
Periodic Interrupt Enable (PIE) bit is cleared to zero
Alarm Interrupt Enable (AIE) bit is cleared to zero
Update ended Interrupt Flag (UF) bit is cleared to zero
Interrupt Request status Flag (IRQF) bit is cleared to zero...

11be4b3e 06/14/2009 03:19 am Stefan Weil

Add static to local machine declaration.

Variable akitapda_machine is only used locally,
so the static attribute avoids a compiler warning.

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

d084eab6 06/14/2009 03:19 am Stefan Weil

Fix prototype of function zfree.

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

8a67ec4d 06/14/2009 03:19 am Uri Lublin

exec-migration: handle EINTR in popen_get_buffer()

Sometimes, upon interrupt, fread returns with no data, and
the (incoming exec) migration fails.

Fix by retrying on such a case.

Signed-off-by: Uri Lublin <>
Signed-off-by: Anthony Liguori <>

e19252d3 06/14/2009 03:19 am Uri Lublin

migrate_fd_close: delete associated io-handler before closing the fd

It may happen that the io-handler is still registered. That causes
select() to return with EBADF, not calling handlers for other fds.

The io-handler would be registered when (on the source) the whole state...

678e12cc 06/14/2009 03:19 am Gleb Natapov

Don't use cpu_index as apic_id.

(patch is on top of "Apic creation should not depend on pci" series)

Currently cpu_index is used as cpu apic id on x86. This is incorrect
since apic ids not have to be continuous (they can also encode cpu
hierarchy information). This patch uses cpuid_apic_id for initial apic id...