Statistics
| Branch: | Revision:

root @ 80465e80

# Date Author Comment
c00b2808 04/24/2012 05:50 pm Eduardo Habkost

configure: rename $datadir to $qemu_datadir

The variable is used for the qemu-specific directory and has a different
meaning of the autoconf "datadir" variable (that's used for the
$prefix/share directory, not for $prefix/share/PACKAGE).

This doesn't change behavior or interfaces, it's just an internal...

850da188 04/24/2012 05:50 pm Eduardo Habkost

configure: rename $docdir to $qemu_docdir

The autoconf "docdir" variable is used for the program-specific
subdirectory, but anyway it's better to make it clear that the variable
is used for the qemu-specific subdirectory path.

Signed-off-by: Eduardo Habkost <>...

10ea68b3 04/24/2012 05:50 pm Eduardo Habkost

configure: rename $confdir to $qemu_confdir

There's no "confdir" variable on Autoconf, but it's good to make it
clear that it's a variable for the Qemu-specific subdirectory inside
$sysconfdir.

Signed-off-by: Eduardo Habkost <>
Signed-off-by: Anthony Liguori <>

eb72952b 04/24/2012 05:50 pm Eduardo Habkost

create_config: separate section for qemu_*dir variables (v2)

The generic dir section will eventually go away and be replaced with
qemu_
section. By now, both sections will be kept, while the variables
get renamed on config-host.mak.

With this patch, a XXXdir variable will become a CONFIG_QEMU_XXXDIR...

6aae2a2e 04/24/2012 05:50 pm Eduardo Habkost

config-host.mak: rename datadir to qemu_datadir

Autoconf concept of "datadir" is supposed to be "$prefix/share", not
"$prefix/share/PACKAGE", so using datadir for the Qemu-specific
directory is confusing.

The current C code that uses CONFIG_QEMU_DATADIR should be safe, as now...

22d07038 04/24/2012 05:50 pm Eduardo Habkost

config-host.mak: rename confdir to qemu_confdir

$confdir is a confusing name, as it's not clear if it's "the system
config dir" or "the Qemus-specific directory inside the config dir".
$qemu_confdir makes it more clear.

The current C code that uses CONFIG_QEMU_CONFDIR should be safe, as now...

80465e80 04/24/2012 05:50 pm Eduardo Habkost

Makefile: use $(qemu_confdir) instead of $(sysconfdir)/qemu

Instead of hardcoding the directory suffix, use the qemu-specific
directory variable.

Signed-off-by: Eduardo Habkost <>
Signed-off-by: Anthony Liguori <>

e739a48e 04/24/2012 05:04 pm Andreas Färber

target-cris: QOM'ify CPU

Embed CPUCRISState as first member of QOM CRISCPU.

Let CPUClass::reset() call cpu_state_reset() for now.

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

1c3b52fb 04/24/2012 05:04 pm Andreas Färber

target-cris: QOM'ify CPU reset

Move code from cpu_state_reset() into QOM cris_cpu_reset().
Let CPU init call cpu_reset().

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

aa0d1267 04/24/2012 05:04 pm Andreas Färber

target-cris: Start QOM'ifying CPU init

Move VR-independent code from cpu_cris_init() into an initfn.

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

b77f98ca 04/24/2012 05:04 pm Andreas Färber

target-microblaze: QOM'ify CPU

Embed CPUMBState as first member of QOM MicroBlazeCPU.

Let CPUClass::reset() call cpu_state_reset() for now.

Signed-off-by: Andreas Färber <>
Tested-by: Peter A. G. Crosthwaite <>...

61b6208f 04/24/2012 05:04 pm Andreas Färber

target-microblaze: QOM'ify CPU reset

Move code from cpu_state_reset() to QOM mb_cpu_reset().

Signed-off-by: Andreas Färber <>
Tested-by: Peter A. G. Crosthwaite <>

d0e71ef5 04/24/2012 05:04 pm Andreas Färber

target-microblaze: QOM'ify CPU init

Move code from cpu_mb_init() to a QOM initfn.

Signed-off-by: Andreas Färber <>
Tested-by: Peter A. G. Crosthwaite <>
[AF: Leave cpu_reset() call in cpu_mb_init()]

092dfc77 04/23/2012 11:02 pm Anthony Liguori

Merge remote-tracking branch 'origin/master' into staging

  • origin/master:
    qtest: fix memread and memwrite on 32 bit hosts
64546784 04/23/2012 10:29 pm Anthony Liguori

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

  • qmp/queue/qmp:
    qapi: g_hash_table_find() instead of GHashTableIter.
    qmp: make block job command naming consistent
ce6bf17a 04/23/2012 10:28 pm Blue Swirl

qtest: fix memread and memwrite on 32 bit hosts

Use PRIx64 to print 64 bit values to avoid truncation
on 32 bit hosts.

Reviewed-by: Anthony Liguori <>
Signed-off-by: Blue Swirl <>

1f8bcac0 04/23/2012 10:27 pm Anthony Liguori

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

  • kwolf/for-anthony: (38 commits)
    qemu-iotests: Fix test 031 for qcow2 v3 support
    qemu-iotests: Add -o and make v3 the default for qcow2
    qcow2: Zero write support
    qemu-iotests: Test backing file COW with zero clusters...
cb4c2548 04/23/2012 10:15 pm Anthony Liguori

Merge remote-tracking branch 'origin/master' into staging

  • origin/master:
    fix BCD mask for date (Solaris 2.5 guest hang fix)
02f5da11 04/23/2012 08:01 pm Artyom Tarasenko

fix BCD mask for date (Solaris 2.5 guest hang fix)

Fix BCD mask for date. The most visible effect of this patch is
Solaris 2.5.1 doesn't hang at boot if the day of month is >21.

Signed-off-by: Artyom Tarasenko <>
Signed-off-by: Blue Swirl <>

54699633 04/23/2012 07:49 pm Anthony Liguori

Merge remote-tracking branch 'origin/master' into staging

  • origin/master: (27 commits)
    target-arm: Move reset handling to arm_cpu_reset
    target-arm: Drop cpu_reset_model_id()
    target-arm: Move cache ID register setup to cpu specific init fns
    target-arm: Move OMAP cp15_i_{max,min} reset to cpu_state_reset...
57a33d89 04/23/2012 07:03 pm NODA, Kai

qapi: g_hash_table_find() instead of GHashTableIter.

GHashTableIter was first introduced in glib 2.16.
This patch removes it in favor of older g_hash_table_find()
for better compatibility with RHEL5.

Signed-off-by: NODA, Kai <>
Signed-off-by: Luiz Capitulino <>

db58f9c0 04/23/2012 07:02 pm Stefan Hajnoczi

qmp: make block job command naming consistent

The block streaming and job commands used '_' instead of '-' for reasons
of compatibility with libvirt, which already included support for the
'_' naming. However, the semantics of block_job_cancel have changed and...

53878a13 04/23/2012 05:58 pm Anthony Liguori

Merge remote-tracking branch 'sstabellini/build_fix' into staging

  • sstabellini/build_fix:
    xen: add a dummy xc_hvm_inject_msi for Xen < 4.2
    xen,configure: detect Xen 4.2
6b032966 04/23/2012 05:58 pm Anthony Liguori

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

  • stefanha/trivial-patches:
    Add .gitignore for tests/
    e1000: Fix spelling (segmentaion -> segmentation) in debug output
    spice-qemu-char.c: Show what name is unsupported
    pflash_cfi01: remove redundant line...
25896d80 04/23/2012 05:58 pm Anthony Liguori

Merge remote-tracking branch 'mdroth/qga-pull-4-19-12' into staging

  • mdroth/qga-pull-4-19-12:
    qemu-ga: fix help output
    qemu-ga: generate missing stubs for fsfreeze
bec8eb81 04/23/2012 05:58 pm Anthony Liguori

Merge remote-tracking branch 'bonzini/nbd-next' into staging

  • bonzini/nbd-next:
    nbd: obey FUA on reads
    nbd: do not include block_int.h
    nbd: do not block in nbd_wr_sync if no data at all is available
    nbd: consistently return negative errno values...
4a1873fc 04/23/2012 05:57 pm Anthony Liguori

Merge remote-tracking branch 'bonzini/scsi-next' into staging

  • bonzini/scsi-next:
    scsi: add SANITIZE command
    SCSI emulation: should tell the guest that we actually support thin provisioning
    SCSI emulation: Support unmap via WRITE_SAME_10.
    scsi: advertise DPOFUA...
e5e38957 04/23/2012 05:57 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/tracing' into staging

  • stefanha/tracing:
    tracetool: handle DTrace keywords 'in', 'next', 'self'
    tracetool: Add MAINTAINERS info
    tracetool: Add support for the 'dtrace' backend
    tracetool: Add support for the 'ust' backend...
3c30dd5a 04/21/2012 09:13 pm Peter Maydell

target-arm: Move reset handling to arm_cpu_reset

Now that cpu_reset_model_id() has gone we can move the
reset code over to the class reset function and have cpu_state_reset
simply do a reset on the CPU QOM object.

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

caa1d077 04/21/2012 09:13 pm Peter Maydell

target-arm: Drop cpu_reset_model_id()

cpu_reset_model_id() is now empty and we can remove it.

Signed-off-by: Peter Maydell <>
Acked-by: Andreas Färber <>

85df3786 04/21/2012 09:12 pm Peter Maydell

target-arm: Move cache ID register setup to cpu specific init fns

Move cache ID register reset out of cpu_reset_model_id() by
creating a field for the reset value in ARMCPU and setting it
up in the cpu specific init functions.

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

8092d2f0 04/21/2012 09:12 pm Peter Maydell

target-arm: Move OMAP cp15_i_{max,min} reset to cpu_state_reset

Move the OMAP-specific cp15_i_{max,min} reset to cpu_state_reset;
since these registers are only accessible on CPUs with the
OMAPCP feature set there's no need to guard this reset with
either a CPUID or feature bit check....

2e4d7e3e 04/21/2012 09:11 pm Peter Maydell

target-arm: Move feature register setup to per-CPU init fns

Move feature register value setup to per-CPU init functions.

Signed-off-by: Peter Maydell <>
Acked-by: Andreas Färber <>

0cc892fd 04/21/2012 09:11 pm Peter Maydell

target-arm: Move iWMMXT wCID reset to cpu_state_reset

Move the iWMMXT wCID reset to cpu_state_reset(). Since
we use the same value for all CPUs with this feature
(with the major/minor revision fields set to the QEMU
specific 'Q' value) there's no need to create an ARMCPU...

4e851c38 04/21/2012 09:11 pm Peter Maydell

target-arm: Drop JTAG_ID documentation

None of the machines in QEMU offer a JTAG debug interface, so this info
was unused. Further, the PXA250 ID contradicts the February 2002
Developer's Manual, which has it as 0xn9264013 with n the MIDR Revision.

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

0ca7e01c 04/21/2012 09:10 pm Peter Maydell

target-arm: Move SCTLR reset value setup to per cpu init fns

Move the reset value of SCTLR to ARMCPU, initialised in
the per-cpu init functions. It can then be reset by a
simple copy, and we can drop the code from cpu_reset_model_id().

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

64e1671f 04/21/2012 09:09 pm Peter Maydell

target-arm: Move CTR setup to per cpu init fns

Move CTR (cache type register) value to an ARMCPU field
set up by per-cpu init fns.

Signed-off-by: Peter Maydell <>
Acked-by: Andreas Färber <>

bd35c355 04/21/2012 09:09 pm Peter Maydell

target-arm: Move MVFR* setup to per cpu init fns

Move the MVFR* VFP feature register values to ARMCPU,
so they are set up by the implementation-specific instance
init functions rather than in cpu_reset_model_id().

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

325b3cef 04/21/2012 09:08 pm Peter Maydell

target-arm: Move FPSID config to cpu init fns

Move the reset FPSID to the ARMCPU struct, and set it in the
per-implementation instance init function. At reset we then
just copy the reset value into the CPUARMState field.

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

581be094 04/21/2012 09:07 pm Peter Maydell

target-arm: Move feature bit settings to CPU init fns

Move the setting of the feature bits from cpu_reset_model_id()
to each CPU's instance init function. This requires us to move
the features field in CPUARMState so that it is not cleared
on reset.

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

777dc784 04/21/2012 09:06 pm Peter Maydell

target-arm: Add QOM subclasses for each ARM cpu implementation

Register subclasses for each ARM CPU implementation.

Let arm_cpu_list() enumerate CPU subclasses in alphabetical order,
except for special value "any".

Replace cpu_arm_find_by_name()'s string -> CPUID lookup by storing the...

ce854d7c 04/21/2012 09:04 pm Benoit Canet

target-arm: remind to keep arm features in sync with linux-user/elfload.c

Signed-off-by: Benoit Canet <>
Signed-off-by: Peter Maydell <>

75f05e4f 04/21/2012 04:33 pm Blue Swirl

Merge branch 'arm-devs.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm

  • 'arm-devs.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm:
    versatiblepb: add NOR flash support
    hw/arm_mptimer: Reset the qemu_timer at reset
    versatilepb: add ds1338 rtc device...
c3ca0467 04/21/2012 04:28 pm Stefan Weil

tci: GETPC macro must return an uintptr_t

Change the data type of tci_tb_ptr, so GETPC returns an
uintptr_t now (like for all other TCG targets).

This completes commit 2050396801ca0c8359364d61eaadece951006057
and fixes builds with TCI.

Signed-off-by: Stefan Weil <>...

a896d03b 04/21/2012 04:27 pm Peter Maydell

gdbstub: Synchronize CPU state unconditionally in gdb_set_cpu_pc

Synchronize the CPU state via cpu_sychronize_state() unconditionally
in gdb_set_cpu_pc() rather than only in some of the target ifdef
ladder cases.

We can divide the CPUs into three categories:...

0eb4fc81 04/21/2012 04:26 pm Juan Quintela

softfloat: make USE_SOFTFLOAT_STRUCT_TYPES compile

This change makes it compile and return the same value than the #undef one.

Signed-off-by: Juan Quintela <>
Reviewed-by: Peter Maydell <>
Acked-by: Andreas Färber <>...

536a98d4 04/21/2012 04:24 pm Max Filippov

target-xtensa: add tests for LOOPNEZ and LOOPGTZ

Signed-off-by: Max Filippov <>
Signed-off-by: Blue Swirl <>

b18b37f7 04/21/2012 04:24 pm Max Filippov

target-xtensa: fix LOOPNEZ/LOOPGTZ translation

Translation of LOOP instructions used to call LEND SR write handler to
update LEND and invalidate relevant TBs. Now that LEND SR write handler
ends TB, LOOPNEZ and LOOPGTZ generate wrong code (same as for simple...

f91837a7 04/21/2012 10:10 am Blue Swirl

qtest: add m48t59 tests for Sparc

Add simple m48t59 qtests, enable test only for Sparc32
and Sparc64. On PPC, the device is behind PCI bus.

Signed-off-by: Blue Swirl <>

964c695a 04/20/2012 06:39 pm Eric Benard

versatiblepb: add NOR flash support

- add support for the 64MB NOR CFI01 flash available at
0x34000000 on the versatilepb board
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0225d/BBAJIHEC.html

- tested with barebox bootloader

Signed-off-by: Eric Bénard <>...

d1157ca4 04/20/2012 06:38 pm Oskar Andero

realview: break out versatile i2c controller code

The versatile i2c controller implementation was separated to
its own file called versatile_i2c.c. This is done as a preparation
for adding i2c support to the versatilepb board.

Signed-off-by: Oskar Andero <>...

b1f05696 04/20/2012 06:38 pm Oskar Andero

versatilepb: add ds1338 rtc device

Add ds1338 rtc attached on i2c.

Signed-off-by: Oskar Andero <>
Signed-off-by: Peter Maydell <>

bdac1c1e 04/20/2012 06:38 pm Peter Maydell

hw/arm_mptimer: Reset the qemu_timer at reset

On reset of the mpcore timer/watchdog block we need to
delete the qemu_timer in case it was running.

Signed-off-by: Peter Maydell <>

ee3a315e 04/20/2012 04:57 pm Paolo Bonzini

qemu-iotests: add a simple test for write_zeroes

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

ab3a32ad 04/20/2012 04:57 pm Kevin Wolf

qemu-iotests: Test backing file COW with zero clusters

Signed-off-by: Kevin Wolf <>

621f0589 04/20/2012 04:57 pm Kevin Wolf

qcow2: Zero write support

Signed-off-by: Kevin Wolf <>

89004368 04/20/2012 04:57 pm Kevin Wolf

qemu-iotests: Add -o and make v3 the default for qcow2

This adds an -o option to qemu-iotests, which is an option string that
is passed through to qemu-img create -o... This allows testing different
subformat with a command like './check -qcow2 -o compat=0.10'....

1042ec94 04/20/2012 04:57 pm Kevin Wolf

qemu-iotests: Fix test 031 for qcow2 v3 support

qcow2.py must be updated to work with version 3 images at all, the
output has changed since the feature table extension has been added, and
version 2 and version 3 images can't possibly have the same test output....

76dc9e0c 04/20/2012 04:57 pm Kevin Wolf

qcow2: Ignore reserved bits in refcount table entries

Signed-off-by: Kevin Wolf <>

afdf0abe 04/20/2012 04:57 pm Kevin Wolf

qcow2: Ignore reserved bits in check_refcounts

Also don't infer the cluster type directly from the L2 entries, but use
qcow2_get_cluster_type() to keep everything in a single place.

Signed-off-by: Kevin Wolf <>

6744cbab 04/20/2012 04:57 pm Kevin Wolf

qcow2: Version 3 images

This adds the basic infrastructure to qcow2 to handle version 3 images.
It includes code to create v3 images, allow header updates for v3 images
and checks feature bits.

It still misses support for zero clusters, so this is not a fully...

6377af48 04/20/2012 04:57 pm Kevin Wolf

qcow2: Support reading zero clusters

This adds support for reading zero clusters in version 3 images.

Signed-off-by: Kevin Wolf <>

cfcc4c62 04/20/2012 04:57 pm Kevin Wolf

qcow2: Support for feature table header extension

Instead of printing an ugly bitmask, qemu can now print a more helpful
string even for yet unknown features.

Signed-off-by: Kevin Wolf <>

8e37f681 04/20/2012 04:57 pm Kevin Wolf

qcow2: Ignore reserved bits in L1/L2 entries

This changes the still existing places that assume that the only flags
are QCOW_OFLAG_COPIED and QCOW_OFLAG_COMPRESSED to properly mask out
reserved bits.

It does not convert bdrv_check yet.

Signed-off-by: Kevin Wolf <>

c7a4c37a 04/20/2012 04:57 pm Kevin Wolf

qcow2: Refactor qcow2_free_any_clusters

Zero clusters will add another cluster type. Refactor the open-coded
cluster type detection into a switch of QCOW2_CLUSTER_* options so that
the detection is in a single place. This makes it easier to add new
cluster types....

143550a8 04/20/2012 04:57 pm Kevin Wolf

qcow2: Simplify count_cow_clusters

count_cow_clusters() tries to reuse existing functions, and all it
achieves is to make things much more complicated than they really are:
Everything needs COW, unless it's a normal cluster with refcount 1.

This patch implements the obvious way of doing this, and by using...

4fabffc1 04/20/2012 04:57 pm Kevin Wolf

Specification for qcow2 version 3

This updates the qcow2 specification to cover version 3. It contains the
following changes:

- Added compatible/incompatible/auto-clear feature bits plus an optional
feature name table to allow useful error messages even if an older...

90b27759 04/20/2012 04:57 pm Kevin Wolf

qcow2: Save disk size in snapshot header

This allows that different snapshots of an image can have different
sizes, which is a requirement for enabling image resizing even with
images that have internal snapshots.

We don't do the actual support for it now, but make sure that the...

68d000a3 04/20/2012 04:57 pm Kevin Wolf

qcow2: Ignore reserved bits in get_cluster_offset

With this change, reading from a qcow2 image ignores all reserved bits
that are set in an L1 or L2 table entry.

Now get_cluster_offset() assigns *cluster_offset only the offset without
any other flags. The cluster type is not longer encoded in the offset,...

2bfcc4a0 04/20/2012 04:57 pm Kevin Wolf

qcow2: Ignore reserved bits in count_contiguous_clusters()

Until now, count_contiguous_clusters() has an argument that allowed to
specify flags that should be ignored in the comparison, i.e. that are
allowed to change between contiguous clusters.

This patch changes the function so that it ignores all flags by default...

b0b6862e 04/20/2012 04:57 pm Kevin Wolf

qcow2: Fail write_compressed when overwriting data

qcow2_alloc_compressed_cluster_offset() already fails if the copied flag
is set, because qcow2_write_compressed() doesn't perform COW as it would
have to do to allow this.

However, what we really want to check here is whether the cluster is...

f24423bd 04/20/2012 04:56 pm Kevin Wolf

qcow2: Fix refcount block allocation during qcow2_alloc_cluster_at()

Refcount block allocation and refcount table growth rely on
s->free_cluster_index pointing to somewhere after the current
allocation. Change qcow2_alloc_cluster_at() to fulfill this
assumption....

fecccc44 04/20/2012 03:23 pm David Gibson

Add .gitignore for tests/

The new autotests in tests/ generate a number of files, both
executable and source, which are not caught by the existing .gitignore
files. This patch adds a new .gitignore in tests/ which covers these.

[Changed 'rtc-test' to '*-test' so future tests do not need to be added...

362f5fb5 04/20/2012 03:20 pm Stefan Weil

e1000: Fix spelling (segmentaion -> segmentation) in debug output

This was reported by https://bugs.launchpad.net/qemu/+bug/984476.

I also changed the case for 'error'.

Signed-off-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

0ed6dc1a 04/20/2012 03:14 pm Amos Kong

error.c: don't return value for void function

It is invalid to return a value from a function
returning void.

[C99 6.8.6.4 says "A return statement with an expression shall not
appear in a function whose return type is void" but gcc 4.6.3 with QEMU
compile flags does not complain. It's still worth fixing this. Stefan]...

4451b799 04/20/2012 03:14 pm Paolo Bonzini

fix block_job_set_speed name in documentation

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Stefan Hajnoczi <>

5f8daf2e 04/20/2012 03:14 pm Stefan Weil

qxl: Add missing GCC_FMT_ATTR and fix format specifier

val is an uint64_t, therefore %d was not correct.

Signed-off-by: Stefan Weil <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Stefan Hajnoczi <>

4d614548 04/20/2012 03:14 pm Eric Bénard

pflash_cfi01: remove redundant line

Signed-off-by: Eric Bénard <>
Reviewed-by: Peter Maydell <>
Signed-off-by: Stefan Hajnoczi <>

4f5c0177 04/20/2012 03:14 pm Eduardo Elias Ferreira

spice-qemu-char.c: Show what name is unsupported

Signed-off-by: Eduardo Elias Ferreira <>
Signed-off-by: Stefan Hajnoczi <>

29926112 04/20/2012 01:58 pm Andreas Färber

iotests: Resolve test failures caused by hostname

`hostname -s` may output an errror:
hostname: Name or service not known
This causes all tests to fail for `make check-block`.

Suppress such error messages, letting the tests succeed.

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

80ccf93b 04/20/2012 12:42 pm Liu Yuan

qemu-img: let 'qemu-img convert' flush data

The 'qemu-img convert -h' advertise that the default cache mode is
'writeback', while in fact it is 'unsafe'.

This patch 1) fix the help manual and 2) let bdrv_close() call bdrv_flush()

2) is needed because some backend storage doesn't have a self-flush...

90449c38 04/19/2012 09:52 pm Blue Swirl

sparc: fix qtest

Initialize TCG only when enabled.

Signed-off-by: Blue Swirl <>

e776bffb 04/19/2012 09:52 pm Blue Swirl

qtest: add dummy functions for user emulators

Allow qtest to be used also in files used for user emulators by
introducing dummy functions.

Signed-off-by: Blue Swirl <>

85215d41 04/19/2012 09:14 pm Blue Swirl

qtest: add register fuzzing to RTC test

Reviewed-by: Anthony Liguori <>
Signed-off-by: Blue Swirl <>

4bdd0416 04/19/2012 06:45 pm Michael Roth

qemu-ga: fix help output

Reviewed-by: Luiz Capitulino <>

d35d4cb5 04/19/2012 06:42 pm Michael Roth

qemu-ga: generate missing stubs for fsfreeze

When linux-specific commands (including guest-fsfreeze-*) were consolidated
under defined(linux), we forgot to account for the case where
defined(linux) && !defined(FIFREEZE). As a result stubs are no longer...

38ceff04 04/19/2012 06:19 pm Paolo Bonzini

nbd: do not include block_int.h

Signed-off-by: Paolo Bonzini <>

e25ceb76 04/19/2012 06:19 pm Paolo Bonzini

nbd: obey FUA on reads

Signed-off-by: Paolo Bonzini <>

9eb0bfca 04/19/2012 05:51 pm Paolo Bonzini

aio: simplify qemu_aio_wait

The do...while loop can never loop, because select will just not return
0 when invoked with infinite timeout.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

bcdc1857 04/19/2012 05:50 pm Paolo Bonzini

aio: return "AIO in progress" state from qemu_aio_wait

The definition of when qemu_aio_flush should loop is much simpler
than it looks. It just has to call qemu_aio_wait until it makes
no progress and all flush callbacks return false. qemu_aio_wait
is the logical place to tell the caller about this....

bafbd6a1 04/19/2012 05:37 pm Paolo Bonzini

aio: remove process_queue callback and qemu_aio_process_queue

Both unused after the previous patch.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

94e7340b 04/19/2012 05:36 pm Paolo Bonzini

nbd: consistently use ssize_t

GCC (pedantically, but correctly) considers that a negative ssize_t may
become positive when casted to int. This may cause uninitialized variable
warnings when a function returns such a negative ssize_t and is inlined.
Propagate ssize_t return types to avoid this....

fc19f8a0 04/19/2012 05:36 pm Paolo Bonzini

nbd: consistently check for <0 or >=0

This prepares for the following patch, which changes -1 return values
to negative errno.

Signed-off-by: Paolo Bonzini <>

185b4338 04/19/2012 05:36 pm Paolo Bonzini

nbd: consistently return negative errno values

In the next patch we need to look at the return code of nbd_wr_sync.
To avoid percolating the socket_error() ugliness all around, let's
handle errors by returning negative errno values.

Signed-off-by: Paolo Bonzini <>

7fe7b68b 04/19/2012 05:36 pm Paolo Bonzini

nbd: do not block in nbd_wr_sync if no data at all is available

Right now, nbd_wr_sync will hang if no data at all is available on the
socket and the other side is not going to provide any. Relax this by
making it loop only for writes or partial reads. This fixes a race...

dd3e8ac4 04/19/2012 05:36 pm Paolo Bonzini

nbd: avoid out of bounds access to recv_coroutine array

This can happen with a buggy or malicious server.

Reported-by: Michael Tokarev <>
Signed-off-by: Paolo Bonzini <>

adfe92f6 04/19/2012 05:35 pm Paolo Bonzini

posix-aio: merge posix_aio_process_queue and posix_aio_read

posix_aio_read already calls qemu_aio_process_queue, and dually
qemu_aio_process_queue is always followed by a select loop that calls
posix_aio_read.

No races are possible, so there is no need for a separate process_queue...

8a83205d 04/19/2012 05:30 pm Paolo Bonzini

qemu-tool: map vm_clock to rt_clock

QED uses vm_clock timers so that images are not touched during and after
migration. This however does not apply to qemu-io and qemu-img.
Treat vm_clock as a synonym for rt_clock there, and enable it.

Signed-off-by: Paolo Bonzini <>...

a5a5238e 04/19/2012 05:29 pm Paolo Bonzini

qemu-io: use main_loop_wait

This will let timers run during aio_read and aio_write commands,
though not during synchronous commands.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

3e46d87d 04/19/2012 05:26 pm Paolo Bonzini

scsi: add SANITIZE command

Signed-off-by: Paolo Bonzini <>