Statistics
| Branch: | Revision:

root @ b3e5e3e6

# Date Author Comment
b3e5e3e6 05/19/2010 06:04 pm Markus Armbruster

QMP: Add "Downstream extension of QMP" to spec

Signed-off-by: Markus Armbruster <>

0d5d4699 05/19/2010 04:24 pm Edgar E. Iglesias

microblaze: Update elf machine nums.

189 was allocated in upstream binutils.

0xbaab was the old temporary value. Still used by some tools and the
linux kernel.

I've seen 115 in older gdb versions, but lets ignore that one.

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

e4cbd44d 05/19/2010 04:09 pm Edgar E. Iglesias

microblaze: Add linux-user core dumping support.

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

fec0e3e8 05/19/2010 09:46 am Stefan Weil

Fix cross compilation

This patch enhances the algorithm which finds the correct settings for SDL.
For cross compilations (when cross_prefix is set), it looks for sdl-config
with cross prefix. Here is the complete search order:

$(cross_prefix}pkg-config (old, only used for cross compilation)...

6648e296 05/19/2010 09:46 am Richard Henderson

tcg-i386: Allocate call-saved registers first.

Signed-off-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

4ab50ccf 05/19/2010 09:46 am Richard Henderson

tcg-i386: Tidy initialization of tcg_target_call_clobber_regs.

Setting the registers one by one is easier to read, and gets
optimized by the compiler just the same.

Signed-off-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

d5900813 05/18/2010 10:23 pm Alexander Graf

target-s390: enable SIGP Initial Reset

For SMP to work with KVM, we need to properly emulate the SIGP Initial Reset
Command. Recent (2.6.32) kernels issue that before the SIGP Reset command that
actually wakes up the vcpu.

This patch makes -smp work on S390x....

3d78499a 05/18/2010 10:12 pm Thomas Monjalon

target-ppc: remove dead code

This function had been disabled from the beginning:
see 9fddaa0c0cabb610947146a79b4a9a38b0a216e5

cpu_reset() function is in target-ppc/helper.c

Signed-off-by: Thomas Monjalon <>
Acked-by: Alexander Graf <>...

fe270d04 05/18/2010 10:12 pm Alexander Graf

target-s390: add firmware code

This patch adds a firmware blob to the S390 target. The blob is a simple
implementation of a virtio client that tries to read the second stage
bootloader from sectors described as of offset 0x20 in the MBR.

In combination with an updated zipl this allows for booting from virtio...

c821c2bd 05/18/2010 09:21 pm Alexander Graf

PPC/KVM: make iothread work

When running with --enable-io-thread the timer we have doesn't help,
because it doesn't wake up the CPU thread. So instead we need to
actually kick it.

While at it I refined the logic a bit to not dumbly trigger a timer
every 500ms, but rather do it more often after an interrupt got injected....

a5829fd9 05/18/2010 08:56 pm TeLeMan

fix chardev_init for win32

chardev_init functions use socket,so socket_init() shoud be placed at
the front of chardev_init on win32.

Signed-off-by: TeLeMan <>
Signed-off-by: Aurelien Jarno <>

e23a22e6 05/18/2010 08:49 pm Jens Osterkamp

qemu-sockets: avoid strlen of NULL pointer

If the user wants to create a chardev of type socket but forgets to give a
host= option, qemu_opt_get returns NULL. This NULL pointer is then fed into
strlen a few lines below without a check which results in a segfault....

81bbe906 05/18/2010 08:30 pm takasi-y@ops.dti.ne.jp

linux-user: rlimit conversion between host and target.

rlim_t conversion between host and target added.
Otherwise there are some incorrect case like
- RLIM_INFINITY on 32bit target > 64bit host.
RLIM_INFINITY on 64bit host > mips and sparc target ?
Big value(for 32bit target) on 64bit host -> 32bit target....

c69ea0df 05/17/2010 10:32 pm Blue Swirl

Compile acpi_piix4, apm and pm_smbus only once

12 compilations less for the full build.

Signed-off-by: Blue Swirl <>

12941418 05/17/2010 09:17 pm Anthony Liguori

Merge remote branch 'kwolf/for-anthony' into staging

f7ce7287 05/17/2010 08:41 pm Anthony Liguori

Merge remote branch 'mst/for_anthony' into staging

7a6f3913 05/17/2010 11:20 am Christoph Hellwig

bochs: use qemu block API

Use bdrv_pwrite to access the backing device instead of pread, and
convert the driver to implementing the bdrv_open method which gives
it an already opened BlockDriverState for the underlying device.

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

b666d239 05/17/2010 11:20 am Kevin Wolf

block: Avoid unchecked casts for AIOCBs

Use container_of for one direction and &acb->common for the other one.

Signed-off-by: Kevin Wolf <>

20993081 05/17/2010 11:20 am Kevin Wolf

block: Fix protocol detection for Windows devices

We can't assume the file protocol for Windows devices, they need the same
detection as other files for which an explicit protocol is not specified.

Signed-off-by: Kevin Wolf <>

c3349197 05/17/2010 11:20 am Kevin Wolf

block: Fix bdrv_commit

When reopening the image, don't guess the driver, but use the same driver as
was used before. This is important if the format=... option was used for that
image.

Signed-off-by: Kevin Wolf <>

b76b6e95 05/17/2010 11:20 am Stefan Weil

block/vdi: Allow disk images of size 0

Even it is not very useful, users may create images of size 0.

Without the special option CONFIG_ZERO_MALLOC, qemu_mallocz
aborts execution when it is told to allocate 0 bytes,
so avoid this kind of call.

Cc: Kevin Wolf <>...

9d8b88f6 05/17/2010 11:20 am Christoph Hellwig

parallels: use pread

Use pread instead of lseek + read in preparation of using the qemu
block API.

Signed-off-by: Christoph Hellwig <>
Signed-off-by: Kevin Wolf <>

1dec5a70 05/17/2010 11:20 am Christoph Hellwig

parallels: use qemu block API

Use bdrv_pwrite to access the backing device instead of pread, and
convert the driver to implementing the bdrv_open method which gives
it an already opened BlockDriverState for the underlying device.

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

dede4188 05/17/2010 11:20 am Stefan Weil

block/vpc: Fix conversion from size to disk geometry

The VHD algorithm calculates a disk geometry
which is usually smaller than the requested size.

QEMU tried to round up but failed for certain sizes:

qemu-img create -f vpc disk.vpc 9437184
would create an image with 9435136 bytes...

cd02a24b 05/17/2010 11:20 am Christoph Hellwig

dmg: fix reading of uncompressed chunks

When dmg_read_chunk encounters an uncompressed chunk it currently
calls read without any previous adjustment of the file postion.

This seems very wrong, and the "reference" implementation in
dmg2img does a search to the same offset as done in the various...

16cdf7ce 05/17/2010 11:20 am Christoph Hellwig

dmg: use pread

Use pread instead of lseek + read in preparation of using the qemu
block API. Note that dmg actually uses the implicit file offset
a lot in dmg_open, and we had to replace it with an offset variable.

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

64a31d5c 05/17/2010 11:20 am Christoph Hellwig

dmg: use qemu block API

Use bdrv_pwrite to access the backing device instead of pread, and
convert the driver to implementing the bdrv_open method which gives
it an already opened BlockDriverState for the underlying device.

Dmg actually does an lseek to a negative offset in the open routine,...

f21dc3a4 05/17/2010 11:20 am Stefan Weil

block/vdi: Fix image opening and creation for odd disk sizes

The fix is based on a patch from Kevin Wolf. Here his comment:

"The number of blocks needs to be rounded up to cover all of the virtual hard
disk. Without this fix, we can't even open our own images if their size is not...

af474591 05/17/2010 11:20 am Bruce Rogers

use qemu_free() instead of free()

There is a call to free() where qemu_free() should instead be used.

Signed-off-by: Bruce Rogers <>
Signed-off-by: Kevin Wolf <>

21955137 05/17/2010 11:20 am Daniel P. Berrange

Fix docs for block stats monitor command

The 'parent' field in the 'query-blockstats' monitor command is
part of the top level block device QDict, not part of the 2nd
level 'stats' QDict.

  • block.c: Fix docs for 'parent' field in block stats monitor
    command output...
35ed5de6 05/17/2010 11:20 am Kevin Wolf

block: Remove special case for vvfat

The special case doesn't really us buy anything. Without it vvfat works more
consistently as a protocol. We get raw on top of vvfat now, which works just
as well as using vvfat directly.

Signed-off-by: Kevin Wolf <>

3abbc4d9 05/17/2010 11:20 am Stefan Hajnoczi

block: Remove semicolon in BDRV_SECTOR_MASK macro

Signed-off-by: Stefan Hajnoczi <>
Signed-off-by: Kevin Wolf <>

cb7cf0e3 05/17/2010 11:20 am Ryota Ozaki

qemu-nbd: Improve error reporting

- use err(3) instead of errx(3) if errno is available
to report why failed
- let fail prior to daemon(3) if opening a nbd file
is likely to fail after daemonizing to avoid silent
failure exit
- add missing 'ret = 1' when unix_socket_outgoing failed...

c94304be 05/17/2010 11:20 am Christoph Hellwig

cloop: use pread

Use pread instead of lseek + read in preparation of using the qemu
block API.

Signed-off-by: Christoph Hellwig <>
Signed-off-by: Kevin Wolf <>

20be49e4 05/17/2010 11:20 am Christoph Hellwig

cloop: use qemu block API

Use bdrv_pwrite to access the backing device instead of pread, and
convert the driver to implementing the bdrv_open method which gives
it an already opened BlockDriverState for the underlying device.

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

38d8dfa1 05/17/2010 11:20 am Kevin Wolf

ide: Fix ide_dma_cancel

When cancelling a request, bdrv_aio_cancel may decide that it waits for
completion of a request rather than for cancellation. IDE therefore can't
abandon its DMA status before calling bdrv_aio_cancel; otherwise the callback
of a completed request would use invalid data....

efbca10f 05/17/2010 11:20 am Christoph Hellwig

bochs: use pread

Use pread instead of lseek + read in preparation of using the qemu
block API.

Signed-off-by: Christoph Hellwig <>
Signed-off-by: Kevin Wolf <>

21ffd181 05/16/2010 11:33 am Blue Swirl

sparc: move DT and QT defines to op_helper.c

Signed-off-by: Blue Swirl <>

88c8e03f 05/16/2010 10:54 am Igor V. Kovalenko

sparc64: fix TT_WOTHER value

- fix off by one error in spill trap number bit for other window (must be bit 5)
- fixes invalid instruction issue with HelenOS

Signed-off-by: Igor V. Kovalenko <>
Signed-off-by: Blue Swirl <>

170f4c55 05/16/2010 10:54 am Igor V. Kovalenko

sparc64: fix mmu demap operand typo

- must use store address operand to demap, not store value

Signed-off-by: Igor V. Kovalenko <>
Signed-off-by: Blue Swirl <>

1012e960 05/15/2010 08:52 pm Blue Swirl

Update to a hopefully more future proof FSF address

See also 70539e1850ddd3a7ee6f9a8db7bd8e81b85225a4,
8167ee883931cb20c6264fc19d040ce2dc6ceaaa,
530e7615ce3c01882e582c84dc6304ab98a3d5c5 and
fad6cb1a565bb73f83fc0e2654489457b489e436.

Signed-off-by: Blue Swirl <>

0b8f9be6 05/15/2010 08:36 pm Blue Swirl

Trim unnecessary includes

Signed-off-by: Blue Swirl <>

ec51e364 05/15/2010 07:42 pm Isaku Yamahata

mc146818rtc: remove #ifdef DEBUG_CMOS.

remove #ifdef DEBUG_CMOS by using macro.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

019ea978 05/15/2010 07:41 pm Isaku Yamahata

apm: remove #ifdef DEBUG.

remove #ifdef DEBUG by using macro.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

50d8ff8b 05/15/2010 07:41 pm Isaku Yamahata

acpi_piix4: remove #ifdef DEBUG.

removed #ifdef DEBUG by using macro.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

b246eebb 05/15/2010 07:39 pm Isaku Yamahata

pm_smbus: remove #ifdef DEBUG.

remove #ifdef DEBUG by using macro.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

ac404095 05/15/2010 07:28 pm Isaku Yamahata

pci hotadd, acpi_piix4: remove global variables

remove global variables, gpe and pci0_status by moving them
into PIIX4PMState.

Signed-off-by: Blue Swirl <>
Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>...

87c30546 05/15/2010 07:26 pm Isaku Yamahata

pci hotplug: add argument to pci hot plug callback.

Add argument, DeviceState*, to pci hot plug callback.
The argument will be used later to remove global variable.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>...

e8ec0571 05/15/2010 07:24 pm Isaku Yamahata

acpi_piix4: qdevfy.

qdevfy acpi_piix4.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

1d914fa0 05/15/2010 07:21 pm Isaku Yamahata

rtc: make rtc_xxx accept/return ISADevice instead of RTCState.

To match rtc_xxx with qdev, make rtc_xxx accept and return ISADevice
instead of RTCState.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

e1460e47 05/15/2010 07:20 pm Isaku Yamahata

pc: move rtc declarations from pc.h into a dedicated header file.

Move rtc_xxx declarations from pc.h into mc146818rtc.h.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

845773ab 05/15/2010 06:53 pm Isaku Yamahata

pc: split out piix specific part from pc.c into pc_piix.c

Finally, we can safely split out the piix specific part from pc.c
into pc_piix.c.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

e3a5cf42 05/15/2010 06:52 pm Isaku Yamahata

pc: split out pci device init from pc_init1() into pc_pci_device_init()

Split out pci device initialization from pc_init1() into pc_pci_device_init().
and removed unnecessary braces.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>...

ffe513da 05/15/2010 06:51 pm Isaku Yamahata

pc: split out basic device init from pc_init1() into pc_basic_device_init()

Split out basic device, i.e. legacy devices like floppy, initialization
from pc_init1() into pc_basic_device_init().
Later it will be used.

Signed-off-by: Isaku Yamahata <>...

765d7908 05/15/2010 06:50 pm Isaku Yamahata

pc: split out vga initialization from pc_init1() into pc_vga_init().

Split out vga initialization which is independent of piix
from pc_init1() as pc_vga_init().
Later it will be used.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>...

3d53f5c3 05/15/2010 06:47 pm Isaku Yamahata

pc: split out memory allocation from pc_init1() into pc_memory_init()

Split out memory allocation and rom/bios loading which doesn't depend
on piix from pc_init1() into pc_memory_init().
Later it will be used.

Signed-off-by: Isaku Yamahata <>...

70166477 05/15/2010 06:45 pm Isaku Yamahata

pc: split out cpu initialization from pc_init1() into pc_cpus_init().

split out cpu initialization which is piix independent from pc_init1()
into pc_cpus_init(). Later it will be used.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>...

8e78eb28 05/15/2010 06:42 pm Isaku Yamahata

pc: make pc_init1() not refer ferr_irq directly.

By introducing a registering function, make pc_init1() not refer to
ferr_irq directly in order to make ferr_irq piix independent.
Later pc_init1() will be split out into another file keeping ferr_irq
static....

6f09e686 05/15/2010 06:41 pm Isaku Yamahata

pc: introduce a function to allocate cpu irq.

Introduce a function, pc_allocate_cpu_irq(), to allocate cpu irq
in order to make pic_irq_request() piix independent.
Later piix code will be split out to another file keeping pic_irq_request()
static.

Signed-off-by: Isaku Yamahata <>...

ec2654fb 05/15/2010 06:40 pm Isaku Yamahata

pc: remove global variable rtc_state by using qemu_irq.

Remove the reference to the global variable, rtc_state, by passing
function argument to cmos_init_hd(), cmos_init().

Signed-off-by: Isaku Yamahata <>
Cc: Paolo Bonzini <>...

01b9e8c1 05/15/2010 06:38 pm Isaku Yamahata

pc: remove a global variable, floppy_controller.

Remove a global variable, floppy_controller.
Since it is unnecessarily global, make it local and pass it as
a function argument.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>...

57864959 05/15/2010 06:37 pm Isaku Yamahata

pc: make an unnecessary global variable, pit, local.

remove unnecessary global static variables, pit.
Make it local.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

f885f1ea 05/15/2010 06:33 pm Isaku Yamahata

pc, i440fx: Make smm enable/disable function i440fx independent.

make cpu_smm_update() generic to be independent on i440fx by
registering a callback.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

b8d6f539 05/15/2010 06:32 pm Isaku Yamahata

pc: initialize ioapic before use.

The changeset of 2c8d9340203c7f19265fd4cb2341f568217a3af6
prevents isa_irq_handler() from NULL refering of IsaIrqState::ioapic.
However it would be better to initialize the member before reference.

Signed-off-by: Isaku Yamahata <>...

93d89f63 05/15/2010 06:30 pm Isaku Yamahata

acpi: split acpi.c into the common part and the piix4 part.

Split acpi.c into the common part and the piix4 specific part.
The common part will be used later.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>...

990b150e 05/15/2010 06:29 pm Isaku Yamahata

acpi: add acpi constants from linux header files and use them.

add acpi constants from linux header files and
replace the old constants with them.
The acpi constants will be used by other file.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>...

04762841 05/15/2010 06:27 pm Isaku Yamahata

acpi: split out apm register emulation from acpi.c

Split out apm register emulation for acpi.c into apm.c.
The apm emulation will be used later.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Cc: Aurelien Jarno <>...

fc0bdd99 05/15/2010 06:25 pm Isaku Yamahata

acpi: split out piix4 smbus routines from acpi.c into pm_smbus.c

Split out piix4 smbus routines from acpi.c into pm_smbus.c and
use it.
The split out smbus emulation will be used later.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>...

dc683910 05/15/2010 05:34 pm Jan Kiszka

mc146818rtc: Register vmstate via qdev

After defining the required alias ID, we can push vmstate registration
of mc146818rtc to qdev.

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

a64405d1 05/15/2010 05:33 pm Jan Kiszka

fdc: Register vmstate via qdev

Establish vmstate containers for ISA and sysbus variant, define the
iobase as instance ID alias, and let qdev do the vmstate registration
work.

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

1cc9f514 05/15/2010 05:32 pm Jan Kiszka

serial: Register vmstate via qdev

At least for isa-serial, we can already let qdev do the vmstate
registration for us. It just takes wrapping vmstate for the
encapsulating ISASerialState and defining the proper instance ID
aliases.

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

4d2ffa08 05/15/2010 05:23 pm Jan Kiszka

vmstate: Add support for alias ID

Some legacy users (mostly PC devices) of vmstate_register manage
instance IDs on their own, and that unfortunately in a way that is
incompatible with automatically generated ones. This so far prevents
switching those users to vmstates that are registered by qdev....

ec86f3e1 05/15/2010 05:02 pm Jan Kiszka

vmstate: Drop unused post_save handler

No device makes use of it anymore.

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

604be200 05/15/2010 04:57 pm Shin-ichiro KAWASAKI

sh: sm501: add 2D engine support

In linux kernel v2.6.33, sm501 frame buffer driver modified to support
2D graphics engine on sm501 chip. One example is "fill rectangle" operation.
But current qemu's sm501 emulation doesn't support it. This results in
graphics console disturbance....

e5d3b98d 05/15/2010 03:31 pm Andrzej Zaborowski

tmp105: update the register in post_load where it needs updating.

This was the only user of .post_save as noticed by Jan Kiszka and
seems to have been added there wrongly during conversion to
VMStateDescription.

Signed-off-by: Andrzej Zaborowski <>

26a82330 05/14/2010 10:32 pm Blue Swirl

cpus: add one 'const'

Signed-off-by: Blue Swirl <>

af2960f9 05/14/2010 10:32 pm Blue Swirl

e1000: make some tables 'const'

Signed-off-by: Blue Swirl <>

117e1e82 05/14/2010 10:32 pm Blue Swirl

ide: make a table 'const'

Signed-off-by: Blue Swirl <>

68f04a3c 05/14/2010 10:32 pm Blue Swirl

vga: make some tables 'const'

Signed-off-by: Blue Swirl <>

d08555c1 05/14/2010 10:31 pm Blue Swirl

Compile virtio-9p-debug and virtio-9p-local once

Signed-off-by: Blue Swirl <>

7ac9f9be 05/14/2010 06:56 pm Anthony Liguori

Merge remote branch 'qemu-kvm/uq/master' into staging

14ac15d3 05/14/2010 06:55 pm Anthony Liguori

Update SeaBIOS

- 7d09d0e Fix virtio compile errors on various gcc versions.
- 89acfa3 Support for booting from virtio disks
- 6d66316 smbios: avoid counting io hole as ram
- e5cd945 Fix error causing USB HID "boot" protocol to not be enabled.
- 0e88576 Add support for USB mice....
9c0afd0e 05/12/2010 10:27 pm Blue Swirl

apb: don't use any static state

Signed-off-by: Blue Swirl <>

5acd0646 05/12/2010 10:27 pm Blue Swirl

pckbd: don't use any static state

Signed-off-by: Blue Swirl <>

113c6106 05/12/2010 10:20 pm Stefan Weil

target-sparc: Fix wrong printf argument

cpu_get_ccr() returns a target_ulong, so a type cast is needed to avoid
wrong output on big endian hosts. We could also use TARGET_FMT_lx,
but that would print 8 instead of 2 digits.

Cc: Blue Swirl <>...

a72b5177 05/12/2010 09:57 pm Blue Swirl

Update OpenBIOS images to r771

Signed-off-by: Blue Swirl <>

57c3229b 05/12/2010 06:33 pm Michael S. Tsirkin

virtio-net: return with value in void function

virtio-net has return with value in a void function.
No idea why does it compile with gcc,
but this isn't standard C.

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

fae054b0 05/12/2010 06:07 pm Michael S. Tsirkin

virtio: invoke set_features on load

After migration, vhost was not getting features
acked because set_features callback was never invoked.
The fix is just to invoke that callback.

Reported-by: David L Stevens <>
Signed-off-by: Michael S. Tsirkin <>...

c3f8f611 05/12/2010 02:02 am Michael S. Tsirkin

pci: irq_state vmstate breakage

Code for saving irq_state got vm_state
macros wrong, passing in the wrong parameter.
As a result, we both saved a wrong value
and restored it to a wrong offset.

This leads to device and bus irq counts getting
out of sync, which in turn leads to interrupts getting lost or...

925fe64a 05/12/2010 01:59 am Alex Williamson

pci: cleanly backout of pci_qdev_init()

If the init function of a device fails, as might happen with device
assignment, we never undo the work done by do_pci_register_device().
This not only causes a bit of a memory leak, but also leaves a bogus
pointer in the bus devices array that can cause a segfault or...

c1667e40 05/11/2010 11:07 pm Gleb Natapov

kvm: fix 80000001.EDX supported bit filtering

On AMD some bits from 1.EDX are reported in 80000001.EDX. The mask used
to copy bits from 1.EDX to 80000001.EDX is incorrect resulting in
unsupported features passed into a guest.

Signed-off-by: Gleb Natapov <>...

4513d923 05/11/2010 08:03 pm Gleb Natapov

Do not stop VM if emulation failed in userspace.

Continue vcpu execution in case emulation failure happened while vcpu
was in userspace. In this case #UD will be injected into the guest
allowing guest OS to kill offending process and continue.

Signed-off-by: Gleb Natapov <>...

1a28cac3 05/11/2010 08:02 pm Marcelo Tosatti

make SIG_IPI to tcg vcpu thread reliable

Store tcg loop exit request on a global variable, and transfer it to
per-CPUState exit_request after assignment of cpu_single_env.

This makes exit request signal from robust. Drop the timedlock hack.

Signed-off-by: Marcelo Tosatti <>...

1fbb22e5 05/11/2010 08:02 pm Marcelo Tosatti

standardize on qemu_cpu_kick for signalling cpu thread(s)

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Avi Kivity <>

e82bcec2 05/11/2010 08:02 pm Marcelo Tosatti

port qemu-kvm's on_vcpu code

run_on_cpu allows to execute work on a given CPUState context.

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Avi Kivity <>

2705d56a 05/11/2010 08:02 pm Jan Kiszka

kvm: synchronize state from cpu context

It is not safe to retrieve the KVM internal state of a given cpu
while its potentially modifying it.

Queue the request to run on cpu context, similarly to qemu-kvm.

Signed-off-by: Marcelo Tosatti <>...

3ae9501c 05/11/2010 08:02 pm Marcelo Tosatti

add cpu_is_stopped helper

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Avi Kivity <>

ced6c051 05/11/2010 08:02 pm Marcelo Tosatti

move stop/stopped CPU_COMMON fields after area zeroed by reset

cpu_reset zeroes CPUState upto breakpoints member. Contents of
stop/stopped should not be zeroed on cpu_reset.

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Avi Kivity <>

dbaa07c4 05/11/2010 08:02 pm Jan Kiszka

kvm: validate context for kvm cpu get/put operations

Validate that KVM vcpu state is only read/written from cpu thread itself
or that cpu is stopped.

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Avi Kivity <>

0af691d7 05/11/2010 08:02 pm Marcelo Tosatti

kvm: enable smp > 1

Process INIT/SIPI requests and enable -smp > 1.

Signed-off-by: Marcelo Tosatti <>
Signed-off-by: Avi Kivity <>