Statistics
| Branch: | Revision:

root @ a8aec295

# Date Author Comment
a8aec295 07/04/2013 06:42 pm Jan Kiszka

adlib: replace register_ioport*

Convert over to memory regions to obsolete register_ioport*.

CC: malc <>
Signed-off-by: Jan Kiszka <>
Signed-off-by: Paolo Bonzini <>

f487b677 07/04/2013 06:42 pm Paolo Bonzini

dma: keep a device alive while it has SGLists

Reviewed-by: Anthony Liguori <>
Signed-off-by: Paolo Bonzini <>

cac3c384 07/04/2013 06:37 pm Paolo Bonzini

scsi: keep device alive while it has requests

Reviewed-by: Anthony Liguori <>
Signed-off-by: Paolo Bonzini <>

6046c620 07/02/2013 09:17 am Paolo Bonzini

int128: optimize and add test cases

For add, the carry only requires checking one of the arguments.
For sub and neg, we can similarly optimize computation of the
carry.

For ge, we can just do lexicographic order.

Signed-off-by: Paolo Bonzini <>

1acd5a37 07/01/2013 05:03 pm Anthony Liguori

Merge remote-tracking branch 'agraf/ppc-for-upstream' into staging

  1. By Alexander Graf (12) and others
  2. Via Alexander Graf
    • agraf/ppc-for-upstream: (32 commits)
      PPC: Ignore writes to L2CR
      mac-io: Add escc-legacy memory alias region
      PPC: Newworld: Add second uninorth control register set...
f7d1f9d4 07/01/2013 05:02 pm Anthony Liguori

Merge remote-tracking branch 'cohuck/virtio-ccw-upstr' into staging

  1. By Cornelia Huck
  2. Via Cornelia Huck
    • cohuck/virtio-ccw-upstr:
      virtio-ccw: fix build breakage on windows

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

d75416ef 07/01/2013 05:02 pm Anthony Liguori

Merge remote-tracking branch 'luiz/queue/qmp' into staging

  1. By Kevin Wolf
  2. Via Luiz Capitulino
    • luiz/queue/qmp:
      hmp: Make "info block" output more readable

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

cc3ac9c4 07/01/2013 12:00 pm Cornelia Huck

virtio-ccw: fix build breakage on windows

event_notifier_get_fd() is not available on windows hosts. Fix this by
moving the calls to event_notifier_get_fd() to the kvm code.

Reported-by: Stefan Weil <>
Reviewed-by: Paolo Bonzini <>...

886b7577 07/01/2013 02:11 am Fabien Chouteau

PPC: Add dump_mmu() for 6xx

"(qemu) info tlb" is a very useful tool for debugging, so I implemented
the missing 6xx version.

Signed-off-by: Fabien Chouteau <>
[agraf: fix printfs on hwaddr to PRI]
Signed-off-by: Alexander Graf <>

b177d8b7 07/01/2013 02:11 am Fabien Chouteau

PPC: Fix GDB read on code area for PPC6xx

On PPC 6xx, data and code have separated TLBs. Until now QEMU was only
looking at data TLBs, which is not good when GDB wants to read code.

This patch adds a second call to get_physical_address() with an
ACCESS_CODE type of access when the first call with ACCESS_INT fails....

9761ad75 07/01/2013 02:11 am Alexander Graf

PPC: Introduce an alias cache for faster lookups

When running QEMU with "-cpu ?" we walk through every alias for every
target CPU we know about. This takes several seconds on my very fast
host system.

Let's introduce a class object cache in the alias table. Using that we...

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

PPC: Add clock-frequency export for Mac machines

Support in fwcfg has been around for exposure of the clock-frequency
CPU property. OpenBIOS reads it, we just never exposed it.

Since Mac OS X is very picky about its clock frequency values, let's
just take a known good value and always expose that....

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

PPC: Newworld: Add uninorth token register

Mac OS X expects the uninorth control register set to contain one
register that always reads back what it writes in. Expose that.

This is just a temporary hack. Eventually, we want to expose the
uninorth (/uni-n in device tree) as a separate QOM device....

593c1811 07/01/2013 02:11 am Alexander Graf

PPC: Newworld: Add second uninorth control register set

Mac OS X requires a second uninorth register set to be mapped a few
bytes above the first one. Let's just expose it to make it happy.

Signed-off-by: Alexander Graf <>

0d54a502 07/01/2013 02:11 am Alexander Graf

mac-io: Add escc-legacy memory alias region

Mac OS X's debugging serial driver accesses the ESCC through a different
register layout, called "escc-legacy". This layout differs from the normal
escc register layout purely by the location of the respective registers....

2345f1c0 07/01/2013 02:11 am Alexander Graf

PPC: Ignore writes to L2CR

The L2CR register contains a number of bits that either impose configuration
which we can't deal with or mean "something is in progress until the bit is
0 again".

Since we don't model the former and we do want to accomodate guests using the...

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

ab8131af 07/01/2013 02:11 am Bharat Bhushan

booke_ppc: limit booke timer to max when timeout overflow

Limit watchdog and fit timer to maximum timeout value which
qemu timer can support (INT64_MAX). This maximum timeout will be
hundreds of years, so limiting to max timeout is pretty safe.

Signed-off-by: Bharat Bhushan <>...

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

target-ppc: Introduce unrealizefn for PowerPCCPU

Use it to clean up the opcode table, resolving a former TODO from Jocelyn.
Also switch from malloc() to g_malloc().

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

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...
fbe2e26c 06/28/2013 11:14 pm Kevin Wolf

hmp: Make "info block" output more readable

HMP is meant for humans and you should notice it.

This changes the output format to use a bit more space to display the
information more readable and leaves out irrelevant information (e.g.
mention only that an image is encrypted, but not when it's not; display...

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

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