Statistics
| Branch: | Revision:

root @ 72755a70

# Date Author Comment
4bfd1712 07/10/2009 09:44 pm Michael S. Tsirkin

qemu/msi: clean used vectors state on load

Clean up msix vector usage state on load. Since guest might have control
over it through the device, the device will have to load this state from
file.

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

72755a70 07/10/2009 09:44 pm Michael S. Tsirkin

qemu/msi: missing braces

MSIX present bit is tested incorrectly, and only happens to work because
the bit we are testing is 0x1. Add braces to fix this.

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

55496240 07/10/2009 09:44 pm Mark McLoughlin

Prefer sysfs for USB host devices

Scanning for devices via /sys/bus/usb/devices/ and using them via the
/dev/bus/usb/<bus>/<device> character devices is the prefered method
on modern kernels, so try that first.

When using SELinux and libvirt, qemu will have access to /sys/bus/usb...

c53ffce9 07/10/2009 09:44 pm Kevin Wolf

qcow1: Fix qcow_aio_writev

Pass is_write = 1 to qcow_aio_setup when writing.

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

3f6a3ee5 07/10/2009 09:44 pm Kevin Wolf

qcow2: Fix L1 table memory allocation

Contrary to what one could expect, the size of L1 tables is not cluster
aligned. So as we're writing whole sectors now instead of single entries,
we need to ensure that the L1 table in memory is large enough; otherwise...

e6a0575e 07/10/2009 09:41 pm Anthony Liguori

Make sure to mark MCE defines as ULL

Fixes build on 32-bit

Signed-off-by: Anthony Liguori <>

1fa63e43 07/10/2009 09:41 pm Michael Buesch

usb-ohci: Fix endianness issue

This fixes a possible endianness issue in the usb-ohci hw module.
hcca.frame and ohci->frame_number are 16bit, so use cpu_to_le16().

Signed-off-by: Michael Buesch <>
Signed-off-by: Anthony Liguori <>

230d4fa4 07/10/2009 08:25 pm Christoph Hellwig

qemu-io: small cleanups for the aio code

Address a couple of review comments from Kevin.

Signed-off-by: Christoph Hellwig <>

cf57298a 07/10/2009 08:25 pm Christoph Hellwig

qemu-io: better input validation for vector-based commands

Fix up a couple of issues with validating the input of the various
length arguments for the vectored I/O commands:

- do the alignment check on each length instead the always 0 count argument
- use a long long varibale for the cvtnum return value so that we can check...
9c4bab26 07/10/2009 08:25 pm Christoph Hellwig

qemu-io: add flag to mark files growable

Add a -g flag to the open command and the main qemu-io command line to
allow opening a file growable. This is only allowed for protocols,
mirroring the limitation exposed through bdrv_file_open.

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

7d8abfcb 07/10/2009 08:25 pm Kevin Wolf

qemu-io: fix memory leak

qemu-io leaks the request buffer whenever the read or write function isn't
executed completely down the "normal" code path.

[hch: also fix the aio and vectored variants the same way]

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

52249f0f 07/10/2009 01:28 am Anthony Liguori

Disable kqemu by default at run time

-no-kqemu -> -enable-kqemu

kqemu is still present at compile time by default

Signed-off-by: Anthony Liguori <>

391354f1 07/10/2009 12:58 am Mark McLoughlin

Unregister savevm callback in eeprom93xx_free()

Otherwise if you hot remove an eepro100 NIC and then migrate,
you get:

Unknown savevm section or instance 'eeprom' 0

on the destination side.

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

9a3e12c8 07/10/2009 12:58 am Michael S. Tsirkin

fix segfault in msix_save

This fixes segfault reported by Kevin Wolf,
and simplifies the code in msix_save.

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

dca61621 07/10/2009 12:58 am Michael S. Tsirkin

qemu: remove control vector save

control vector is saved/restored by virtio-pci,
it does not belong in virtio.

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

e3fc14c3 07/10/2009 12:58 am Jan Kiszka

configure: Append extra cflags and ldflags

In order to allow overriding flags that are set by configure, we have to
append them instead of prepending as it is done so far.

v2: Clarify documentation.

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

1889465a 07/10/2009 12:58 am Andi Kleen

Allow setting qemu process name v2

Set the Linux process name to the name argument specified with name. I find
this useful to see which guests are taking CPU time in top.

This doesn't affect ps, which checks argv0, but rewriting the
environment uses much more code, so I only used this simple way....

eeb34af9 07/10/2009 12:58 am Anthony Liguori

Make sure to only vm_start() a failed migration if we were running to begin
with.

Signed-off-by: Anthony Liguori <>

1c27a8b3 07/10/2009 12:58 am G 3

Substitute O_DSYNC with O_SYNC or O_FSYNC when needed.

Signed-off-by: John Arbuckle <>
Signed-off-by: Anthony Liguori <>

d026fb6d 07/10/2009 12:58 am Mark McLoughlin

Don't abort if TUNSETSNDBUF fails where no sndbuf= arg is supplied

If no tap,sndbuf= arg is supplied, we use a default value. If
TUNSETSNDBUF fails in this case, we should not abort.

Signed-off-by: Mark McLoughlin <>
Signed-off-by: Anthony Liguori <>

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

5f650495 07/10/2009 12:06 am Isaku Yamahata

consolidate user cpu_{in, out}[bwl] into ioport-user.c

Signed-off-by: Isaku Yamahata <>
Signed-off-by: Anthony Liguori <>

c76f4952 07/10/2009 12:06 am Nolan

Allow adjustment of http block device's readahead size, via a new
":readahead=###:" suffix.

Signed-off-by: Nolan Leake <nolan <at> sigbus.net>
Signed-off-by: Anthony Liguori <>

d56dd6cf 07/10/2009 12:06 am Isaku Yamahata

use constant IOPORTS_MASK instead of 0xffff.

Signed-off-by: Isaku Yamahata <>
Signed-off-by: Anthony Liguori <>

23e0affd 07/10/2009 12:06 am Isaku Yamahata

ioport: consolidate duplicated logic in register_ioport_{read, write}().

Signed-off-by: Isaku Yamahata <>
Signed-off-by: Anthony Liguori <>

1cec71e3 07/10/2009 12:06 am Anthony Liguori

Revert "support colon in filenames"

This reverts commit 707c0dbc97cddfe8d2441b8259c6c526d99f2dd8.

Signed-off-by: Anthony Liguori <>

89e671e3 07/10/2009 12:06 am Alexander Graf

Replace signrom with shell script v3

In order to not execute code we just compiled, let's replace signrom
with a shell script that does the same thing while staying compatible
to pretty much every system available.

This should make cross-compilation for windows easier....

32993977 07/10/2009 12:06 am Isaku Yamahata

split out ioport related stuffs from vl.c into ioport.c.

Signed-off-by: Isaku Yamahata <>
Signed-off-by: Anthony Liguori <>

fc5b81d1 07/10/2009 12:06 am Mark McLoughlin

net: set a default value for sndbuf=

On reflection, perhaps it does make sense to set a default value for
the sndbuf= tap parameter.

For best effect, sndbuf= should be set to just below the capacity of
the physical NIC.

Setting it higher will cause packets to be dropped before the limit...

0aa217e4 07/10/2009 12:06 am Kevin Wolf

qcow2: Make cache=writethrough default

The performance of qcow2 has improved meanwhile, so we don't need to
special-case it any more. Switch the default to write-through caching
like all other block drivers.

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

c6a5a71a 07/10/2009 12:06 am Anthony Liguori

Fix build for ESD audio

Signed-off-by: Anthony Liguori <>

df7a607b 07/10/2009 12:06 am Christoph Egger

configure: detect xen with --extra-cflags / --extra-ldflags

Attached patch lets configure find xen headers and xen libs
when called with --extra-cflags and --extra-ldflags options.

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

79c4f6b0 07/10/2009 12:04 am Huang Ying

QEMU: MCE: Add MCE simulation to qemu/tcg

- MCE features are initialized when VCPU is intialized according to CPUID.
- A monitor command "mce" is added to inject a MCE.
- A new interrupt mask: CPU_INTERRUPT_MCE is added to inject the MCE.

aliguori: fix build for linux-user...

2152390d 07/09/2009 11:09 pm Anthony Liguori

Merge commit 'linux-user/linux-user-for-upstream' into tmp-staging

94c5495d 07/09/2009 08:40 pm Paul Brook

MIPS signal handling fix

Add explicit padding to MIPS signal frame structures.

Signed-off-by: Paul Brook <>

f04dc72f 07/09/2009 07:56 pm Paul Brook

Enable MIPS NPTL

Enable NPTL support for MIPS usermode emulation.

Signed-off-by: Paul Brook <>

590bc601 07/09/2009 07:45 pm Paul Brook

MIPS atomic instructions

Implement MIPS ll/sc instructions using atomic compare+exchange.

Signed-off-by: Paul Brook <>

ff867ddc 07/09/2009 05:07 pm Paul Brook

MIPS usermode TLS register

Implement cpu_set_tls for MIPS.

Signed-off-by: Paul Brook <>

18113962 07/09/2009 03:11 pm Paul Brook

Fix MIPS sys_clone

The clone syscall takes 6 args.

Signed-off-by: Paul Brook <>

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

16eaedf2 07/09/2009 03:07 pm Gerd Hoffmann

qdev/pci: misc fixes.

  • fix secondary bus setup. * use base->name instead of "FIXME" for device name.
    Yes, the device name is redundant. Only for drivers converted
    to qdev already though. Once all drivers are converted we can
    and should kill it....
6806e595 07/09/2009 03:07 pm Gerd Hoffmann

qdev: convert es1370.

Signed-off-by: Gerd Hoffmann <>

d88a76d1 07/09/2009 03:07 pm Gerd Hoffmann

qdev: convert ac97.

Signed-off-by: Gerd Hoffmann <>

0aab0d3a 07/09/2009 03:07 pm Gerd Hoffmann

qdev: update pci device registration.

Makes pci_qdev_register take a PCIDeviceInfo struct instead of a bunch
of parameters. Also adds config_read and config_write callbacks to
PCIDeviceInfo, so drivers needing these can be converted to the qdev
device API too....

e2b19c85 07/08/2009 05:25 pm malc

Remove SDL/ prefix

d644f8be 07/08/2009 05:24 pm malc

Add out of memory and zero size argument checks to be consistent with
the qemu_malloc routines

719f908e 07/08/2009 05:02 pm Ulrich Hecht

wrap path for access syscall

Signed-off-by: Ulrich Hecht <>
Signed-off-by: Riku Voipio <>

666bcd91 07/08/2009 05:02 pm Ulrich Hecht

getrlimit conversion mix-up

Fixes getrlimit implementation that overwrote the result of the syscall
instead of converting it

Signed-off-by: Ulrich Hecht <>
Signed-off-by: Riku Voipio <>

784ccfdb 07/08/2009 05:02 pm Ulrich Hecht

pipe argument should not be signed

pipedes is an address, it should not be signed (breaks for addresses

0x80000000)

Signed-off-by: Ulrich Hecht <>
Signed-off-by: Riku Voipio <>

98818189 07/08/2009 05:02 pm Ulrich Hecht

64-bit clean socketcall syscall

makes socketcall 64-bit clean so it works on 64-bit big-endian systems

Signed-off-by: Ulrich Hecht <>
Signed-off-by: Riku Voipio <>

fd4d81dd 07/08/2009 05:01 pm Arnaud Patard

linux-user: increment MAX_ARG_PAGES

There's a error When doing something like that :
find / -type f -print0 | xargs -0 echo

[ done in a arm chroot with qemu-arm and linux binfmt stuff or with
find / -type f -print0 | qemu-arm -L <path> <path>/usr/bin/xargs -0...

917507b0 07/08/2009 05:01 pm Arnaud Patard

linux-user: check some parameters for some socket syscalls.

This patch is fixing following issues :

- commit 8fea36025b9d6d360ff3b78f88a84ccf221807e8 was applied to
do_getsockname instead of do_accept.
- Some syscalls were not checking properly the memory addresses passed...

7b8118e8 07/08/2009 05:01 pm vibi sreenivasan

linux-user/syscall.c: remove warning: ‘array’ may be used uninitialized in this function

Removes the following warning

CC i386-linux-user/syscall.o
cc1: warnings being treated as errors
/media/nfs/qemu/linux-user/syscall.c: In function ‘do_syscall’:
/media/nfs/qemu/linux-user/syscall.c:2219: warning: ‘array’ may be used uninitialized in this function...

67ba57f6 07/08/2009 05:01 pm Riku Voipio

configure: remove bogus linux-user check

linux-user=yes is not a reliable identifier that linux-user targets
have been selected. user targets can be selected via --target-list
as well.

e8d2a887 07/05/2009 11:33 pm Blue Swirl

Fix the PCI header type of APB

Signed-off-by: Blue Swirl <>

e36f5877 07/05/2009 09:50 pm Blue Swirl

Update OpenBIOS images to r505

For Sparc64, this fixes the PCI bridge configuration bugs revealed by the
improved bridge handling (b7ee1603c16c1feb0d439d2ddf6cf824119d0aab).

Signed-off-by: Blue Swirl <>

98846d73 07/05/2009 11:11 am Blue Swirl

Fix Sparse warning

Signed-off-by: Blue Swirl <>

8676188b 07/03/2009 10:25 pm Blue Swirl

Work around Solaris gas problem

Signed-off-by: Blue Swirl <>

600309b6 07/03/2009 08:44 pm Blue Swirl

Rename target_cpu to target_arch2

Signed-off-by: Blue Swirl <>

cbbfacc6 07/03/2009 08:23 pm Jan Kiszka

monitor: Fix typo in documentation

Signed-off-by: Jan Kiszka <>

98070ce0 07/03/2009 04:28 am Nathan Froyd

target-mips: fix MADD and MSUB/MSUBU instructions

MADD was not correctly writing to HI.

MSUB/MSUBU are specified as `HI||LO - product', not `product - HI||LO'.

Signed-off-by: Nathan Froyd <>
Signed-off-by: Aurelien Jarno <>

7d69c52e 07/02/2009 08:54 pm Stefan Weil

Fix hxtool.

When converting from hx to texi format, hxtool (or to be
more precise sh which interprets hxtool) used standard
shell expansion of wildcards while writing lines to the
output.

Thus, something like "Password: **"
looked very different in the generated documentation....

6ad8702a 07/02/2009 08:07 pm Jan Kiszka

Use ctz64 in favor of ffsll

Not all host platforms support ffsll.

Signed-off-by: Jan Kiszka <>

1447379b 07/02/2009 05:20 pm malc

Respect the standard

3da6abd4 07/01/2009 11:29 pm Blue Swirl

Use pstrcpy and pstrcat to avoid OpenBSD linker warning

Signed-off-by: Blue Swirl <>

97b35e35 07/01/2009 10:30 pm Blue Swirl

Suppress a GCC warning

Signed-off-by: Blue Swirl <>

6cb9c6d3 07/01/2009 10:11 pm Blue Swirl

Fix breakage by obsolete _P() for good

Signed-off-by: Blue Swirl <>

22d091b3 07/01/2009 09:49 pm Blue Swirl

Fix sdl_zoom compile problems on OpenBSD

Signed-off-by: Blue Swirl <>

d43277c5 07/01/2009 09:24 pm Blue Swirl

Fix missing strnlen problems

Fix missing strnlen (a GNU extension) problems by using qemu_strnlen
used for user emulators also for system emulators.

Signed-off-by: Blue Swirl <>

57a943c4 06/30/2009 05:47 pm malc

Fix typo

Signed-off-by: malc <>

9c7f170e 06/30/2009 02:10 pm Paul Brook

Remove bogus -Werror

Revert rules.mak changes from aba800a. These should not have been here
to start with.

Signed-off-by: Paul Brook <>

a08d4367 06/29/2009 10:18 pm Jan Kiszka

Revert "Introduce reset notifier order"

This reverts commit 8217606e6edb49591b4a6fd5a0d1229cebe470a9 (and
updates later added users of qemu_register_reset), we solved the
problem it originally addressed less invasively.

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

f3353c6b 06/29/2009 10:18 pm Jan Kiszka

monitor: Add completion for help command

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

15dfcd45 06/29/2009 10:18 pm Jan Kiszka

monitor: Refactor acl commnds

Refactor the ACL monitor interface to make full use of the monitor
command dispatcher. This also gives proper help formatting and command
completion. Note that 'acl allow' and 'acl deny' were combined to
'acl_add aclname match allow|deny [index]' for consistency reasons....

3a31f36a 06/29/2009 10:18 pm Jan Kiszka

x86: Factor out pc_new_cpu

At this point, this refactoring looks like overkill. But we will need it
for CPU hotplugging, and qemu-kvm already carries it. Merging it early
would help qemu-kvm when rebasing against upstream.

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

059b8b1e 06/29/2009 10:18 pm Jan Kiszka

KVM: x86: Refactor persistent CPU state

This patch aligns the KVM-related layout and encoding of the CPU state
to be saved to disk or migrated with qemu-kvm. The major differences are
reordering of fields and a compressed interrupt_bitmap into a single
number as there can be no more than one pending IRQ at a time....

229609dd 06/29/2009 10:18 pm Jan Kiszka

sdl: Fix memory leakage

Valgrind was so kind to remark that no one bothers to release keycodes
after use and that something is fishy about cleaning up the requested
keyboard descriptor. With this patch applied, we no longer leak about
12k during startup....

74efd61a 06/29/2009 10:18 pm Jan Kiszka

slirp: tftp: Relax filename format check

[ Applies on top of my recently posted slirp series. ]

Allow tftp requests with filenames that do not start with a slash.

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

7d4c3d53 06/29/2009 10:18 pm Markus Armbruster

Replace -no-virtio-balloon by -balloon

We want to do (at least) two things to the virtio-balloon device:
suppress it, and control its PCI address. Option -no-virtio-balloon
lets us do only the former. To get the latter, replace
-no-virtio-balloon with
...

e34af2ce 06/29/2009 10:18 pm Juan Quintela

move CONFIG_* values from yes to y

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

0e22fd2f 06/29/2009 10:18 pm Juan Quintela

Substitute ifdef CONFIG_FOO by obj-

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

943e0a31 06/29/2009 10:18 pm Juan Quintela

Substitute ifdef CONFIG_FOO by obj-

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

5f877627 06/29/2009 10:18 pm Juan Quintela

Rename SOUND_HW to sound-obj-y

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

b6271b48 06/29/2009 10:18 pm Juan Quintela

Substitute ifdef CONFIG_FOO by sound-obj-

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

ae95ade0 06/29/2009 10:18 pm Juan Quintela

make tags useful for block drivers and hardaware devices

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

22afa7b5 06/29/2009 10:18 pm Kevin Wolf

block-raw: Allow pread beyond the end of growable images

When using O_DIRECT, qcow2 snapshots didn't work any more for me. In the
process of creating the snapshot, qcow2 tries to pwrite some new information
(e.g. new L1 table) which will often end up being after the old end of the...

3b88e52b 06/29/2009 10:18 pm Kevin Wolf

qcow2: Cache refcount blocks during snapshot creation

The really time consuming part of snapshotting is to adjust the reference count
of all clusters. Currently after each adjusted cluster the refcount block is
written to disk.

Don't write each single byte immediately to disk but cache all writes to the...

e9283f8b 06/29/2009 10:18 pm Jan Kiszka

monitor: Drop pci_addr prefix from hotplug commands

The "pci_addr=" prefix currently required by pci_add/remove and
drive_add has no practical use. Drop it, but still silently accept it
for backward compatibility.

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

8d2ba1fb 06/29/2009 10:18 pm Jan Kiszka

kvm: Rework VCPU synchronization

During startup and after reset we have to synchronize user space to the
in-kernel KVM state. Namely, we need to transfer the VCPU registers when
they change due to VCPU as well as APIC reset.

This patch refactors the required hooks so that kvm_init_vcpu registers...

a62acdc0 06/29/2009 10:18 pm Jan Kiszka

monitor: Make pci_add device options truely optional

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

4f3a1d56 06/29/2009 10:18 pm Juan Quintela

Rename OBJS to obj-y

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

c9e0df73 06/29/2009 10:18 pm Juan Quintela

Rename LIBOBJS to libobj-y

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

a8e492c0 06/29/2009 10:18 pm Juan Quintela

Rename OBJS to obj-y

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

319f08ea 06/29/2009 10:18 pm Juan Quintela

Rename BLOCK_OBJS to block-obj-y

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

eda959bd 06/29/2009 10:18 pm Juan Quintela

Rename AUDIO_OBJS to audio-obj-y

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

f835ed1c 06/29/2009 10:18 pm Juan Quintela

Rename SLIRP_OBJS to slirp-obj-y

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

78892528 06/29/2009 10:18 pm Juan Quintela

Rename XEN_OBJS to xen-obj-y

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

e11b1dce 06/29/2009 10:18 pm Juan Quintela

Rename USER_OBJS to user-obj-y

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

6ef859b3 06/29/2009 10:18 pm Juan Quintela

Rename OBJS to obj-y

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