OSDN Git Service

qmiga/qemu.git
12 years agostdio_fclose: return -errno on errors (v2)
Eduardo Habkost [Thu, 10 Nov 2011 12:41:45 +0000 (10:41 -0200)]
stdio_fclose: return -errno on errors (v2)

This is what qemu_fclose() expects.

Changes v1 -> v2:
 - Add braces to if statement to match coding style

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agostdio_pclose: return -errno on error (v3)
Eduardo Habkost [Thu, 10 Nov 2011 12:41:44 +0000 (10:41 -0200)]
stdio_pclose: return -errno on error (v3)

This is what qemu_fclose() expects.

Changes v1 -> v2:
 - On success, keep returning pclose() return value, instead of always 0.

Changes v2 -> v3:
 - Add braces on if statements to match coding style

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoqemu_fclose: return last_error if set (v3)
Eduardo Habkost [Thu, 10 Nov 2011 12:41:43 +0000 (10:41 -0200)]
qemu_fclose: return last_error if set (v3)

This will make sure no error will be missed as long as callers always
check for qemu_fclose() return value. For reference, this is the
complete list of qemu_fclose() callers:

 - exec_close(): already fixed to check for negative values, not -1
 - migrate_fd_cleanup(): already fixed to consider only negative values
   as error, not any non-zero value
 - exec_accept_incoming_migration(): no return value check (yet)
 - fd_accept_incoming_migration(): no return value check (yet)
 - tcp_accept_incoming_migration(): no return value check (yet)
 - unix_accept_incoming_migration(): no return value check (yet)
 - do_savevm(): no return value check (yet)
 - load_vmstate(): no return value check (yet)

Changes v1 -> v2:
 - Add small comment about the need to return previously-spotted errors

Changes v2 -> v3:
 - Add braces to "if" statements to match coding style

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agomigrate_fd_cleanup: accept any negative qemu_fclose() value as error
Eduardo Habkost [Thu, 10 Nov 2011 12:41:42 +0000 (10:41 -0200)]
migrate_fd_cleanup: accept any negative qemu_fclose() value as error

Also, we now return the qemu_fclose() value unchanged to the caller. For
reference, the migrate_fd_cleanup() callers are the following:

- migrate_fd_completed(): any negative value is considered an
  error, so the change is OK.
- migrate_fd_error(): doesn't check the migrate_fd_cleanup() return value
- migrate_fd_cancel(): doesn't check the migrate_fd_cleanup() return
  value

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoexec_close(): accept any negative value as qemu_fclose() error
Eduardo Habkost [Thu, 10 Nov 2011 12:41:41 +0000 (10:41 -0200)]
exec_close(): accept any negative value as qemu_fclose() error

Note that we don't return the unchanged return value back yet, because
we need to change all qemu_fclose() callers to accept any positive value
as success.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoQEMUFileCloseFunc: add return value documentation (v2)
Eduardo Habkost [Thu, 10 Nov 2011 12:41:40 +0000 (10:41 -0200)]
QEMUFileCloseFunc: add return value documentation (v2)

qemu_fclose() and QEMUFile->close will return -errno on error, and any
positive value on success.

We need the positive non-zero success values because
migration-exec.c:exec_close() relies on non-zero return values to get
the process exit code.

Changes v1 -> v2:
 - Cosmetic spelling change on comment text

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agosavevm: use qemu_file_set_error() instead of setting last_error directly
Eduardo Habkost [Thu, 10 Nov 2011 12:41:39 +0000 (10:41 -0200)]
savevm: use qemu_file_set_error() instead of setting last_error directly

Some code uses qemu_file_set_error() already, so use it everywhere
when setting last_error, for consistency.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agohw/usb-net.c: Fix precedence bug when checking rndis_state
Peter Maydell [Wed, 9 Nov 2011 21:09:23 +0000 (21:09 +0000)]
hw/usb-net.c: Fix precedence bug when checking rndis_state

"!X == 2" is always false (spotted by Coverity), so the checks
for whether rndis is in the correct state would never fire.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoRemove unnecessary casts from PCI DMA code in usb-uhci
David Gibson [Fri, 4 Nov 2011 01:03:38 +0000 (12:03 +1100)]
Remove unnecessary casts from PCI DMA code in usb-uhci

This patch removes some unnecessary casts in the usb-uhci device,
introduced by commit fff23ee9a5de74ab111b3cea9eec56782e7d7c50
'usb-uhci: Use PCI DMA stub functions'.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoRemove unnecessary casts from PCI DMA code in usb-ehci
David Gibson [Fri, 4 Nov 2011 01:03:37 +0000 (12:03 +1100)]
Remove unnecessary casts from PCI DMA code in usb-ehci

This patch removes some unnecessary casts in the usb-ehci device,
introduced by commit 68d553587c0aa271c3eb2902921b503740d775b6
'usb-ehci: Use PCI DMA stub functions'.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoRemove unnecessary casts from PCI DMA code in rtl8139
David Gibson [Fri, 4 Nov 2011 01:03:36 +0000 (12:03 +1100)]
Remove unnecessary casts from PCI DMA code in rtl8139

This patch removes some unnecessary casts in the rtl8139 device,
introduced by commit 3ada003aee2004d24f23b9cd6f4eda87d9601ddb
'rtl8139: Use PCI DMA stub functions'.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoRemove unnecessary casts from PCI DMA code in lsi53c895a
David Gibson [Fri, 4 Nov 2011 01:03:35 +0000 (12:03 +1100)]
Remove unnecessary casts from PCI DMA code in lsi53c895a

This patch removes some unnecessary casts in the lsi53c895a device,
introduced by commit 9ba4524cda1348cbe741535f77815dca6a57da05
'lsi53c895a: Use PCI DMA stub functions'.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoRemove unnecessary casts from PCI DMA code in PCI IDE
David Gibson [Fri, 4 Nov 2011 01:03:34 +0000 (12:03 +1100)]
Remove unnecessary casts from PCI DMA code in PCI IDE

This patch removes some unnecessary casts in the PCI IDE device,
introduced by commit 552908fef5b67ad9d96b76d7cb8371ebc26c9bc8
'PCI IDE: Use PCI DMA stub functions'.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoRemove unnecessary casts from PCI DMA code in e1000
David Gibson [Fri, 4 Nov 2011 01:03:33 +0000 (12:03 +1100)]
Remove unnecessary casts from PCI DMA code in e1000

This patch removes some unnecessary casts in the e1000 device,
introduced by commit 62ecbd353d25e62c4a6c327ea88ba5404e13507a 'e1000:
Use PCI DMA stub functions'.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoRemove unnecessary casts from PCI DMA code in eepro100
David Gibson [Fri, 4 Nov 2011 01:03:32 +0000 (12:03 +1100)]
Remove unnecessary casts from PCI DMA code in eepro100

This patch removes some unnecessary casts in the eepro100 device,
introduced by commit 16ef60c9a8eeee269f7cbc95219a431b1d7cbf29
'eepro100: Use PCI DMA stub functions'.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoMerge remote-tracking branch 'pmaydell/arm-devs.for-upstream' into staging
Anthony Liguori [Mon, 12 Dec 2011 16:08:57 +0000 (10:08 -0600)]
Merge remote-tracking branch 'pmaydell/arm-devs.for-upstream' into staging

12 years agoMerge remote-tracking branch 'qmp/queue/qmp' into staging
Anthony Liguori [Mon, 12 Dec 2011 16:08:08 +0000 (10:08 -0600)]
Merge remote-tracking branch 'qmp/queue/qmp' into staging

12 years agocris: Handle conditional stores on CRISv10
Stefan Sandstrom [Mon, 12 Dec 2011 10:38:31 +0000 (11:38 +0100)]
cris: Handle conditional stores on CRISv10

Signed-off-by: Stefan Sandstrom <Stefan.Sandstrom@axis.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
12 years agohw/mpcore.c: Merge with hw/arm11mpcore.c
Peter Maydell [Mon, 5 Dec 2011 14:09:18 +0000 (14:09 +0000)]
hw/mpcore.c: Merge with hw/arm11mpcore.c

hw/mpcore.c is now implementing only ARM11MPCore specific peripherals,
and is #included only from hw/arm11mpcore.c, so just merge it into that
file.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agohw/a9mpcore.c: Implement A9MP peripherals rather than 11MPcore ones
Peter Maydell [Thu, 1 Dec 2011 21:16:34 +0000 (21:16 +0000)]
hw/a9mpcore.c: Implement A9MP peripherals rather than 11MPcore ones

Implement the A9MP private peripheral region correctly, rather
than piggybacking on the 11MPCore code; the two CPUs are not the
same in this area.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agohw/mpcore: Clean up mpcore_priv_read/write as they are now SCU only
Peter Maydell [Mon, 5 Dec 2011 13:49:18 +0000 (13:49 +0000)]
hw/mpcore: Clean up mpcore_priv_read/write as they are now SCU only

The only code left in mpcore_priv_read and mpcore_priv_write is now
the implementation of the SCU registers. Clean up by renaming functions
and removing some unnecessary conditionals to make this clearer.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agohw/realview_gic: Use GIC memory region for the CPU interface
Peter Maydell [Mon, 5 Dec 2011 13:44:14 +0000 (13:44 +0000)]
hw/realview_gic: Use GIC memory region for the CPU interface

Use the GIC provided memory region for the CPU interface rather
than implementing our own.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agohw/mpcore.c: Use the GIC memory regions for the CPU interface
Peter Maydell [Mon, 5 Dec 2011 13:43:26 +0000 (13:43 +0000)]
hw/mpcore.c: Use the GIC memory regions for the CPU interface

Switch to using the GIC memory regions for the CPU interface
rather than hand implementing them as a subcase of mpcore_priv_read()
and mpcore_priv_write().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agohw/arm_gic: Expose GIC CPU interfaces as sysbus memory regions
Peter Maydell [Mon, 5 Dec 2011 12:52:33 +0000 (12:52 +0000)]
hw/arm_gic: Expose GIC CPU interfaces as sysbus memory regions

Expose the ARM GIC CPU interfaces as memory regions, rather than
just providing read and write functions for them.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agohw/arm_mptimer.c: Turn ARM MPcore private timers into qdev devices
Peter Maydell [Mon, 5 Dec 2011 15:47:49 +0000 (15:47 +0000)]
hw/arm_mptimer.c: Turn ARM MPcore private timers into qdev devices

Turn the ARM MPcore private timer/watchdog blocks into separate
qdev devices. This will allow us to share them neatly between
11MPCore and A9MPcore.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agoFix sp804 dual-timer
Peter Chubb [Mon, 12 Dec 2011 10:25:42 +0000 (10:25 +0000)]
Fix sp804 dual-timer

Properly implement dual-timer read/write for the sp804 dual timer module.
Based on ARM specs at
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0271d/index.html

Signed-off-by: Hans Jang <hsjang@ok-labs.com>
Signed-off-by: David Mirabito <david.mirabito@nicta.com.au>
Signed-off-by: Peter Chubb <peter.chubb@nicta.com.au>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
12 years agoMerge branch 'master' of git://git.qemu.org/qemu
malc [Mon, 12 Dec 2011 00:12:31 +0000 (04:12 +0400)]
Merge branch 'master' of git://git.qemu.org/qemu

12 years agoUpdate README
Anthony Liguori [Sun, 11 Dec 2011 23:49:23 +0000 (17:49 -0600)]
Update README

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoMerge branch 'master' of git://git.qemu.org/qemu
malc [Sun, 11 Dec 2011 20:47:40 +0000 (00:47 +0400)]
Merge branch 'master' of git://git.qemu.org/qemu

12 years agotarget-i386: fix cmpxchg instruction emulation
Andreas Gustafsson [Sun, 11 Dec 2011 20:46:32 +0000 (00:46 +0400)]
target-i386: fix cmpxchg instruction emulation

When the i386 cmpxchg instruction is executed with a memory operand
and the comparison result is "unequal", do the memory write before
changing the accumulator instead of the other way around, because
otherwise the new accumulator value will incorrectly be used in the
comparison when the instruction is restarted after a page fault.

This bug was originally reported on 2010-04-25 as
https://bugs.launchpad.net/qemu/+bug/569760

Signed-off-by: Andreas Gustafsson <gson@gson.org>
12 years agow32: Disable buffering for log file
Stefan Weil [Sat, 3 Dec 2011 21:32:37 +0000 (22:32 +0100)]
w32: Disable buffering for log file

W32 does not support line buffering, but it supports unbuffered output.

Unbuffered output is better for writing to qemu.log than fully buffered
output because it also shows the latest log messages when an application
crash occurs.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agow32: QEMU applications with SDL are always GUI applications
Stefan Weil [Sat, 3 Dec 2011 21:32:21 +0000 (22:32 +0100)]
w32: QEMU applications with SDL are always GUI applications

Since commit 1d14ffa97eacd3cb722271eaf6f093038396eac4 (in 2005),
QEMU applications on W32 don't use the default SDL compiler flags:

Instead of a GUI application, a console application is created.

This has disadvantages (there is always an empty console window) and
no obvious reason, so this patch removes the strange flag modification.

The SDL GUI applications still can be run from a console window
and even send stdout and stderr to that console by setting environment
variable SDL_STDIO_REDIRECT=no.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoconfigure: Enable build by default PIE / read-only relocation sections on OpenBSD...
Brad [Tue, 29 Nov 2011 00:53:49 +0000 (19:53 -0500)]
configure: Enable build by default PIE / read-only relocation sections on OpenBSD amd64/i386.

Enable build by default PIE / read-only relocation sections for the QEMU
binaries on OpenBSD amd64/i386.

Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agobsd_user: Fix potential null pointer dereference
Stefan Weil [Mon, 21 Nov 2011 20:06:22 +0000 (21:06 +0100)]
bsd_user: Fix potential null pointer dereference

This bug was spotted by cppcheck.

Using g_try_malloc0 (as does the linux-user code) fixes this.

v2:
Use g_free in bsdload.c, too. Thanks to Peter Maydell for this hint.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
12 years agoqapi: Convert migrate_set_speed
Luiz Capitulino [Mon, 28 Nov 2011 13:59:37 +0000 (11:59 -0200)]
qapi: Convert migrate_set_speed

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert migrate_set_downtime
Luiz Capitulino [Mon, 28 Nov 2011 01:18:01 +0000 (23:18 -0200)]
qapi: Convert migrate_set_downtime

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert migrate_cancel
Luiz Capitulino [Mon, 28 Nov 2011 00:54:09 +0000 (22:54 -0200)]
qapi: Convert migrate_cancel

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert human-monitor-command
Luiz Capitulino [Fri, 25 Nov 2011 19:52:45 +0000 (17:52 -0200)]
qapi: Convert human-monitor-command

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert blockdev_snapshot_sync
Luiz Capitulino [Fri, 25 Nov 2011 18:15:19 +0000 (16:15 -0200)]
qapi: Convert blockdev_snapshot_sync

Unfortunately, this conversion required an additional change.

In the old QMP command, the 'snapshot-file' argument is specified as
optional. The idea is to take the snapshot internally if 'snapshot-file'
is not passed. However, internal snapshots are not supported yet so
the command returns a MissingParamater error if 'snapshot-file' is not
passed. Which makes the argument actually required and will cause
compatibility breakage if we change that in the future.

To fix this the QAPI converted blockdev_snapshot_sync command makes the
'snapshot-file' argument required. Again, in practice it's actually required,
so this is not incompatible.

If we do implement internal snapshots someday, we'll need a new argument
for it.

Note that this discussion doesn't affect HMP.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert block_resize
Luiz Capitulino [Fri, 25 Nov 2011 16:57:10 +0000 (14:57 -0200)]
qapi: Convert block_resize

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert balloon
Luiz Capitulino [Fri, 25 Nov 2011 16:38:09 +0000 (14:38 -0200)]
qapi: Convert balloon

Note that the command being dropped uses the deprecated MONITOR_CMD_ASYNC
API, but the new command is a regular synchronous command. There shouldn't
be visible differences though, as MONITOR_CMD_ASYNC is internal only.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert block_passwd
Luiz Capitulino [Wed, 23 Nov 2011 15:28:21 +0000 (13:28 -0200)]
qapi: Convert block_passwd

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert set_link
Luiz Capitulino [Wed, 23 Nov 2011 15:11:55 +0000 (13:11 -0200)]
qapi: Convert set_link

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert inject-nmi
Luiz Capitulino [Wed, 23 Nov 2011 14:55:53 +0000 (12:55 -0200)]
qapi: Convert inject-nmi

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert cont
Luiz Capitulino [Tue, 22 Nov 2011 19:58:31 +0000 (17:58 -0200)]
qapi: Convert cont

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert pmemsave
Luiz Capitulino [Tue, 22 Nov 2011 19:26:46 +0000 (17:26 -0200)]
qapi: Convert pmemsave

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Convert memsave
Luiz Capitulino [Tue, 22 Nov 2011 18:32:37 +0000 (16:32 -0200)]
qapi: Convert memsave

Please, note that the QMP command has a new 'cpu-index' parameter.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoQError: Introduce QERR_IO_ERROR
Luiz Capitulino [Tue, 22 Nov 2011 18:29:52 +0000 (16:29 -0200)]
QError: Introduce QERR_IO_ERROR

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoconsole: Drop unused prototypes
Luiz Capitulino [Mon, 28 Nov 2011 01:07:45 +0000 (23:07 -0200)]
console: Drop unused prototypes

Commit e235cec3762d2aa20b548114ea7b172113690463 converted the query-mice
command to the QAPI but forgot to remove two prototypes used by the old
QAPI. Drop them.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqapi: Complete system_powerdown conversion
Luiz Capitulino [Mon, 28 Nov 2011 00:40:03 +0000 (22:40 -0200)]
qapi: Complete system_powerdown conversion

Commit 5bc465e4b1b6f4582a400c0a7033a1c841744278 converted only
the HMP part of the system_powerdown command to the QAPI, this
commit completes it by converting the QMP part too.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoDrop test-visitor
Luiz Capitulino [Mon, 21 Nov 2011 16:28:29 +0000 (14:28 -0200)]
Drop test-visitor

It has been superseded by the two previous commits, which introduced
the test-qmp-output-visitor and test-qmp-input-visitor tests.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoIntroduce test-qmp-input-visitor
Luiz Capitulino [Tue, 15 Nov 2011 01:31:51 +0000 (23:31 -0200)]
Introduce test-qmp-input-visitor

Contains unit-tests for the QMP input visitor implementation.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoIntroduce test-qmp-output-visitor
Luiz Capitulino [Mon, 14 Nov 2011 21:05:29 +0000 (19:05 -0200)]
Introduce test-qmp-output-visitor

Contains unit-tests for the QMP output visitor implementation.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoconfigure: Don't mix glib and libcheck tests
Luiz Capitulino [Mon, 21 Nov 2011 16:00:37 +0000 (14:00 -0200)]
configure: Don't mix glib and libcheck tests

test-coroutine is listed as a libcheck test in the 'checks' variable. This
is not right because 'make check' won't run test-coroutine if libcheck
tests are not enabled (either because libcheck isn't detected or because
--disable-check-utests is passed).

Tests using the glib test framework are independent from libcheck and
afaik are always present (although having a configure switch to disable
them is probably worth it).

Untangle test-coroutine from the libcheck tests by introducing the
'test_progs' variable and using it to generate the test list used by
'make check'.

Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agoqmp: add test tool for QMP
Mark Wu [Wed, 9 Nov 2011 05:55:33 +0000 (13:55 +0800)]
qmp: add test tool for QMP

Anthony wrote this quickly to aid in testing.  It's similar to qmp-shell with
a few important differences:

1) It is not interactive.  That makes it useful for scripting.

2) qmp-shell:

(QEMU) set_password protocol=vnc password=foo

3) qmp:

$ qmp set_password --protocol=vnc --password=foo

4) Extensible, git-style interface.  If an invalid command name is
passed, it will try to exec qmp-$1.

5) It attempts to pretty print the JSON responses in a shell friendly
format such that tools can work with the output.

Hope others will also find it useful.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Mark Wu <wudxw@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agodocs: Add writing-qmp-commands.txt
Luiz Capitulino [Fri, 28 Oct 2011 19:43:29 +0000 (17:43 -0200)]
docs: Add writing-qmp-commands.txt

Explains how to write QMP commands using the QAPI.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
12 years agohw/arm_gic.c: Ignore attempts to complete nonexistent IRQs
Peter Maydell [Thu, 1 Dec 2011 18:37:17 +0000 (19:37 +0100)]
hw/arm_gic.c: Ignore attempts to complete nonexistent IRQs

Ignore attempts to complete non-existent IRQs; this fixes a buffer
overrun if the guest writes a bad value to the GICC_EOIR register.
(This case is UNPREDICTABLE so ignoring it is a valid choice.)
Note that doing nothing if the guest writes 1023 to this register
is not in fact a change in behaviour: the old code would also
always do nothing in this case but in a non-obvious way.
(The buffer overrun was noted by Coverity, see bug 887883.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
12 years agoconfigure: Drop armv4l/armv4b distinction in $cpu
Peter Maydell [Wed, 30 Nov 2011 09:57:48 +0000 (10:57 +0100)]
configure: Drop armv4l/armv4b distinction in $cpu

Drop the distinction between armv4l/armv4b in the $cpu variable
(ie host cpu type) in favour of calling everything 'arm'. This
makes it the same as the ARCH setting and removes some special
casing. The only thing we were using the distinction for was to
decide which endianness to use in cross compilation; do a cpp
define check there instead.

Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
12 years agopseries: Fix array overrun bug in PCI code
David Gibson [Tue, 29 Nov 2011 06:21:39 +0000 (07:21 +0100)]
pseries: Fix array overrun bug in PCI code

spapr_populate_pci_devices() containd a loop with PCI_NUM_REGIONS (7)
iterations.  However this overruns the 'bars' global array, which only has
6 elements. In fact we only want to run this loop for things listed in the
bars array, so this patch corrects the loop bounds to reflect that.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
12 years agotarget-arm/helper.c: Don't allocate TCG resources unless TCG enabled
Peter Maydell [Fri, 25 Nov 2011 18:25:50 +0000 (19:25 +0100)]
target-arm/helper.c: Don't allocate TCG resources unless TCG enabled

Don't call arm_translate_init() (which allocates TCG resources)
unless TCG is enabled.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
12 years agotarget-arm/translate.c: Fix slightly misleading comment in Thumb decoder
Peter Maydell [Thu, 24 Nov 2011 18:33:31 +0000 (19:33 +0100)]
target-arm/translate.c: Fix slightly misleading comment in Thumb decoder

Clarify some slightly misleading comments in the Thumb decoder's
handling of the memory hint space -- in particular one code path
marked as 'UNPREDICTABLE or unallocated hint' also includes some
legitimate preload instructions.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
12 years agoFix hw_error messages from arm_timer.c
Peter Chubb [Tue, 22 Nov 2011 03:20:23 +0000 (04:20 +0100)]
Fix hw_error messages from arm_timer.c

Two of the calls to hw_error() in arm_timer.c contain the wrong function name.

As suggested by Andreas Färber, use the C99 standard __func__ macro to
get the correct name, instead of putting the name directly into the code.

Signed-off-by: Peter Chubb <peter.chubb@nicta.com.au>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
12 years agoMerge remote-tracking branch 'kwolf/for-anthony' into staging
Anthony Liguori [Mon, 5 Dec 2011 15:39:25 +0000 (09:39 -0600)]
Merge remote-tracking branch 'kwolf/for-anthony' into staging

12 years agoMerge remote-tracking branch 'aneesh/1.0-fixes' into staging
Anthony Liguori [Mon, 5 Dec 2011 15:37:49 +0000 (09:37 -0600)]
Merge remote-tracking branch 'aneesh/1.0-fixes' into staging

12 years agoMerge remote-tracking branch 'stefanha/trivial-patches' into staging
Anthony Liguori [Mon, 5 Dec 2011 14:44:33 +0000 (08:44 -0600)]
Merge remote-tracking branch 'stefanha/trivial-patches' into staging

12 years agoMerge remote-tracking branch 'qemu-kvm/memory/batch' into staging
Anthony Liguori [Mon, 5 Dec 2011 14:43:38 +0000 (08:43 -0600)]
Merge remote-tracking branch 'qemu-kvm/memory/batch' into staging

12 years agoUpdate version for 1.1 development branch
Anthony Liguori [Mon, 5 Dec 2011 14:39:02 +0000 (08:39 -0600)]
Update version for 1.1 development branch

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
12 years agoblock: convert qemu_aio_flush() calls to bdrv_drain_all()
Stefan Hajnoczi [Wed, 30 Nov 2011 12:23:43 +0000 (12:23 +0000)]
block: convert qemu_aio_flush() calls to bdrv_drain_all()

Many places in QEMU call qemu_aio_flush() to complete all pending
asynchronous I/O.  Most of these places actually want to drain all block
requests but there is no block layer API to do so.

This patch introduces the bdrv_drain_all() API to wait for requests
across all BlockDriverStates to complete.  As a bonus we perform checks
after qemu_aio_wait() to ensure that requests really have finished.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoblock: wait_for_overlapping_requests() deadlock detection
Stefan Hajnoczi [Wed, 30 Nov 2011 12:23:42 +0000 (12:23 +0000)]
block: wait_for_overlapping_requests() deadlock detection

Debugging a reentrant request deadlock was fun but in the future we need
a quick and obvious way of detecting such bugs.  Add an assert that
checks we are not about to deadlock when waiting for another request.

Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoblock: implement bdrv_co_is_allocated() boundary cases
Stefan Hajnoczi [Tue, 29 Nov 2011 13:49:51 +0000 (13:49 +0000)]
block: implement bdrv_co_is_allocated() boundary cases

Cases beyond the end of the disk image are only implemented for block
drivers that do not provide .bdrv_co_is_allocated().  It's worth making
these cases generic so that block drivers that do implement
.bdrv_co_is_allocated() also get them for free.

Suggested-by: Mark Wu <wudxw@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agodma-helpers: Add trace events
Kevin Wolf [Thu, 24 Nov 2011 11:15:28 +0000 (06:15 -0500)]
dma-helpers: Add trace events

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agocow: use bdrv_co_is_allocated()
Stefan Hajnoczi [Wed, 23 Nov 2011 15:00:04 +0000 (15:00 +0000)]
cow: use bdrv_co_is_allocated()

Now that bdrv_co_is_allocated() is available we can use it instead of
the synchronous bdrv_is_allocated() interface.  This is a follow-up that
Kevin Wolf <kwolf@redhat.com> pointed out after applying the series that
introduces bdrv_co_is_allocated().

It is safe to make cow_read() a coroutine_fn because its only caller is
a coroutine_fn.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoblock: add -drive copy-on-read=on|off
Stefan Hajnoczi [Thu, 17 Nov 2011 13:40:32 +0000 (13:40 +0000)]
block: add -drive copy-on-read=on|off

This patch adds the -drive copy-on-read=on|off command-line option:

  copy-on-read=on|off
  copy-on-read is "on" or "off" and enables whether to copy read backing
  file sectors into the image file.  Copy-on-read avoids accessing the
  same backing file sectors repeatedly and is useful when the backing
  file is over a slow network.  By default copy-on-read is off.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoblock: core copy-on-read logic
Stefan Hajnoczi [Thu, 17 Nov 2011 13:40:31 +0000 (13:40 +0000)]
block: core copy-on-read logic

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoblock: request overlap detection
Stefan Hajnoczi [Wed, 23 Nov 2011 11:47:56 +0000 (11:47 +0000)]
block: request overlap detection

Detect overlapping requests and remember to align to cluster boundaries
if the image format uses them.  This assumes that allocating I/O is
performed in cluster granularity - which is true for qcow2, qed, etc.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoblock: wait for overlapping requests
Stefan Hajnoczi [Thu, 17 Nov 2011 13:40:29 +0000 (13:40 +0000)]
block: wait for overlapping requests

When copy-on-read is enabled it is necessary to wait for overlapping
requests before issuing new requests.  This prevents races between the
copy-on-read and a write request.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoblock: add interface to toggle copy-on-read
Stefan Hajnoczi [Mon, 28 Nov 2011 16:08:47 +0000 (16:08 +0000)]
block: add interface to toggle copy-on-read

The bdrv_enable_copy_on_read()/bdrv_disable_copy_on_read() functions can
be used to programmatically enable or disable copy-on-read for a block
device.  Later patches add the actual copy-on-read logic.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoblock: add request tracking
Stefan Hajnoczi [Thu, 17 Nov 2011 13:40:27 +0000 (13:40 +0000)]
block: add request tracking

The block layer does not know about pending requests.  This information
is necessary for copy-on-read since overlapping requests must be
serialized to prevent races that corrupt the image.

The BlockDriverState gets a new tracked_request list field which
contains all pending requests.  Each request is a BdrvTrackedRequest
record with sector_num, nb_sectors, and is_write fields.

Note that request tracking is always enabled but hopefully this extra
work is so small that it doesn't justify adding an enable/disable flag.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agocoroutine: add qemu_co_queue_restart_all()
Stefan Hajnoczi [Thu, 17 Nov 2011 13:40:26 +0000 (13:40 +0000)]
coroutine: add qemu_co_queue_restart_all()

It's common to wake up all waiting coroutines.  Introduce the
qemu_co_queue_restart_all() function to do this instead of looping over
qemu_co_queue_next() in every caller.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoqemu-common: add QEMU_ALIGN_DOWN() and QEMU_ALIGN_UP() macros
Stefan Hajnoczi [Thu, 17 Nov 2011 13:40:25 +0000 (13:40 +0000)]
qemu-common: add QEMU_ALIGN_DOWN() and QEMU_ALIGN_UP() macros

Add macros for aligning a number to a multiple, for example:

QEMU_ALIGN_DOWN(500, 2000) = 0
QEMU_ALIGN_UP(500, 2000) = 2000

Since ALIGN_UP() is a common macro name use the QEMU_* namespace prefix.
Hopefully this will protect us from included headers that leak something
with a similar name.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoblock: add bdrv_co_is_allocated() interface
Stefan Hajnoczi [Mon, 14 Nov 2011 12:44:26 +0000 (12:44 +0000)]
block: add bdrv_co_is_allocated() interface

This patch introduces the public bdrv_co_is_allocated() interface which
can be used to query image allocation status while the VM is running.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoblock: drop .bdrv_is_allocated() interface
Stefan Hajnoczi [Mon, 14 Nov 2011 12:44:25 +0000 (12:44 +0000)]
block: drop .bdrv_is_allocated() interface

Now that all block drivers have been converted to
.bdrv_co_is_allocated() we can drop .bdrv_is_allocated().

Note that the public bdrv_is_allocated() interface is still available
but is in fact a synchronous wrapper around .bdrv_co_is_allocated().

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agocow: convert to .bdrv_co_is_allocated()
Stefan Hajnoczi [Mon, 14 Nov 2011 12:44:24 +0000 (12:44 +0000)]
cow: convert to .bdrv_co_is_allocated()

The cow block driver does not keep internal state for cluster lookups.
This means it is safe to perform cluster lookups in coroutine context
without risk of race conditions that corrupt internal state.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agovdi: convert to .bdrv_co_is_allocated()
Stefan Hajnoczi [Mon, 14 Nov 2011 12:44:23 +0000 (12:44 +0000)]
vdi: convert to .bdrv_co_is_allocated()

It is trivial to switch from the synchronous .bdrv_is_allocated()
interface to .bdrv_co_is_allocated() since vdi_is_allocated() does not
block.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agovvfat: convert to .bdrv_co_is_allocated()
Stefan Hajnoczi [Mon, 14 Nov 2011 12:44:22 +0000 (12:44 +0000)]
vvfat: convert to .bdrv_co_is_allocated()

It is trivial to switch from the synchronous .bdrv_is_allocated()
interface to .bdrv_co_is_allocated() since vvfat_is_allocated() does not
block.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoblock: convert qcow2, qcow2, and vmdk to .bdrv_co_is_allocated()
Stefan Hajnoczi [Mon, 14 Nov 2011 12:44:21 +0000 (12:44 +0000)]
block: convert qcow2, qcow2, and vmdk to .bdrv_co_is_allocated()

The qcow2, qcow, and vmdk block drivers are based on coroutines.  They have a
coroutine mutex which protects internal state.  We can convert the
.bdrv_is_allocated() function to .bdrv_co_is_allocated() by holding the mutex
around the cluster lookup operation.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoqed: convert to .bdrv_co_is_allocated()
Stefan Hajnoczi [Mon, 14 Nov 2011 12:44:20 +0000 (12:44 +0000)]
qed: convert to .bdrv_co_is_allocated()

The bdrv_qed_is_allocated() function is a synchronous wrapper around
qed_find_cluster(), which performs the cluster lookup.  In order to
convert the synchronous function to a coroutine function we yield
instead of using qemu_aio_wait().  Note that QED's cache is already safe
for parallel requests so no locking is needed.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoblock: add .bdrv_co_is_allocated()
Stefan Hajnoczi [Mon, 14 Nov 2011 12:44:19 +0000 (12:44 +0000)]
block: add .bdrv_co_is_allocated()

This patch adds the .bdrv_co_is_allocated() interface which is identical
to .bdrv_is_allocated() but runs in coroutine context.  Running in
coroutine context implies that other coroutines might be performing I/O
at the same time.   Therefore it must be safe to run while the following
BlockDriver functions are in-flight:

    .bdrv_co_readv()
    .bdrv_co_writev()
    .bdrv_co_flush()
    .bdrv_co_is_allocated()

The new .bdrv_co_is_allocated() interface is useful because it can be
used when a VM is running, whereas .bdrv_is_allocated() is a synchronous
interface that does not cope with parallel requests.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoblock: use public bdrv_is_allocated() interface
Stefan Hajnoczi [Mon, 14 Nov 2011 12:44:18 +0000 (12:44 +0000)]
block: use public bdrv_is_allocated() interface

There is no need for bdrv_commit() to use the BlockDriver
.bdrv_is_allocated() interface directly.  Converting to the public
interface gives us the freedom to drop .bdrv_is_allocated() entirely in
favor of a new .bdrv_co_is_allocated() in the future.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoqcow2: Fix error path in qcow2_snapshot_load_tmp
Kevin Wolf [Wed, 16 Nov 2011 16:30:33 +0000 (17:30 +0100)]
qcow2: Fix error path in qcow2_snapshot_load_tmp

If the bdrv_read() of the snapshot's L1 table fails, return the right
error code and make sure that the old L1 table is still loaded and we
don't break the BlockDriverState completely.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoqcow2: Fix order in qcow2_snapshot_delete
Kevin Wolf [Wed, 16 Nov 2011 16:22:10 +0000 (17:22 +0100)]
qcow2: Fix order in qcow2_snapshot_delete

First the snapshot must be deleted and only then the refcounts can be
decreased.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoqcow2: Fix order of refcount updates in qcow2_snapshot_goto
Kevin Wolf [Wed, 16 Nov 2011 14:20:45 +0000 (15:20 +0100)]
qcow2: Fix order of refcount updates in qcow2_snapshot_goto

The refcount updates must be moved so that in the worst case we can get
cluster leaks, but refcounts may never be too low.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoqcow2: Return real error in qcow2_snapshot_goto
Kevin Wolf [Wed, 16 Nov 2011 14:04:11 +0000 (15:04 +0100)]
qcow2: Return real error in qcow2_snapshot_goto

Besides fixing the return code, this adds some comments that make clear
how the code works and that it potentially breaks images if we fail in
the wrong place. Actually fixing this is left for the next patch.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoqcow2: Rework qcow2_snapshot_create error handling
Kevin Wolf [Wed, 16 Nov 2011 11:43:59 +0000 (12:43 +0100)]
qcow2: Rework qcow2_snapshot_create error handling

Increase refcounts only after allocating a new L1 table has succeeded in
order to make leaks less likely. If writing the snapshot table fails,
revert in-memory state to be consistent with that on disk.

While at it, make it return the real error codes instead of -1.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoqcow2: Cleanups and memleak fix in qcow2_snapshot_create
Kevin Wolf [Wed, 16 Nov 2011 16:46:29 +0000 (17:46 +0100)]
qcow2: Cleanups and memleak fix in qcow2_snapshot_create

sn->id_str could be leaked before this. The rest of this patch changes
comments, fixes coding style or removes checks that are unnecessary with
g_malloc.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoqcow2: Update snapshot table information at once
Kevin Wolf [Fri, 18 Nov 2011 17:27:00 +0000 (18:27 +0100)]
qcow2: Update snapshot table information at once

Failing in the middle wouldn't help with the integrity of the image, so
doing everything in a single request seems better.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoqcow2: Return real error code in qcow2_write_snapshots
Kevin Wolf [Wed, 16 Nov 2011 11:00:59 +0000 (12:00 +0100)]
qcow2: Return real error code in qcow2_write_snapshots

Doesn't immediately fix anything as the callers don't use the return
value, but they will be fixed next.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoqcow2: Return real error code in qcow2_read_snapshots
Kevin Wolf [Wed, 16 Nov 2011 10:43:28 +0000 (11:43 +0100)]
qcow2: Return real error code in qcow2_read_snapshots

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoblock: Add coroutine_fn marker to coroutine functions
Dong Xu Wang [Thu, 10 Nov 2011 08:23:22 +0000 (16:23 +0800)]
block: Add coroutine_fn marker to coroutine functions

Looks better when reviewing these source files.

Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agohmp/qmp: add block_set_io_throttle
Zhi Yong Wu [Tue, 8 Nov 2011 05:00:31 +0000 (13:00 +0800)]
hmp/qmp: add block_set_io_throttle

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>