OSDN Git Service

qmiga/qemu.git
12 years agodoc: Remove Symbian Virtual Platform
Stefan Weil [Wed, 14 Dec 2011 06:30:24 +0000 (07:30 +0100)]
doc: Remove Symbian Virtual Platform

Commit d396a657baec8c6b7aa0c888746e0e2f78303650 removed the code
for SVP, so the documentation needs this update.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agomigration.h: remove incoming_expected declarations
Isaku Yamahata [Tue, 13 Dec 2011 03:40:51 +0000 (12:40 +0900)]
migration.h: remove incoming_expected declarations

The variable is deleted by 1bcef683bf840a928d633755031ac572d5fdb851
So remove its declaration.

Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agotcg: make tcg_const_ptr actually accept a pointer argument
Peter Maydell [Sat, 10 Dec 2011 16:35:31 +0000 (16:35 +0000)]
tcg: make tcg_const_ptr actually accept a pointer argument

Make tcg_const_ptr() include a cast so that you can pass it a
pointer. This allows us to drop the casts we had in all the places
that use this macro.

Acked-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoFix spelling in comments, documentation and messages
Stefan Weil [Fri, 9 Dec 2011 23:19:46 +0000 (00:19 +0100)]
Fix spelling in comments, documentation and messages

accidently->accidentally
annother->another
choosen->chosen
consideres->considers
decriptor->descriptor
developement->development
paramter->parameter
preceed->precede
preceeding->preceding
priviledge->privilege
propogation->propagation
substraction->subtraction
throught->through
upto->up to
usefull->useful

Fix also grammar in posix-aio-compat.c

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agohw: Fix spelling in comments and code
Stefan Weil [Fri, 9 Dec 2011 23:19:45 +0000 (00:19 +0100)]
hw: Fix spelling in comments and code

compatiblity->compatibility
transfered->transferred
transfering->transferring

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agohw: Fix spelling in comments
Stefan Weil [Fri, 9 Dec 2011 23:19:44 +0000 (00:19 +0100)]
hw: Fix spelling in comments

adress->address
advertisment->advertisement
begining->beginning
bondary->boundary
controler->controller
controll->control
convertion->conversion
doesnt->doesn't
existant->existent
instuction->instruction
loosing->losing
managment->management
multipled->multiplied
negotation->negotiation
runing->running
teh->the
unchangable->unchangeable
writen->written
yeild->yield

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agohw: Fix spelling (licenced->licensed)
Stefan Weil [Fri, 9 Dec 2011 23:19:43 +0000 (00:19 +0100)]
hw: Fix spelling (licenced->licensed)

New code introduced old misspellings.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agofmopl: Fix spelling in code and comments
Stefan Weil [Fri, 9 Dec 2011 23:19:42 +0000 (00:19 +0100)]
fmopl: Fix spelling in code and comments

algorythm->algorithm
rythm->rhythm

I did not try to fix the coding standard, so checkpatch.pl
reports lots of violations.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agovirtio-pci: use pci macros
Hui Kai Ran [Thu, 8 Dec 2011 05:49:13 +0000 (13:49 +0800)]
virtio-pci: use pci macros

Signed-off-by: Hui Kai Ran <hkran@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoLICENSE: There is no libqemu.a anymore
Chen Wei-Ren [Tue, 15 Nov 2011 12:47:12 +0000 (20:47 +0800)]
LICENSE: There is no libqemu.a anymore

  Remove statement about libqemu.a from LICENSE.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoMakefile.objs: Remove libqemu_common.a from the comment
Chen Wei-Ren [Tue, 15 Nov 2011 12:47:11 +0000 (20:47 +0800)]
Makefile.objs: Remove libqemu_common.a from the comment

  Remove libqemu_common.a from the comment.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoMakefile.target: Remove out of date comment
Chen Wei-Ren [Tue, 15 Nov 2011 12:47:10 +0000 (20:47 +0800)]
Makefile.target: Remove out of date comment

  Remove the out of date comment, i.e., "# libqemu" since libqemu.a is not
available anymore.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoqemu-tech.texi: Remove libqemu related stuff from the document
Chen Wei-Ren [Tue, 15 Nov 2011 12:47:09 +0000 (20:47 +0800)]
qemu-tech.texi: Remove libqemu related stuff from the document

  Remove libqemu related stuff from the document since libqemu.a is not supported
anymore.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agotests/qruncom.c: Remove libqemu.a example
Chen Wei-Ren [Tue, 15 Nov 2011 12:47:08 +0000 (20:47 +0800)]
tests/qruncom.c: Remove libqemu.a example

  Remove libqemu example since libqemu.a is not available anymore.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agotests/Makefile: Remove qruncom target
Chen Wei-Ren [Tue, 15 Nov 2011 12:47:07 +0000 (20:47 +0800)]
tests/Makefile: Remove qruncom target

  Remove qruncom target from the Makefile file.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agotcg: Remove redundant declarations of TCG_TARGET_REG_BITS
Stefan Weil [Wed, 7 Dec 2011 22:31:46 +0000 (23:31 +0100)]
tcg: Remove redundant declarations of TCG_TARGET_REG_BITS

TCG_TARGET_REG_BITS is declared in tcg.h for all TCG targets.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agomips_malta: resolve endless loop when loading bios
Chen Rui [Sun, 13 Nov 2011 11:42:42 +0000 (19:42 +0800)]
mips_malta: resolve endless loop when loading bios

Tested-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Chen Rui <chennrui@gmail.com>
12 years agomemory: minor documentation fixes/enhancements
Ademar de Souza Reis Jr [Mon, 5 Dec 2011 19:54:14 +0000 (16:54 -0300)]
memory: minor documentation fixes/enhancements

Fix typos and minor documentation errors in both memory.h and
docs/memory.txt.

Also add missing documentation formatting tags to transaction
functions.

Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Ademar de Souza Reis Jr <areis@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agolinux-user/syscall.c: Don't skip stracing for fcntl64 failure case
Peter Maydell [Mon, 5 Dec 2011 23:11:50 +0000 (23:11 +0000)]
linux-user/syscall.c: Don't skip stracing for fcntl64 failure case

In an fcntl64 failure path, we were returning directly rather than
simply breaking out of the switch statement. This skips the strace
code for printing the syscall return value, so don't do that.

Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoRename get_tls to tls_var
Jan Kiszka [Mon, 5 Dec 2011 14:18:54 +0000 (15:18 +0100)]
Rename get_tls to tls_var

get_tls() can serve as a lvalue as well, so 'get' might be confusing.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agolinux-user/arm/nwfpe/fpopcode.h: Fix non-UTF-8 characters
Peter Maydell [Fri, 2 Dec 2011 19:30:45 +0000 (19:30 +0000)]
linux-user/arm/nwfpe/fpopcode.h: Fix non-UTF-8 characters

Fix some stray non-UTF-8 characters used in some ASCII art tables
by converting them to plain ASCII '|' instead.

Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agolinux-user/cpu-uname.c: Convert to UTF-8
Peter Maydell [Fri, 2 Dec 2011 19:30:44 +0000 (19:30 +0000)]
linux-user/cpu-uname.c: Convert to UTF-8

Convert comment from ISO-8859-1 encoding to UTF-8 to match the rest
of QEMU's source code.

Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoConvert keymap file to UTF-8 encoding
Stefan Weil [Sat, 3 Dec 2011 09:45:25 +0000 (10:45 +0100)]
Convert keymap file to UTF-8 encoding

Most QEMU files either are pure ASCII or use UTF-8.
Convert this keymap file which still used ISO-8859-1 to UTF-8.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoConvert source files to UTF-8 encoding
Stefan Weil [Fri, 2 Dec 2011 09:30:41 +0000 (10:30 +0100)]
Convert source files to UTF-8 encoding

Most QEMU files either are pure ASCII or use UTF-8.
Convert some files which still used ISO-8859-1 to UTF-8.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoconfigure: Pull linux-headers/asm symlink creation out of loop
Peter Maydell [Wed, 30 Nov 2011 11:59:04 +0000 (11:59 +0000)]
configure: Pull linux-headers/asm symlink creation out of loop

Pull the creation of the linux-headers/asm symlink out of the loop
so we don't pointlessly delete and recreate it once for each target.
Also move the setting of the includes variable up so that it is
in the same place as the other code which sets this variable.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agopcie_aer: adjust do_pcie_aer_inejct_error -> do_pcie_aer_inject_error
Zhi Yong Wu [Wed, 30 Nov 2011 04:39:47 +0000 (12:39 +0800)]
pcie_aer: adjust do_pcie_aer_inejct_error -> do_pcie_aer_inject_error

This function name is a bit wrong. Although it doesn't impact function, it is a bit necessary that we should fixup it.

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agofix spelling in hw sub directory
Dong Xu Wang [Tue, 29 Nov 2011 08:52:39 +0000 (16:52 +0800)]
fix spelling in hw sub directory

Correct obvious spelling errors in qemu/hw directory.

Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agofix typo: delete redundant semicolon
Dong Xu Wang [Tue, 29 Nov 2011 08:52:38 +0000 (16:52 +0800)]
fix typo: delete redundant semicolon

Double semicolons should be single.

Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agowin32: fix memory leak
Zhi Hui Li [Thu, 24 Nov 2011 08:27:52 +0000 (16:27 +0800)]
win32: fix memory leak

string is allocated by g_malloc, will not be used after putenv, should be
free before return.

Paolo Bonzini <pbonzini@redhat.com> confirmed this is safe under Wine:

"1) the underlying Win32 APIs require separate arguments for the
variable and value; 2) even though in the end Wine stores the
environment as name=value
(http://source.winehq.org/source/dlls/ntdll/env.c), it does so in a
single consecutive block of memory, not as a char* array like POSIX
does.  While (2) might apply only to Wine, (1) surely applies to Windows
as well."

Tested-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Li Zhi Hui <zhihuili@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agonet/socket.c : fix memory leak
Zhi Hui Li [Thu, 24 Nov 2011 08:23:00 +0000 (16:23 +0800)]
net/socket.c : fix memory leak

Signed-off-by: Li Zhi Hui <zhihuili@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoconfigure: Print a banner comment at the top of config.log
Peter Maydell [Wed, 23 Nov 2011 17:26:44 +0000 (17:26 +0000)]
configure: Print a banner comment at the top of config.log

Print a banner comment at the top of config.log identifying
when configure was run and the arguments used. This is occasionally
useful for debugging purposes.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoconfigure: Include #define name in check_define compiler error
Peter Maydell [Wed, 23 Nov 2011 17:26:43 +0000 (17:26 +0000)]
configure: Include #define name in check_define compiler error

Include the name of the #define being tested for in the compiler
error produced when a check_define test is run and fails. This
appears only in the config.log, but it does make it a little easier
to debug problems by inspecting config.log.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoconsole: Fix qemu_default_pixelformat() for 24 bpp
Markus Armbruster [Tue, 22 Nov 2011 11:56:10 +0000 (12:56 +0100)]
console: Fix qemu_default_pixelformat() for 24 bpp

Falls through to 32 bpp.  Harmless, because the only difference is the
alpha component, and we're not using that.  Spotted by Coverity.

Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoconsole: Fix console_putchar() for CSI J
Markus Armbruster [Tue, 22 Nov 2011 10:59:07 +0000 (11:59 +0100)]
console: Fix console_putchar() for CSI J

It falls through to the code for CSI K.  "Erase Down" also does "Erase
End of Line", "Erase Up" also does "Erase Start of Line", and "Erase
Screen" also does "Erase Line".  Happens not to be visible.  Fix it
anyway.  Spotted by Coverity.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agoconsole: Clean up confusing indentation in console_putchar()
Markus Armbruster [Tue, 22 Nov 2011 10:59:06 +0000 (11:59 +0100)]
console: Clean up confusing indentation in console_putchar()

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.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>
12 years agoblock: add I/O throttling algorithm
Zhi Yong Wu [Tue, 8 Nov 2011 05:00:14 +0000 (13:00 +0800)]
block: add I/O throttling algorithm

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>
12 years agoCoQueue: introduce qemu_co_queue_wait_insert_head
Zhi Yong Wu [Thu, 3 Nov 2011 08:57:26 +0000 (16:57 +0800)]
CoQueue: introduce qemu_co_queue_wait_insert_head

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>
12 years agoblock: add the blockio limits command line support
Zhi Yong Wu [Thu, 3 Nov 2011 08:57:25 +0000 (16:57 +0800)]
block: add the blockio limits command line support

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>
12 years agoblock: Use bdrv functions to replace file operation in cow.c
Li Zhi Hui [Tue, 8 Nov 2011 06:21:13 +0000 (14:21 +0800)]
block: Use bdrv functions to replace file operation in cow.c

Since common file operation functions lack of error detection,
so change them to bdrv series functions.

Signed-off-by: Li Zhi Hui <zhihuili@linux.vnet.ibm.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoxen_disk: remove dead code
Paolo Bonzini [Fri, 28 Oct 2011 16:03:58 +0000 (18:03 +0200)]
xen_disk: remove dead code

Xen_disk.c has support for using synchronous I/O instead of asynchronous,
but it is compiled out by default.  Remove it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoqed: adjust the way to get nb_sectors
Zhi Yong Wu [Tue, 1 Nov 2011 08:04:32 +0000 (16:04 +0800)]
qed: adjust the way to get nb_sectors

This patch is only to refactor some lines of codes to get better and more robust codes.

As you have seen, in qed_read_table_cb() it's nice to
use qiov->size because that function doesn't obviously use a single
struct iovec.

In other two functions, if qiov use more than one struct iovec, the existing way will get wrong nb_sectors.
To make the code more robust, it will be nicer to refactor the existing way as below.

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Acked-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoqcow2: avoid reentrant bdrv_read() in copy_sectors()
Stefan Hajnoczi [Wed, 30 Nov 2011 12:23:41 +0000 (12:23 +0000)]
qcow2: avoid reentrant bdrv_read() in copy_sectors()

A BlockDriverState should not issue requests on itself through the
public block layer interface.  Nested, or reentrant, requests are
problematic because they do I/O throttling and request tracking twice.

Features like block layer copy-on-read use request tracking to avoid
race conditions between concurrent requests.  The reentrant request will
have to "wait" for its parent request to complete.  But the parent is
waiting for the reentrant request to make progress so we have reached
deadlock.

The solution is for block drivers to avoid the public block layer
interfaces for reentrant requests.   Instead they should call their own
internal functions if they wish to perform reentrant requests.

This is also a good opportunity to make copy_sectors() a true
coroutine_fn.  That means calling bdrv_co_writev() instead of
bdrv_write().  Behavior is unchanged but we're being explicit that this
executes in coroutine context.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agoqcow2: Unlock during COW
Kevin Wolf [Mon, 19 Sep 2011 09:26:48 +0000 (11:26 +0200)]
qcow2: Unlock during COW

Unlocking during COW allows for more parallelism. One change it requires is
that buffers are dynamically allocated instead of just using a per-image
buffer.

While touching the code, drop the synchronous qcow2_read() function and replace
it by a bdrv_read() call.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
12 years agohw/9pfs: Use the correct file descriptor in Fsdriver Callback
Aneesh Kumar K.V [Sun, 4 Dec 2011 17:05:28 +0000 (22:35 +0530)]
hw/9pfs: Use the correct file descriptor in Fsdriver Callback

Fsdriver callback that operate on file descriptor need to
differentiate between directory fd and file fd.

Based on the original patch from Sassan Panahinejad <sassan@sassan.me.uk>

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Add qdev.reset callback for virtio-9p-pci device
Aneesh Kumar K.V [Sun, 4 Dec 2011 17:05:28 +0000 (22:35 +0530)]
hw/9pfs: Add qdev.reset callback for virtio-9p-pci device

Add the device reset callback

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Reset server state during TVERSION
Deepak C Shetty [Sun, 4 Dec 2011 17:05:28 +0000 (22:35 +0530)]
hw/9pfs: Reset server state during TVERSION

As per the 9p rfc, during TVERSION its necessary to clean all the active
fids, so that we start the session from a clean state. Its also needed in
scenarios where the guest is booting off 9p, and boot fails, and client
restarts, without any knowledge of the past, it will issue a TVERSION again
so this ensures that we always start from a clean state.

Signed-off-by: Deepak C Shetty <deepakcs@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: use migration blockers to prevent live migration when virtfs export path...
Aneesh Kumar K.V [Sun, 4 Dec 2011 17:05:28 +0000 (22:35 +0530)]
hw/9pfs: use migration blockers to prevent live migration when virtfs export path is mounted

Now when you try to migrate with VirtFS export path mounted, you get a proper QMP error:

(qemu) migrate tcp:localhost:4444
Migration is disabled when VirtFS export path '/tmp/' is mounted in the guest using mount_tag 'v_tmp'
(qemu)

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agohw/9pfs: Improve portability to older systems
Aneesh Kumar K.V [Sun, 4 Dec 2011 17:05:27 +0000 (22:35 +0530)]
hw/9pfs: Improve portability to older systems

handle fs driver require a set of newly added syscalls. Don't
Compile handle FS driver if those syscalls are not available.
Instead of adding #ifdef for all those syscalls we check for
open by handle syscall. If that is available then rest of the
syscalls used by the driver should be available.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
12 years agofix spelling in main directory
Dong Xu Wang [Tue, 22 Nov 2011 10:06:26 +0000 (18:06 +0800)]
fix spelling in main directory

Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agofix spelling in block sub directory
Dong Xu Wang [Tue, 22 Nov 2011 10:06:25 +0000 (18:06 +0800)]
fix spelling in block sub directory

Cc: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agofix spelling in ui sub directory
Dong Xu Wang [Tue, 22 Nov 2011 10:06:24 +0000 (18:06 +0800)]
fix spelling in ui sub directory

Cc: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agofix spelling in tests sub directory
Dong Xu Wang [Tue, 22 Nov 2011 10:06:23 +0000 (18:06 +0800)]
fix spelling in tests sub directory

Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agofix spelling in tcg sub directory
Dong Xu Wang [Tue, 22 Nov 2011 10:06:22 +0000 (18:06 +0800)]
fix spelling in tcg sub directory

Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agofix spelling in target sub directory
Dong Xu Wang [Tue, 22 Nov 2011 10:06:21 +0000 (18:06 +0800)]
fix spelling in target sub directory

Cc: Richard Henderson <rth@twiddle.net>
Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Alexander Graf <agraf@suse.de>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agofix spelling in scripts sub directory
Dong Xu Wang [Tue, 22 Nov 2011 10:06:20 +0000 (18:06 +0800)]
fix spelling in scripts sub directory

Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
12 years agofix spelling in QMP sub directory
Dong Xu Wang [Tue, 22 Nov 2011 10:06:19 +0000 (18:06 +0800)]
fix spelling in QMP sub directory

Cc: Markus Armbruster <armbru@redhat.com>
Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>