Statistics
| Branch: | Revision:

root @ d6e58090

# Date Author Comment
d6e58090 03/25/2011 02:28 pm Ulrich Obergfell

severe memory leak caused by broken palette_destroy() function

The following commit breaks the code of the function palette_destroy().

http://git.kernel.org/?p=virt/kvm/qemu-kvm.git;a=commit;h=e31e3694afef58ba191cbcc6875ec243e5971268

The broken code causes a severe memory leak of 'VncPalette' structures...

05175535 03/25/2011 02:28 pm Peter Maydell

vl.c: Fix compilation failure if CONFIG_SDL isn't defined

Fix a compilation failure if CONFIG_SDL isn't defined (gcc complained
that the label 'invalid_display' wasn't used).

Signed-off-by: Peter Maydell <>
Signed-off-by: Anthony Liguori <>

56d7a964 03/24/2011 03:11 pm Anthony Liguori

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

24e838b7 03/24/2011 04:27 am Peter Maydell

tcg/arm: Support host code being compiled for Thumb

Although the TCG generated code is always in ARM mode, it is possible
that the host code was compiled by gcc in Thumb mode (this is often the
default for Linux distributions targeting ARM v7 only). Handle this...

4ac8e585 03/23/2011 02:05 am Anthony Liguori

Revert "x86: Save/restore PAT MSR"

This reverts commit c995b495b9d6e60ab1e390bd398a22425d0b3c8c.

From Jan Kiszka:

Ouch, indeed. Moreover, CPU_SAVE_VERSION was not updated (likely the
reason for the breakage). Thanks for debugging this!
Anthony (or whoever), please revert this unneeded commit in qemu.git....
a0843a68 03/22/2011 06:27 pm Anthony Liguori

vnc: fix build error from VNC_DIRTY_WORDS

Signed-off-by: Anthony Liguori <>

58fc096c 03/22/2011 03:39 pm Jes Sorensen

error message if user specifies SDL cmd line option when SDL is disabled

Signed-off-by: Jes Sorensen <>
Signed-off-by: Anthony Liguori <>

47b05369 03/22/2011 03:39 pm Jes Sorensen

error message if user specifies curses on cmd line when curses is disabled

Signed-off-by: Jes Sorensen <>
Signed-off-by: Anthony Liguori <>

821601ea 03/22/2011 03:39 pm Jes Sorensen

Make VNC support optional

Per default VNC is enabled.

Signed-off-by: Jes Sorensen <>
Signed-off-by: Anthony Liguori <>

ff73edf5 03/22/2011 03:39 pm Jes Sorensen

qmp-commands.hx: Clean up mess of client_migrate_info

client_migrate_info was put into qmp-commands.hx in the middle of
migrate_set_speed, between the command and it's description. In
addition client_migrate_info put the description before the command
itself, which is the wrong order....

6ed391bf 03/22/2011 03:39 pm Wen Congyang

fix vnc regression

This patch fix the following regression:
1. we should use bitmap_set() and bitmap_clear() to replace vnc_set_bits().

Signed-off-by: Wen Congyang <>
Signed-off-by: Anthony Liguori <>

ffe8b821 03/22/2011 03:39 pm Jes Sorensen

Consolidate DisplaySurface allocation in qemu_alloc_display()

This removes various code duplication from console.e and sdl.c

Signed-off-by: Jes Sorensen <>
Signed-off-by: Anthony Liguori <>

1472a95b 03/22/2011 03:39 pm Jes Sorensen

Introduce -display argument

This patch introduces a -display argument which consolidates the
setting of the display mode. Valid options are:
sdl/curses/default

Signed-off-by: Jes Sorensen <>
Signed-off-by: Anthony Liguori <>

4171d32e 03/22/2011 03:39 pm Jes Sorensen

Introduce -display none

New option -display none. This option differs from -nographic by not
trying to take control of stdio etc. but instead behaves as if a
graphics display is enabled, except that it doesn't show one.

Signed-off-by: Jes Sorensen <>...

3264ff12 03/22/2011 03:39 pm Jes Sorensen

Add support for -display vnc

Signed-off-by: Jes Sorensen <>
Signed-off-by: Anthony Liguori <>

6aae3df1 03/22/2011 08:59 am Peter Maydell

target-arm: use make_float32() to make constant floats for VRSQRTS

The preferred way to create a constant floating point value is to use
make_float32() rather than doing a runtime int32_to_float32().
Convert the code in the VRSQRTS helper to work this way....

dda3ec49 03/22/2011 08:59 am Peter Maydell

target-arm: Fix VRECPS edge cases handling

Correct the handling of edge cases for the VRECPS instruction: * this is a Neon instruction so uses the "standard FPSCR value" * (zero, inf) is a special case which returns 2.0

Signed-off-by: Peter Maydell <>...

7d2aabe2 03/22/2011 08:56 am Peter Maydell

target-arm: Fix TCG temporary leaks for scalar VMULL

Fix a TCG temporary leak when translating 32-bit scalar VMULL.

Signed-off-by: Peter Maydell <>
Signed-off-by: Aurelien Jarno <>

e1d177b9 03/22/2011 08:56 am Peter Maydell

target-arm: Set Q bit for overflow in SMUAD and SMLAD

SMUAD and SMLAD are supposed to set the Q bit if the addition of
the two 16x16 multiply products and optional accumulator overflows
considered as a signed value. However we were only doing this check
for the addition of the accumulator, not when adding the products,...

db6e2e65 03/22/2011 08:52 am Peter Maydell

target-arm: Fix GE bits for v6media signed modulo arithmetic

Fix the signed modulo arithmetic helpers for the v6media
instructions (SADD8, SSUB8, SADD16, SSUB16, SASX, SSAX) to set
the GE bits correctly (based on the result of the add or subtract
before it is truncated to 16 bits, not after)....

2a0308c5 03/22/2011 08:52 am Peter Maydell

target-arm: Fix UNDEF cases in Thumb load/store

Decode of Thumb load/store was merging together the cases of 'bit 11==0'
(reg+reg LSL imm) and 'bit 11==1' (reg+imm). This happens to work for
valid instruction patterns but meant that we would not UNDEF for the...

30cb4cde 03/22/2011 08:46 am Peter Maydell

linux-user: Fix unlock_user() call in return from poll()

Correct the broken attempt to calculate the third argument
to unlock_user() in the code path which unlocked the pollfd
array on return from poll() and ppoll() emulation. (This
only caused a problem if unlock_user() wasn't a no-op, eg...

43f20196 03/22/2011 08:44 am Jan Kiszka

vmmouse: Fix initialization

Latest refactorings left vmmouse nonfunctional behind. Fix it by adding
the required device initialization.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Aurelien Jarno <>

ff90d503 03/22/2011 08:44 am Jan Kiszka

vmmouse: Register vmstate via qdev

Signed-off-by: Jan Kiszka <>
Signed-off-by: Aurelien Jarno <>

663dc4e7 03/22/2011 08:44 am Jan Kiszka

vmmouse: Fix typo preventing x86-64 build

Signed-off-by: Jan Kiszka <>
Signed-off-by: Aurelien Jarno <>

7f90fa77 03/22/2011 08:42 am René Rebe

fix applesmc REV key

Fix applesmc REV key string literal hex encoding.

Signed-off-by: René Rebe <>
Acked-by: Alexander Graf <>
Signed-off-by: Aurelien Jarno <>

adf82011 03/22/2011 08:33 am René Rebe

enable kvm for ppc(32) on ppc64

ppc64 is backward compatible, likewise.

Signed-off-by: René Rebe <>
Acked-by: Alexander Graf <>
Signed-off-by: Aurelien Jarno <>

a0e13900 03/22/2011 08:17 am Fabien Chouteau

target-ppc: add support for 6 SPE instructions

Add support for 6 SPE instructions: evmra, evmwsmi{a{a}}, evmwumi{a{a}}

Signed-off-by: Fabien Chouteau <>
Reviewed-by: Nathan Froyd <>
Signed-off-by: Aurelien Jarno <>

59c9d9cf 03/22/2011 08:03 am Aurelien Jarno

pc-bios: update linuxboot.bin and multiboot.bin

Signed-off-by: Aurelien Jarno <>

75b9f690 03/22/2011 08:00 am Gleb Natapov

fix linuxboot.bin and multiboot.bin to not hijack int19

Currently linuxboot.bin and multiboot.bin option roms override int19
vector to intercept boot process. No sane option rom should do that.
Provide bev entry instead that will be called by BIOS if option rom...

31b7c261 03/22/2011 12:42 am Anthony Liguori

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

b784421c 03/22/2011 12:41 am Juan Quintela

Fix migration uint8 arrys handled

commit 82fa39b75181b730d6d4d09f443bd26bcfcd045c

only contains half of the fix. It forgots the save state fix for
UINT8 indexes.

Anthony, please apply, without this migration using hpet is broken.
(only current user).
...

8b06c62a 03/22/2011 12:41 am Anthony Liguori

seabios: update to latest git

- cc97564 Add config option to permit running option roms with bad checksums.
- 424f217 Add config option to disable MTRR initialization.
- fb2f10d Prep version for next release.
- f18b09b Update version to 0.6.2
- 20fcf9b lets pretend that RTC can be used to wakeup from S4...
bb98fe42 03/21/2011 10:46 pm Andreas Färber

softfloat: Drop [s]bits{8, 16, 32, 64} types in favor of [u]int{8, 16, 32, 64}_t

They are defined with the same semantics as the POSIX types,
so prefer those for consistency. Suggested by Peter Maydell.

Cc: Peter Maydell <>
Cc: Aurelien Jarno <>...

87b8cc3c 03/21/2011 10:46 pm Andreas Färber

softfloat: Resolve type mismatches between declaration and implementation

The original SoftFloat 2.0b library avoided the use of custom integer types
in its public headers. This requires the definitions of int{8,16,32,64} to
match the assumptions in the declarations. This breaks on BeOS R5 and Haiku/x86,...

8d725fac 03/21/2011 10:46 pm Andreas Färber

softfloat: Prepend QEMU-style header with derivation notice

The SoftFloat license requires "prominent notice that the work
is derivative". Having added features like improved 16-bit support
for arm already, add such a notice to the sources.

softfloat-native.[ch] are not under the SoftFloat license...

735e77ec 03/21/2011 10:43 pm Stefan Hajnoczi

e1000: Fix multi-descriptor packet checksum offload

The PCI/PCI-X Family of Gigabit Ethernet Controllers Software
Developer’s Manual states the following about the POPTS field:

Provides a number of options which control the handling of this
packet. This field is ignored except on the first data descriptor of...
aa315f95 03/21/2011 10:28 pm Aurelien Jarno

Merge branch 'for-anthony' of git://github.com/bonzini/qemu

  • 'for-anthony' of git://github.com/bonzini/qemu:
    remove qemu_get_clock
    add a generic scaling mechanism for timers
    change all other clock references to use nanosecond resolution accessors
    change all rt_clock references to use millisecond resolution accessors...
32465727 03/21/2011 10:28 pm Aurelien Jarno

Merge branch 'for-anthony' of git://repo.or.cz/qemu/kevin

  • 'for-anthony' of git://repo.or.cz/qemu/kevin:
    Add qcow2 documentation
    hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0
    Improve error handling in do_snapshot_blkdev()...
cc4e8741 03/21/2011 10:27 pm Aurelien Jarno

rbd: don't link with -lcrypto

rbd support tries to both link with -lrados and -lcrypto. While the
first one is of course necessary, the second is not necessary (only
librados ifself needs to link with libcrypto).

This fixes a licensing issue: qemu as a whole is GPL v2, and thus can't...

34933c8c 03/21/2011 10:04 pm Peter Maydell

hw/arm_sysctl.c: Add the Versatile Express system registers

Add support for the Versatile Express SYS_CFG registers, which provide
a generic means of reading or writing configuration information from
various parts of the board. We only implement shutdown and reset....

2d6c1ef4 03/21/2011 01:27 pm Amit Shah

char: Prevent multiple devices opening same chardev

Prevent:

-chardev socket,path=/tmp/foo,server,nowait,id=c0 \
-device virtserialport,chardev=c0,id=vs0 \
-device virtserialport,chardev=c0,id=vs1

Reported-by: Mike Cao <>
Signed-off-by: Amit Shah <>

f9a90f18 03/21/2011 01:26 pm Amit Shah

virtio-console: Keep chardev open for other users after hot-unplug

After a hot-unplug operation, the previous behaviour was to close the
chardev. That meant the chardev couldn't be re-used. Also, since
chardev hot-plug isn't possible so far, this means virtio-console...

32059220 03/21/2011 01:25 pm Amit Shah

virtio-serial: Enable ioeventfd

Enable ioeventfd for virtio-serial devices by default. Commit
25db9ebe15125deb32958c6df74996f745edf1f9 lists the benefits of using
ioeventfd.

Copying a file from guest to host over a virtio-serial channel didn't
show much difference in time or io_exit rate....

e9b382b0 03/21/2011 01:25 pm Amit Shah

virtio-serial-bus: Simplify handle_output() function

There's no code change, just re-arrangement to simplify the function
after recent modifications.

Reported-by: Juan Quintela <>
Signed-off-by: Amit Shah <>

fee063c0 03/21/2011 01:25 pm Amit Shah

virtio-serial: Don't clear ->have_data() pointer after unplug

After a port unplug operation, the port->info->have_data() pointer was
set to NULL. The problem is, the ->info struct is shared by all ports,
effectively disabling writes to other ports.

Reported-by: juzhang <>...

6b331efb 03/21/2011 01:25 pm Amit Shah

virtio-serial: Use a struct to pass config information from proxy

Instead of using a single variable to pass to the virtio_serial_init
function, use a struct so that expanding the number of variables to be
passed on later is easier.

Signed-off-by: Amit Shah <>

0b8b716d 03/21/2011 01:25 pm Amit Shah

virtio-serial: Disallow generic ports at id 0

Port 0 is reserved for virtconsole devices for backward compatibility
with the old -virtioconsole (from qemu 0.12) device type.

libvirt prior to commit 8e28c5d40200b4c5d483bd585d237b9d870372e5 used
port 0 for generic ports. libvirt will no longer do that, but disallow...

0ce1b948 03/21/2011 10:23 am Paolo Bonzini

add more helper functions with explicit milli/nanosecond resolution

The code doesn't make much sense right now, but it will as
soon as timers will be able to scale their resolution arbitrarily.

Signed-off-by: Paolo Bonzini <>

7bd427d8 03/21/2011 10:23 am Paolo Bonzini

change all rt_clock references to use millisecond resolution accessors

This was done with:

sed -i '/get_clock\>.*rt_clock/s/get_clock\>/get_clock_ms/' \
$(git grep -l 'get_clock\>.*rt_clock' )
sed -i '/new_timer\>.*rt_clock/s/new_timer\>/new_timer_ms/' \...
74475455 03/21/2011 10:23 am Paolo Bonzini

change all other clock references to use nanosecond resolution accessors

This was done with:

sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \
$(git grep -l 'qemu_get_clock\>' )
sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \
$(git grep -l 'qemu_new_timer\>' )...
4a998740 03/21/2011 10:23 am Paolo Bonzini

add a generic scaling mechanism for timers

This enables rt_clock timers to use nanosecond resolution, just by
using the _ns functions; there is really no reason to forbid that.

Migrated timers are all using vm_clock (of course; but I checked that
anyway) so the timers in the savevm files are already in nanosecond...

6d5ad9bf 03/21/2011 10:23 am Paolo Bonzini

remove qemu_get_clock

These patches are already not doing a great service to out-of-tree
modifications to QEMU. However, at least we can warn them by getting
rid of the old confusing functions, or otherwise causing compilation
errors. This patch removes qemu_get_clock; the previous one changed...

e0efb993 03/20/2011 11:39 pm Stefan Weil

Fix conversions from pointer to int and vice versa

Here the int values fds0, sigfd, s, sock and fd are converted
to void pointers which are later converted back to an int value.

These conversions should always use intptr_t instead of unsigned long.

They are needed for environments where sizeof(long) != sizeof(void *)....

d81e54de 03/19/2011 10:43 am Blue Swirl

petalogix_ml605_mmu: remove unused variable

Remove a write-only variable, spotted by GCC 4.6.0:
/src/qemu/hw/petalogix_ml605_mmu.c: In function 'petalogix_ml605_init':
/src/qemu/hw/petalogix_ml605_mmu.c:153:11: error: variable 'serial' set but not used [-Werror=unused-but-set-variable]...

44bc10d5 03/19/2011 10:30 am Blue Swirl

qemu-thread: delete unused functions

qemu_mutex_timedlock() and qemu_cond_timedwait() are no longer used.

Remove them and their helper timespec_add_ms().

Reported-by: François Revol <>
Signed-off-by: Blue Swirl <>

1a290aea 03/19/2011 10:29 am Stefan Weil

w32: Add missing functions qemu_mutex_destroy, qemu_cond_destroy

These functions were missing in commit
9257d46d55f1fe4e8209be9a6870e339ac3266fe.

Both functions are needed for compilations with
configuration --enable-vnc-thread.

Cc: Paolo Bonzini <>...

ca22a3a3 03/19/2011 10:29 am Jan Kiszka

i8254: Fix migration from older versions

qdev conversion broke migration as the previous version used vmstate
instance IDs derived from the iobase. Fix it by registering a legacy
alias.

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

dc7a09cf 03/16/2011 10:11 pm Jan Kiszka

Expose thread_id in info cpus

Based on patch by Glauber Costa:

To allow management applications like libvirt to apply CPU affinities to
the VCPU threads, expose their ID via info cpus. This patch provides the
pre-existing and used interface from qemu-kvm....

51e8fa60 03/16/2011 10:11 pm Jan Kiszka

kvm: Consider EXIT_DEBUG unknown without CAP_SET_GUEST_DEBUG

Without KVM_CAP_SET_GUEST_DEBUG, we neither motivate the kernel to
report KVM_EXIT_DEBUG nor do we expect such exits. So fall through to
the arch code which will simply report an unknown exit reason....

7cbb533f 03/16/2011 10:11 pm Jan Kiszka

kvm: Keep KVM_RUN return value in separate variable

Avoid using 'ret' both for the return value of KVM_RUN as well as the
code kvm_cpu_exec is supposed to return. Both have no direct relation.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Marcelo Tosatti <>

dc77d341 03/16/2011 10:11 pm Jan Kiszka

kvm: Reorder error handling of KVM_RUN

Test for general errors first as this is the slower path.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Marcelo Tosatti <>

d73cd8f4 03/16/2011 10:11 pm Jan Kiszka

kvm: Rework inner loop of kvm_cpu_exec

Let kvm_cpu_exec return EXCP_* values consistently and generate those
codes already inside its inner loop. This means we will now re-enter the
kernel while ret == 0.

Update kvm_handle_internal_error accordingly, but keep...

bb4ea393 03/16/2011 10:11 pm Jan Kiszka

kvm: Align kvm_arch_handle_exit to kvm_cpu_exec changes

Make the return code of kvm_arch_handle_exit directly usable for
kvm_cpu_exec. This is straightforward for x86 and ppc, just s390
would require more work. Avoid this for now by pushing the return code...

2a4dac83 03/16/2011 10:11 pm Jan Kiszka

kvm: x86: Reorder functions in kvm.c

Required for next patch which will access guest debug services from
kvm_arch_handle_exit. No functional changes.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Marcelo Tosatti <>

f2574737 03/16/2011 10:11 pm Jan Kiszka

kvm: x86: Push kvm_arch_debug to kvm_arch_handle_exit

There are no generic bits remaining in the handling of KVM_EXIT_DEBUG.
So push its logic completely into arch hands, i.e. only x86 so far.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Marcelo Tosatti <>

f2c1cc81 03/16/2011 10:11 pm Jan Kiszka

kvm: Add in-kernel irqchip awareness to cpu_thread_is_idle

With in-kernel irqchip support enabled, the vcpu threads sleep in kernel
space while halted. Account for this difference in cpu_thread_is_idle.

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

4601f7b0 03/16/2011 10:11 pm Jan Kiszka

kvm: x86: Do not leave halt if interrupts are disabled

When an external interrupt is pending but IF is cleared, we must not
leave the halt state prematurely.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Marcelo Tosatti <>

d841b6c4 03/16/2011 10:11 pm Jan Kiszka

kvm: Mark VCPU state dirty on creation

This avoids that early cpu_synchronize_state calls try to retrieve an
uninitialized state from the kernel. That even causes a deadlock if
io-thread is enabled.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Marcelo Tosatti <>

ebda377f 03/16/2011 10:11 pm Jan Kiszka

x86: Properly reset PAT MSR

Conforming to the Intel spec, set the power-on value of PAT also on
reset, but save it across INIT.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Marcelo Tosatti <>

c995b495 03/16/2011 10:11 pm Jan Kiszka

x86: Save/restore PAT MSR

Signed-off-by: Jan Kiszka <>
Signed-off-by: Marcelo Tosatti <>

0c03266a 03/16/2011 10:11 pm Jan Kiszka

kvm: x86: Synchronize PAT MSR with the kernel

Signed-off-by: Jan Kiszka <>
Signed-off-by: Marcelo Tosatti <>

d746ce6d 03/16/2011 04:18 pm Michal Simek

microblaze: Compile uart 16550 serial driver

Upcomming little endian platform will use 16550 serial driver.

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

93f1e401 03/16/2011 04:18 pm Edgar E. Iglesias

xilinx: Add AXIENET & DMA models

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

00914b7d 03/16/2011 04:18 pm Michal Simek

microblaze: Add PetaLogix ml605 MMU little-endian ref design

Add the first Microblaze little endian platform.
Platform uses uart16550, axi ethernet, timer, intc.

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

03feae73 03/16/2011 10:56 am Kevin Wolf

Add qcow2 documentation

This adds a description of the qcow2 file format to the docs/ directory.
Besides documenting what's there, which is never wrong, the document should
provide a good basis for the discussion of format extensions (called "qcow3"
in previous discussions)...

ad620c29 03/15/2011 10:49 pm Blue Swirl

win32: implement missing timersub

Implement and wrap timersub() for Win32.

Acked-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

31d3c9b8 03/15/2011 08:03 pm Stefan Hajnoczi

simpletrace: Move st_init() error reporting

User emulator builds do not have error_report() so it should not be used
by simpletrace.c. In fact, error reporting inside simpletrace.c is
inappropriate and should be done by the caller instead.

This patch moves st_init() error reporting out to its caller,...

1ab3c6c0 03/15/2011 07:36 pm Jan Kiszka

Implement qemu_kvm_eat_signals only for CONFIG_LINUX

qemu_kvm_eat_signals requires POSIX support with realtime extensions for
sigtimedwait. Not all our target platforms provide this. Moreover,
undefined sigbus_reraise was referenced on non-Linux as well....

1009d2ed 03/15/2011 07:36 pm Jan Kiszka

x86: Unbreak TCG support for hardware breakpoints

Commit 83f338f73e broke x86 hardware breakpoint emulation by moving the
debug exception handling out of cpu_exec. Fix this by moving all TCG
related bits back, only leaving the generic guest debugging parts in...

fd28aa13 03/15/2011 07:36 pm Jan Kiszka

s390: Detect invalid invocations of qemu_ram_free/remap

This both detects invalid invocations of qemu_ram_free and
qemu_ram_remap when mem_path is non-NULL and fixes a build error on
s390 ("'area' may be used uninitialized in this function").

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

40a892b7 03/15/2011 02:21 pm Stefan Weil

block/vdi: Don't ignore immediate read/write failures

This patch is similar to 171e3d6b9997c98a97d0c525867f7cd9b640cadd
which fixed qcow2:

Returning -EIO is far from optimal, but at least it's an error code.

Cc: Kevin Wolf <>
Signed-off-by: Stefan Weil <>...

5614c188 03/15/2011 02:21 pm Stefan Weil

block/qcow: Don't ignore immediate read/write and other failures

This patch is similar to 171e3d6b9997c98a97d0c525867f7cd9b640cadd
which fixed qcow2:

Returning -EIO is far from optimal, but at least it's an error code.

In addition to read/write failures, -EIO is also returned when...

e11480db 03/15/2011 02:21 pm Kevin Wolf

Add error message for loading snapshot without VM state

It already fails, but it didn't tell the user why.

Signed-off-by: Kevin Wolf <>
Reviewed-by: Juan Quintela <>

4e59b545 03/15/2011 02:21 pm Kevin Wolf

tools: Use real async.c instead of stubs

It's wrong to call BHs directly, even in tools. The only operations that
schedule BHs are called in a loop that (indirectly) contains a call to
qemu_bh_poll anyway, so we're not losing the scheduled BHs: Tools either use...

301db7c2 03/15/2011 02:21 pm Ryan Harper

Don't allow multiwrites against a block device without underlying medium

If the block device has been closed, we no longer have a medium to submit
IO against, check for this before submitting io. This prevents a segfault
further in the code where we dereference elements of the block driver....

b93af93d 03/15/2011 02:21 pm Brian Wheeler

Fix ATA SMART and CHECK POWER MODE

This patch fixes two things:

1) CHECK POWER MODE

The error return value wasn't always zero, so it would show up as
offline. Error is now explicitly set to zero.

2) SMART

The smart values that were returned were invalid and tools like skdump...

52f9a172 03/15/2011 02:21 pm Jes Sorensen

Improve error handling in do_snapshot_blkdev()

In case we cannot open the newly created snapshot image, try to fall
back to the original image file and continue running on that, which
should prevent the guest from aborting.

This is a corner case which can happen if the admin by mistake...

209bef3e 03/15/2011 02:21 pm Feiran Zheng

hw/xen_disk: aio_inflight not released in handling ioreq when nr_segments==0

In hw/xen_disk.c, async writing ioreq is leaked when
ioreq->req.nr_segments==0, because `aio_inflight` flag is not released
properly (skipped by misplaced "break").

Signed-off-by: Feiran Zheng <>...

c34d440a 03/15/2011 06:19 am Jan Kiszka

kvm: x86: Consolidate TCG and KVM MCE injection code

This switches KVM's MCE injection path to cpu_x86_inject_mce, both for
SIGBUS and monitor initiated events. This means we prepare the MCA MSRs
in the VCPUState also for KVM.

We have to drop the MSRs writeback restrictions for this purpose which...

32a42024 03/15/2011 06:19 am Jan Kiszka

kvm: x86: Clean up kvm_setup_mce

There is nothing to abstract here. Fold kvm_setup_mce into its caller
and fix up the error reporting (return code of kvm_vcpu_ioctl holds the
error value).

Signed-off-by: Jan Kiszka <>
CC: Huang Ying <>...

75d49497 03/15/2011 06:19 am Jan Kiszka

kvm: x86: Fail kvm_arch_init_vcpu if MCE initialization fails

There is no reason to continue if the kernel claims to support MCE but
then fails to process our request.

Signed-off-by: Jan Kiszka <>
CC: Huang Ying <>...

cd19cfa2 03/15/2011 06:19 am Huang Ying

Add qemu_ram_remap

qemu_ram_remap() unmaps the specified RAM pages, then re-maps these
pages again. This is used by KVM HWPoison support to clear HWPoisoned
page tables across guest rebooting, so that a new page may be
allocated later to recover the memory error....

3c85e74f 03/15/2011 06:19 am Huang Ying

KVM, MCE, unpoison memory address across reboot

In Linux kernel HWPoison processing implementation, the virtual
address in processes mapping the error physical memory page is marked
as HWPoison. So that, the further accessing to the virtual
address will kill corresponding processes with SIGBUS....

747461c7 03/15/2011 06:19 am Jan Kiszka

x86: Optionally avoid injecting AO MCEs while others are pending

Allow to tell cpu_x86_inject_mce that it should ignore Action Optional
MCE events when the target VCPU is still processing another one. This
will be used by KVM soon.

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

a7ada151 03/15/2011 06:19 am Jan Kiszka

Synchronize VCPU states before reset

This is required to support keeping VCPU states across a system reset.
If we do not read the current state before the reset,
cpu_synchronize_all_post_reset may write back incorrect state
information.

The first user of this will be MCE MSR synchronization which currently...

419fb20a 03/15/2011 06:19 am Jan Kiszka

kvm: x86: Move MCE functions together

Pure function suffling to avoid multiple #ifdef KVM_CAP_MCE sections,
no functional changes. While at it, annotate some #ifdef sections.

Signed-off-by: Jan Kiszka <>
CC: Huang Ying <>...

99036865 03/15/2011 06:19 am Jan Kiszka

kvm: Rename kvm_arch_process_irqchip_events to async_events

We will broaden the scope of this function on x86 beyond irqchip events.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Marcelo Tosatti <>

ab443475 03/15/2011 06:19 am Jan Kiszka

kvm: x86: Inject pending MCE events on state writeback

The current way of injecting MCE events without updating of and
synchronizing with the CPUState is broken and causes spurious
corruptions of the MCE-related parts of the CPUState.

As a first step towards a fix, enhance the state writeback code with...

d5bfda33 03/15/2011 06:19 am Jan Kiszka

x86: Run qemu_inject_x86_mce on target VCPU

We will use the current TCG-only MCE injection path for KVM as well, and
then this read-modify-write of the target VCPU state has to be performed
synchronously in the corresponding thread.

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