Statistics
| Branch: | Revision:

root @ f1ff0e89

# Date Author Comment
210b580b 07/01/2013 02:11 am Anthony Liguori

spapr-rtas: add CPU argument to RTAS calls

RTAS is a hypervisor provided binary blob that a guest loads and
calls into to execute certain functions. It's similar to the
vsyscall page in Linux or the short lived VMCI paravirt interface
from VMware.

The QEMU implementation of the RTAS blob is simply a passthrough...

ec4936e1 07/01/2013 02:11 am Stefan Weil

pseries: Fix compiler warning (conversion of pointer to integral value)

This kind of type cast must use uintptr_t or target_ulong to be portable
for hosts with sizeof(void *) != sizeof(long).

Here the value is assigned to a variable of type target_ulong....

4bddaf55 07/01/2013 02:11 am Alexey Kardashevskiy

target-ppc kvm: save cr register

This adds a missing code to save CR (condition register) via
kvm_arch_put_registers(). kvm_arch_get_registers() already has it.

Signed-off-by: Alexey Kardashevskiy <>
Signed-off-by: David Gibson <>...

f9de2da7 07/01/2013 02:11 am David Gibson

pseries: Update MAINTAINERS information

I'm no longer at IBM, and therefore no long actively working on the pseries
(aka sPAPR) qemu machine type. This patch removes my information in the
MAINTAINERS file.

While we're at it, I've added some extra file patterns for pseries specific...

f1ff0e89 07/01/2013 02:11 am Alexander Graf

Graphics: Switch to 800x600x32 as default mode

We have stayed at 800x600x15 as default graphics mode for the last 9 years.
If there ever was a reason to be there, surely nobody remembers it.

However, recently non-Linux PPC guests started to show bad effects on 15 bit...

cbe72019 07/01/2013 02:11 am Andreas Färber

intc/openpic: Convert to QOM realize

Split qdev initfn into instance_init and realize functions.
Change one occurrence of "klass" while at it.

Signed-off-by: Andreas Färber <>
Reviewed-by: Peter Crosthwaite <>...

dd49c038 07/01/2013 02:11 am Andreas Färber

intc/openpic_kvm: Fix QOM and build issues

Signed-off-by: Andreas Färber <>
Signed-off-by: Alexander Graf <>

1f1a83f4 07/01/2013 02:11 am Andreas Färber

mpc8544_guts: Fix MemoryRegion name

6544 -> 8544

Signed-off-by: Andreas Färber <>
Signed-off-by: Alexander Graf <>

43f691e9 07/01/2013 02:11 am Andreas Färber

mpc8544_guts: QOM'ify

Introduce type constant, cast macro and rename parent field.

Signed-off-by: Andreas Färber <>
Signed-off-by: Alexander Graf <>

7587ea5b 07/01/2013 02:11 am Andreas Färber

mpc8544_guts: Turn qdev initfn into instance_init

SysBus can deal with NULL SysBusDeviceClass::init since 4ce5dae.

Signed-off-by: Andreas Färber <>
Signed-off-by: Alexander Graf <>

1e3438df 07/01/2013 02:11 am Andreas Färber

target-ppc: Drop redundant flags assignments from CPU families

Previous code has #define POWERPC_INSNS2_<family> PPC_NONE in some
places for macrofied assignment to insns_flags2 field.

PPC_NONE is defined as zero though and QOM classes are zero-initialized,...

9fea2ae2 07/01/2013 02:11 am Hervé Poussineau

ppc: do not register IABR SPR twice for 603e

IABR SPR is already registered in gen_spr_603(), called from init_proc_603E().

Signed-off-by: Hervé Poussineau <>
Reviewed-by: Andreas Färber <>
Signed-off-by: Alexander Graf <>

159f8286 07/01/2013 02:11 am David Gibson

target-ppc: Change default machine for 64-bit

Currently, for qemu-system-ppc64, the default machine type is 'mac99'.
The mac99 machine is not being actively maintained, and represents a
bizarre hybrid of components that never actually existed as a real system....

7b774593 07/01/2013 02:11 am Alexander Graf

KVM: Export kvm_init_irq_routing

On PPC, we can have different types of interrupt controllers, so we really
only know that we are going to use one when we created it.

Export kvm_init_irq_routing() to common code, so that we don't have to call
kvm_irqchip_create()....

d07cc1f1 07/01/2013 02:11 am Alexander Graf

KVM: MSI: Swap payload to native endianness

The usual MSI injection mechanism writes msi.data into memory using an
le32 wrapper. So on big endian guests, this swaps msg.data into the
expected byte order.

For irqfd however, we don't swap the payload right now, rendering...

8935a442 07/01/2013 02:11 am Scott Wood

openpic: factor out some common defines into openpic.h

...for use by the KVM in-kernel irqchip stub.

Signed-off-by: Scott Wood <>
Signed-off-by: Alexander Graf <>

82fc73b6 07/01/2013 02:11 am Scott Wood

PPC: e500: factor out mpic init code

KVM in-kernel MPIC support is going to expand this even more,
so let's keep it contained.

Signed-off-by: Scott Wood <>
Signed-off-by: Alexander Graf <>

cb925cf9 07/01/2013 02:11 am Alexander Graf

KVM: PIC: Only commit irq routing when necessary

The current logic updates KVM's view of our interrupt map every time we
change it. While this is nice and bullet proof, it slows things down
badly for me. QEMU spends about 3 seconds on every start telling KVM what...

4be1db86 07/01/2013 02:11 am Alexander Graf

PPC: Add non-kvm stub file

There are cases where a kvm provided function is called from generic
hw code that doesn't know whether kvm is available or not. Provide
a stub file which can provide simple replacement functions for those
cases.

Signed-off-by: Alexander Graf <>...

d85937e6 07/01/2013 02:11 am Scott Wood

kvm/openpic: in-kernel mpic support

Enables support for the in-kernel MPIC that thas been merged into the
KVM next branch. This includes irqfd/KVM_IRQ_LINE support from Alex
Graf (along with some other improvements).

Note from Alex regarding kvm_irqchip_create():...

e1766344 07/01/2013 02:11 am Andreas Färber

intc/openpic: QOM'ify

Introduce type constant and cast macro.

Signed-off-by: Andreas Färber <>
Reviewed-by: Peter Crosthwaite <>
Signed-off-by: Alexander Graf <>

215e79c0 07/01/2013 02:11 am Alexander Graf

KVM: Don't assume that mpstate exists with in-kernel PIC always

On PPC, we don't support MP state. So far it's not necessary and I'm
not convinced yet that we really need to support it ever.

However, the current idle logic in QEMU assumes that an in-kernel PIC...

ffeec223 06/28/2013 11:48 pm Anthony Liguori

Merge remote-tracking branch 'mjt/trivial-patches' into staging

  1. By Gerd Hoffmann (13) and Michael Tokarev (1)
  2. Via Michael Tokarev
    • mjt/trivial-patches:
      doc: we use seabios, not bochs bios
      qemu-socket: don't leak opts on error
      qemu-char: report udp backend errors...
2ea3e2c1 06/28/2013 10:04 pm Markus Armbruster

qemu-char: Fix ID reuse after chardev-remove for qapi-based init

Commit 2c5f488 introduced qapi-based character device initialization
as a new code path in qemu_chr_new_from_opts(). Unfortunately, it
failed to store parameter opts in the new chardev. Therefore,...

43f420f8 06/28/2013 10:03 pm Gerd Hoffmann

console: Hook QemuConsoles into qom tree

Put them named "console[$index]" below "/backend", so you can
list & inspect them via QMP.

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

f0875536 06/28/2013 10:03 pm Gerd Hoffmann

gtk: add support for surface conversion

Also use CAIRO_FORMAT_RGB24 unconditionally. DisplaySurfaces will never
ever see 8bpp surfaces. And using CAIRO_FORMAT_RGB16_565 for the 16bpp
case doesn't seem to be a good idea too.

<quote src="/usr/include/cairo/cairo.h">...

12b7f57e 06/28/2013 10:02 pm Michael Tokarev

vl: convert -smp to qemu_opts_parse()

This also introduces a new suboption, "cpus=",
which is the default. So after this patch,

-smp n,sockets=y

is the same as

-smp cpus=n,sockets=y

(with "cpu" being some generic thing, referring to
either cores, or threads, or sockets, as before)....

390fb6b4 06/28/2013 10:01 pm Kevin Wolf

multiboot: Don't forget last mmap entry

When the BIOS returns ebx = 0, the current entry is still valid and
needs to be included in the Multiboot memory map.

Fixing this meant that using bx as the entry index doesn't work any
more because it's 0 on the last entry (and it was SeaBIOS-specific...

26a8ec07 06/28/2013 10:01 pm Kevin Wolf

multiboot: Calculate upper_mem in the ROM

The upper_mem field of the Multiboot information struct doesn't really
contain the RAM size - 1 MB like we used to calculate it, but only the
memory from 1 MB up to the first (upper) memory hole.

In order to correctly retrieve this information, the multiboot ROM now...

8a27c6a0 06/28/2013 10:01 pm Kevin Wolf

multiboot: Updated ROM binary

Signed-off-by: Kevin Wolf <>
Reviewed-by: Anthony Liguori <>
Message-id:
Signed-off-by: Anthony Liguori <>

6bedfe94 06/28/2013 10:01 pm Stefan Weil

arch_init: Fix format string by using RAM_ADDR_FMT

length is a ram_addr_t, so RAM_ADDR_FMT must be used instead of %ld.
This fixes a recently introduced regression for w64 builds.

Using RAM_ADDR_FMT also changes decimal output to sedecimal.
This is good here because length and block->length should both...

bb6fb7c0 06/28/2013 09:10 pm Gerd Hoffmann

qemu-char: add -chardev mux support

Allow to explicitly create mux chardevs on the command line,
like you can using QMP.

Signed-off-by: Gerd Hoffmann <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Michael Tokarev <>

58a3714c 06/28/2013 09:10 pm Gerd Hoffmann

qemu-char: report udp backend errors

Signed-off-by: Gerd Hoffmann <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Michael Tokarev <>

7a5b6af1 06/28/2013 09:10 pm Gerd Hoffmann

qemu-socket: don't leak opts on error

Signed-off-by: Gerd Hoffmann <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Michael Tokarev <>

a8ad4159 06/28/2013 09:10 pm Michael Tokarev

doc: we use seabios, not bochs bios

Signed-off-by: Michael Tokarev <>

afde3f8b 06/28/2013 09:10 pm Gerd Hoffmann

qemu-socket: zero-initialize SocketAddress

Signed-off-by: Gerd Hoffmann <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Michael Tokarev <>

c1204afc 06/28/2013 09:10 pm Gerd Hoffmann

qemu-socket: drop pointless allocation

Signed-off-by: Gerd Hoffmann <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Michael Tokarev <>

d1ec72a4 06/28/2013 09:10 pm Gerd Hoffmann

qemu-socket: catch monitor_get_fd failures

Signed-off-by: Gerd Hoffmann <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Michael Tokarev <>

e859eda5 06/28/2013 09:10 pm Gerd Hoffmann

qemu-char: check optional fields using has_*

Signed-off-by: Gerd Hoffmann <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Michael Tokarev <>

20c39760 06/28/2013 09:10 pm Gerd Hoffmann

qemu-char: use more specific error_setg_* variants

Signed-off-by: Gerd Hoffmann <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Michael Tokarev <>

fdca2124 06/28/2013 09:10 pm Gerd Hoffmann

qemu-char: print notification to stderr

Signed-off-by: Gerd Hoffmann <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Michael Tokarev <>

ef993ba7 06/28/2013 09:10 pm Gerd Hoffmann

qemu-char: fix documentation for telnet+wait socket flags

Signed-off-by: Gerd Hoffmann <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Michael Tokarev <>

e668287d 06/28/2013 09:10 pm Gerd Hoffmann

qemu-char: don't leak opts on error

Signed-off-by: Gerd Hoffmann <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Michael Tokarev <>

99aec012 06/28/2013 09:10 pm Gerd Hoffmann

qemu-char: use ChardevBackendKind in CharDriver

Signed-off-by: Gerd Hoffmann <>
Reviewed-by: Laszlo Ersek <>
Signed-off-by: Michael Tokarev <>

dc2c4eca 06/28/2013 09:10 pm Gerd Hoffmann

qemu-char: minor mux chardev fixes

mux failure path has a memory leak. creating a mux chardev can't
fail though, so just assert() that instead of fixing an error path
which never ever runs anyway ...

Also fix bid being leaked while being at it.

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

8a9c98ae 06/28/2013 07:48 pm Anthony Liguori

Merge remote-tracking branch 'afaerber/qom-cpu' into staging

  1. By Andreas Färber
  2. Via Andreas Färber
    • afaerber/qom-cpu: (24 commits)
      cpu: Turn cpu_unassigned_access() into a CPUState hook
      hwaddr: Make hwaddr type usable beyond softmmu
      cpu: Change qemu_init_vcpu() argument to CPUState...
36125631 06/28/2013 06:37 pm Anthony Liguori

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

  1. By Stefan Hajnoczi (11) and others
  2. Via Kevin Wolf
    • kwolf/for-anthony:
      cmd646: fix build when DEBUG_IDE is enabled.
      block: change default of .has_zero_init to 0
      vpc: Implement .bdrv_has_zero_init...
721da65c 06/28/2013 04:46 pm Mark Cave-Ayland

cmd646: fix build when DEBUG_IDE is enabled.

Make sure we use the correct TARGET/PRI macros in the debug statements.

Signed-off-by: Mark Cave-Ayland <>
CC: Kevin Wolf <>
Signed-off-by: Kevin Wolf <>

3ac21627 06/28/2013 02:52 pm Peter Lieven

block: change default of .has_zero_init to 0

.has_zero_init defaults to 1 for all formats and protocols.

this is a dangerous default since this means that all
new added drivers need to manually overwrite it to 0 if
they do not ensure that a device is zero initialized...

64f6b346 06/28/2013 02:25 pm Andreas Färber

gdbstub: Set gdb_set_stop_cpu() argument to CPUState

Use CPUState::env_ptr for now.

Prepares for changing cpu_handle_guest_debug() argument to CPUState.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

91325046 06/28/2013 02:25 pm Andreas Färber

cpus: Change cpu_handle_guest_debug() argument to CPUState

CPUArchState is no longer needed.

Prepares for changing qemu_kvm_cpu_thread_fn() opaque to CPUState.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

48a106bd 06/28/2013 02:25 pm Andreas Färber

cpus: Change qemu_kvm_start_vcpu() argument to CPUState

Pass it on to qemu_kvm_cpu_thread_fn().

Prepares for changing qemu_init_vcpu() argument to CPUState.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

10a9021d 06/28/2013 02:25 pm Andreas Färber

cpus: Change qemu_dummy_start_vcpu() argument to CPUState

Pass it to qemu_dummy_cpu_thread_fn().
Use CPUState::env_ptr for cpu_single_env.

Prepares for changing qemu_init_vcpu() argument to CPUState.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

c643bed9 06/28/2013 02:25 pm Andreas Färber

cpu: Change qemu_init_vcpu() argument to CPUState

This allows to move the call into CPUState's realizefn.
Therefore move the stub into libqemustub.a.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

ce927ed9 06/28/2013 02:25 pm Andreas Färber

hwaddr: Make hwaddr type usable beyond softmmu

While not normally needed for *-user, it can safely be used there since
always based on uint64_t, to avoid ifdeffery.

To avoid accidental uses, move the guards from exec/hwaddr.h to its
inclusion sites. No need for them in include/hw/....

c658b94f 06/28/2013 02:25 pm Andreas Färber

cpu: Turn cpu_unassigned_access() into a CPUState hook

Use it for all targets, but be careful not to pass invalid CPUState.
cpu_single_env can be NULL, e.g. on Xen.

Signed-off-by: Andreas Färber <>

fe31e737 06/28/2013 02:25 pm Andreas Färber

target-alpha: Register VMStateDescription for AlphaCPU

Commit b758aca1f6cdb175634812b79f5560c36c902d00 (target-alpha: Enable
the alpha-softmmu target.) introduced cpu_{save,load}() functions but
didn't define CPU_SAVE_VERSION, so they were never registered....

da697214 06/28/2013 02:25 pm Andreas Färber

target-openrisc: Register VMStateDescription for OpenRISCCPU

Since commit e67db06e9f6d7e514ee2a9b9b769ecd42977f6fb (target-or32: Add
target stubs and QOM cpu) a VMStateDescription existed, but
CPU_SAVE_VERSION was not set, so it was never registered.

Drop cpu_{save,load}() and register VMStateDescription via DeviceState....

8d0f2bae 06/28/2013 02:25 pm Andreas Färber

cpu: Guard cpu_{save,load}() definitions

A few targets already managed to implement cpu_save() and cpu_load()
without defining CPU_SAVE_VERSION that causes them to be registered.

Guard the prototypes with CPU_SAVE_VERSION to avoid this happening again
until all targets are converted to VMState (or QIDL)....

c52a6b67 06/28/2013 02:25 pm Andreas Färber

gdbstub: Simplify find_cpu()

Use qemu_get_cpu() and CPUState::env_ptr.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

dd1750d7 06/28/2013 02:25 pm Andreas Färber

kvm: Change kvm_cpu_synchronize_state() argument to CPUState

It no longer relies on CPUArchState since 20d695a.

Reviewed-by: liguang <>
Acked-by: Paolo Bonzini <>
Reviewed-by: Richard Henderson <>...

cb446eca 06/28/2013 02:25 pm Andreas Färber

kvm: Change cpu_synchronize_state() argument to CPUState

Change Monitor::mon_cpu to CPUState as well.

Reviewed-by: liguang <>
Acked-by: Paolo Bonzini <>
Signed-off-by: Andreas Färber <>

60a3e17a 06/28/2013 02:25 pm Andreas Färber

cpu: Change cpu_exit() argument to CPUState

It no longer depends on CPUArchState, so move it to qom/cpu.c.

Prepares for changing GDBState::c_cpu to CPUState.

Signed-off-by: Andreas Färber <>

a98ae1d8 06/28/2013 02:25 pm Andreas Färber

cpus: Change cpu_thread_is_idle() argument to CPUState

It no longer needs CPUArchState.

Prepares for changing all_cpu_threads_idle() CPU loop to CPUState and
needed for changing qemu_kvm_wait_io_event() argument to CPUState.

Reviewed-by: Richard Henderson <>...

fd529e8f 06/28/2013 02:25 pm Andreas Färber

cpus: Change qemu_kvm_wait_io_event() argument to CPUState

It no longer uses CPUArchState.

Prepares for changing qemu_kvm_cpu_thread_fn() opaque to CPUState.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

491d6e80 06/28/2013 02:25 pm Andreas Färber

kvm: Change kvm_set_signal_mask() argument to CPUState

CPUArchState is no longer needed.

Prepares for changing qemu_kvm_init_cpu_signals() argument to CPUState.

Acked-by: Paolo Bonzini <>
Reviewed-by: Richard Henderson <>...

13618e05 06/28/2013 02:25 pm Andreas Färber

cpus: Change qemu_kvm_init_cpu_signals() argument to CPUState

CPUArchState is no longer needed.

Prepares for changing qemu_kvm_cpu_thread_fn() opaque to CPUState.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

878096ee 06/28/2013 02:25 pm Andreas Färber

cpu: Turn cpu_dump_{state,statistics}() into CPUState hooks

Make cpustats monitor command available unconditionally.

Prepares for changing kvm_handle_internal_error() and kvm_cpu_exec()
arguments to CPUState.

Signed-off-by: Andreas Färber <>

5326ab55 06/28/2013 02:25 pm Andreas Färber

kvm: Change kvm_handle_internal_error() argument to CPUState

It no longer uses CPUArchState.

Prepares for changing kvm_cpu_exec() argument to CPUState.

Acked-by: Paolo Bonzini <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

1458c363 06/28/2013 02:25 pm Andreas Färber

kvm: Change kvm_cpu_exec() argument to CPUState

It no longer uses CPUArchState.

Prepares for changing qemu_kvm_cpu_thread_fn() opaque to CPUState.

Acked-by: Paolo Bonzini <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

76d5f029 06/28/2013 02:25 pm Andreas Färber

cpu: Fix cpu_class_set_vmsd() documentation

It's CPUClass::vmsd, not CPUState::vmsd.

Reviewed-by: liguang <>
Reviewed-by: Juan Quintela <>
Signed-off-by: Andreas Färber <>

19e3835c 06/28/2013 02:25 pm Andreas Färber

cpu: Introduce device_class_set_vmsd() helper

It's the equivalent to cpu_class_set_vmsd(), to assign
DeviceClass::vmsd. It wasn't needed before since only static,
unmigratable VMStateDescriptions were assigned so far.

Reviewed-by: Juan Quintela <>...

1a1562f5 06/28/2013 02:25 pm Andreas Färber

cpu: Introduce VMSTATE_CPU() macro for CPUState

To be used to embed common CPU state into CPU subclasses.

Reviewed-by: Juan Quintela <>
Signed-off-by: Andreas Färber <>

72c6cc94 06/28/2013 11:21 am Kevin Wolf

vpc: Implement .bdrv_has_zero_init

Depending on the subformat, has_zero_init on VHD must behave like raw
and query the underlying storage (fixed) or like other sparse formats
that can always return 1 (dynamic, differencing).

Signed-off-by: Kevin Wolf <>

3037f364 06/28/2013 10:20 am Stefan Hajnoczi

blockdev: add DriveBackup transaction

This patch adds a transactional version of the drive-backup QMP command.
It allows atomic snapshots of multiple drives along with automatic
cleanup if there is a failure to start one of the backup jobs.

Note that QMP events are emitted for block job completion/cancellation...

78b18b78 06/28/2013 10:20 am Stefan Hajnoczi

blockdev: add Abort transaction

The Abort action can be used to test QMP 'transaction' failure. Add it
as the last action to exercise the .abort() and .cleanup() code paths
for all previous actions.

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

0dbe8a1b 06/28/2013 10:20 am Stefan Hajnoczi

qemu-iotests: extract wait_until_completed() into iotests.py

The 'drive-mirror' tests often issue 'block-job-complete' and wait for
the QMP completion event. Other types of block jobs also want to wait
for completion but they may not need to issue 'block-job-complete'....

e5ca8fdd 06/28/2013 10:20 am Stefan Hajnoczi

qemu-iotests: add 055 drive-backup test case

Testing drive-backup is similar to image streaming and drive mirroring.
This test case is based on 041.

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

f59fee8d 06/28/2013 10:20 am Kevin Wolf

block: Make BlockJobTypes const

Signed-off-by: Kevin Wolf <>

0b3f21e6 06/28/2013 10:20 am Richard W.M. Jones

block/ssh: Set bdrv_has_zero_init according to the file type.

If the remote is a regular file, set it to true (ie. reads of
uninitialized areas in a newly created file will return zeroes).
If we can't prove that, return false (a safe default).

Tested by adding a debugging print statement [not part of this commit]...

8ab6feec 06/28/2013 10:20 am Kevin Wolf

gluster: Return bdrv_has_zero_init = 0

GlusterFS volumes can be backed by block devices, in which case
bdrv_create() doesn't make sure that the image is zeroed out. It is
currently not possibly to detect whether a given image is backed by a
file or a block device, and incorrectly assuming that it is zeroed...

8ed610a1 06/28/2013 10:20 am Fam Zheng

vmdk: remove wrong calculation of relative path

When creating image with backing file, the driver tries to calculate the
relative path from created image file to backing file, but the path
computation is incorrect. e.g.:

$ qemu-img create -f vmdk -b vmdk-data-disk.vmdk vmdk-data-snapshot1...
a5c5ea3f 06/28/2013 10:20 am Kevin Wolf

raw-posix: Fix /dev/cdrom magic on OS X

The raw-posix driver has code to provide a /dev/cdrom on OS X even
though it doesn't really exist. However, since commit c66a6157 the real
filename is dismissed after finding it, so opening /dev/cdrom fails.
Put the filename back into the options QDict to make this work again....

5dae8e5f 06/28/2013 10:20 am Stefan Hajnoczi

notify: add NotiferWithReturn so notifier list can abort

notifier_list_notify() has no return value. This is fine when we just
want to invoke side-effects.

Sometimes it's useful for notifiers to produce a return value. This
allows notifiers to "veto" an operation and will be used by the block...

d616b224 06/28/2013 10:20 am Stefan Hajnoczi

block: add bdrv_add_before_write_notifier()

The bdrv_add_before_write_notifier() function installs a callback that
is invoked before a write request is processed. This will be used to
implement copy-on-write point-in-time snapshots where we need to copy...

98d2c6f2 06/28/2013 10:20 am Dietmar Maurer

block: add basic backup support to block driver

backup_start() creates a block job that copies a point-in-time snapshot
of a block device to a target block device.

We call backup_do_cow() for each write during backup. That function
reads the original data from the block device before it gets...

cb78466e 06/28/2013 10:20 am Stefan Hajnoczi

blockdev: drop redundant proto_drv check

It is not necessary to check that we can find a protocol block driver
since we create or open the image file. This produces the error that we
need anyway.

Besides, the QERR_INVALID_BLOCK_FORMAT is inappropriate since the...

ac3c5d83 06/28/2013 10:20 am Stefan Hajnoczi

blockdev: use bdrv_getlength() in qmp_drive_mirror()

Use bdrv_getlength() for its byte units and error return instead of
bdrv_get_geometry().

Reported-by: Kevin Wolf <>
Reviewed-by: Eric Blake <>
Reviewed-by: Kevin Wolf <>...

99a9addf 06/28/2013 10:20 am Stefan Hajnoczi

block: add drive-backup QMP command

@drive-backup

Start a point-in-time copy of a block device to a new destination. The
status of ongoing drive-backup operations can be checked with
query-block-jobs where the BlockJobInfo.type field has the value 'backup'....

ba5d6ab6 06/28/2013 10:20 am Stefan Hajnoczi

blockdev: rename BlkTransactionStates to singular

The QMP 'transaction' command keeps a list of in-flight transactions.
The transaction state structure is called BlkTransactionStates even
though it only deals with a single transaction. The only plural thing...

f9ea81e8 06/28/2013 10:20 am Stefan Hajnoczi

blockdev: allow BdrvActionOps->commit() to be NULL

Some QMP 'transaction' types don't need to do anything on .commit().
Make .commit() optional just like .abort().

The "drive-backup" action will take advantage of this, it only needs to
cancel the block job on .abort(). Other block job actions will probably...

ec3f8c99 06/27/2013 11:38 pm Peter Maydell

linux-user: Fix compilation failure

Fix compilation failures for linux-user targets following recent
migration related commits bd2fa51fcd and 43487c67.

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

c394ace8 06/27/2013 04:48 pm Anthony Liguori

Merge remote-tracking branch 'quintela/migration.next' into staging

  1. By Michael R. Hines (9) and others
  2. Via Juan Quintela
    • quintela/migration.next:
      rdma: introduce capability x-rdma-pin-all
      rdma: new QEMUFileOps hooks
      rdma: introduce qemu_ram_foreach_block()...
9f05d0c3 06/27/2013 03:38 am Michael R. Hines

rdma: export yield_until_fd_readable()

The RDMA event channel can be made non-blocking just like a TCP
socket. Exporting this function allows us to yield so that the
QEMU monitor remains available.

Reviewed-by: Juan Quintela <>
Reviewed-by: Paolo Bonzini <>...

7e114f8c 06/27/2013 03:38 am Michael R. Hines

rdma: export throughput w/ MigrationStats QMP

This exposes throughput (in megabits/sec) through QMP.

Reviewed-by: Juan Quintela <>
Reviewed-by: Paolo Bonzini <>
Reviewed-by: Chegu Vinod <>
Tested-by: Chegu Vinod <>...

bc1256f7 06/27/2013 03:38 am Michael R. Hines

rdma: introduce qemu_file_mode_is_not_valid()

QEMUFileRDMA also has read and write modes. This function is now
shared to reduce code duplication.

Reviewed-by: Juan Quintela <>
Reviewed-by: Paolo Bonzini <>
Reviewed-by: Chegu Vinod <>...

be903b2a 06/27/2013 03:38 am Michael R. Hines

rdma: export qemu_fflush()

RDMA uses this to flush the control channel before sending its
own message to handle page registrations.

Reviewed-by: Juan Quintela <>
Reviewed-by: Paolo Bonzini <>
Reviewed-by: Chegu Vinod <>...

bd2fa51f 06/27/2013 03:38 am Michael R. Hines

rdma: introduce qemu_ram_foreach_block()

This is used during RDMA initialization in order to
transmit a description of all the RAM blocks to the
peer for later dynamic chunk registration purposes.

Reviewed-by: Juan Quintela <>
Reviewed-by: Paolo Bonzini <>...

43487c67 06/27/2013 03:38 am Michael R. Hines

rdma: new QEMUFileOps hooks

These are the prototypes and implementation of new hooks that
RDMA takes advantage of to perform dynamic page registration.

An optional hook is also introduced for a custom function
to be able to override the default save_page function....

60d9222c 06/27/2013 03:38 am Michael R. Hines

rdma: introduce capability x-rdma-pin-all

This capability allows you to disable dynamic chunk registration
for better throughput on high-performance links.

For example, using an 8GB RAM virtual machine with all 8GB of memory in
active use and the VM itself is completely idle using a 40 gbps infiniband link:...