summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-04-25qerror.h: Remove QERR defines that are only used onceCole Robinson15-91/+37
Just hardcode them in the callers Cc: Luiz Capitulino <lcapitulino@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25qerror.h: Remove unused error classesCole Robinson1-9/+0
Cc: Luiz Capitulino <lcapitulino@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25error: Print error_report() to stderr if using qmpCole Robinson1-1/+1
monitor_printf will drop the requested output if cur_mon is qmp (for good reason). However these messages are often helpful for debugging issues with via libvirt. If we know the message won't hit the monitor, send it to stderr. Cc: Luiz Capitulino <lcapitulino@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25monitor: Remove unused monitor_print_filenameCole Robinson4-35/+0
Cc: Luiz Capitulino <lcapitulino@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25error: Privatize error_print_locCole Robinson2-2/+1
Cc: Luiz Capitulino <lcapitulino@redhat.com> Cc: Markus Armbruster <armbru@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25vnc: Remove default_mon usageCole Robinson1-2/+2
These errors don't seem user initiated, so forcibly printing to the monitor doesn't seem right. Just use error_report. Cc: Anthony Liguori <aliguori@amazon.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25slirp: Remove default_mon usageCole Robinson3-17/+6
These errors don't seem user initiated, so forcibly printing to the monitor doesn't seem right. Just use error_report. Drop lprint since it's now unused. Cc: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Cole Robinson <crobinso@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-04-25Merge remote-tracking branch 'remotes/rth/tags/tgt-axp-pull-20140424' into ↵Peter Maydell3-1492/+879
staging target-alpha queue pull for 20140424 # gpg: Signature made Thu 24 Apr 2014 20:44:23 BST using RSA key ID 4DD0279B # gpg: Can't check signature: public key not found * remotes/rth/tags/tgt-axp-pull-20140424: (40 commits) target-alpha: Remove cpu_unique, cpu_sysval, cpu_usp target-alpha: Tidy alpha_translate_init target-alpha: Don't issue goto_tb under singlestep target-alpha: Use non-local temps for zero/sink target-alpha: Use extract to get insn fields target-alpha: Convert mfpr/mtpr to source/sink target-alpha: Convert gen_cpys et al to source/sink target-alpha: Convert gen_fcvtlq/ql to source/sink target-alpha: Convert gen_fcmov to source/sink target-alpha: Convert gen_bcond to source/sink target-alpha: Convert most ieee insns to source/sink target-alpha: Convert gen_ieee_input to source/sink target-alpha: Convert MVIOP2 to source/sink target-alpha: Convert ARITH3 to source/sink target-alpha: Convert FARITH3 to source/sink target-alpha: Convert FARITH2 to source/sink target-alpha: Convert gen_zap/not to source/sink target-alpha: Convert gen_ins_h/l to source/sink target-alpha: Convert gen_ext_h/l to source/sink target-alpha: Convert gen_msk_h/l to source/sink ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-25net: xilinx_axienet.c: Add phy soft reset bit clearingNathan Rossi1-0/+3
Clear the BMCR Reset when writing to registers. Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com> [ PC: * Trivial style fixes to commit message ] Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Beniamino Galvani <b.galvani@gmail.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-25net/net.c: Remove unnecessary semicolonIgor Ryzhov1-1/+1
Signed-off-by: Igor Ryzhov <iryzhov@arccn.ru> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-25pcnet: remove duplicate assignmentPrasad Joshi1-1/+0
Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-25tap: Avoid extra iterations while closing file fdPankaj Gupta1-10/+4
Avoid iterations for fd 0, 1 & 2 when we are closing file fds in child process. Signed-off-by: Pankaj Gupta <pagupta@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-25Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into stagingPeter Maydell18-115/+302
Block patches # gpg: Signature made Wed 23 Apr 2014 11:02:29 BST using RSA key ID C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" * remotes/kevin/tags/for-upstream: block/cloop: use PRIu32 format specifier for uint32_t vmdk: Fix "%x" to PRIx32 in format strings for cid qemu-img: Improve error messages qemu-iotests: Check common namespace for id and node-name block: Catch duplicate IDs in bdrv_new() qemu-img: Avoid duplicate block device IDs block: Add errp to bdrv_new() convert fprintf() calls to error_setg() in block/qed.c:bdrv_qed_create() block: Remove -errno return value from bdrv_assign_node_name curl: Replaced old error handling with error reporting API. block: Handle error of bdrv_getlength in bdrv_create_dirty_bitmap vmdk: Fix %d and %lld to PRI* in format strings block: Check bdrv_getlength() return value in bdrv_make_zero() block: Catch integer overflow in bdrv_rw_co() block: Limit size to INT_MAX in bdrv_check_byte_request() block: Fix nb_sectors check in bdrv_check_byte_request() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-25s390x/kvm: sync gbea and pp registerChristian Borntraeger2-0/+7
We also need to sync guest breaking event address and program parameter register for migration support. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2014-04-25s390x/kvm: rework KVM synchronize to tracing for some ONEREGSChristian Borntraeger2-78/+69
Some ONE_REGS on s390 are not protected by a capability. Older kernels might not provide those and return an error. Fortunately these registers are only critical for the migration path. There is no need to error out on reset and normal runtime. Furthermore, these kernels don't provide a proper dirty bitmap anyway, so let's use tracing for those errors. Also provide generic one reg helper to simplify the code. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2014-04-25linux-headers updateCornelia Huck3-0/+47
linux-headers update against v3.15-rc2 (a798c10f) Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2014-04-25s390x: empty function stubs in preparation for __KVM_HAVE_GUEST_DEBUGDavid Hildenbrand1-0/+28
This patch creates empty function stubs (used by the gdbserver) in preparation for the hw debugging support by kvm on s390, which will enable the __KVM_HAVE_GUEST_DEBUG define in the linux headers and require these methods on the qemu side. Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: qemu-stable@nongnu.org Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2014-04-24Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-5' into stagingPeter Maydell6-1/+1135
usb: mtp filesharing # gpg: Signature made Wed 23 Apr 2014 09:28:37 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-usb-5: usb: mtp filesharing usb: add CompatibleID support to msos Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-24Merge remote-tracking branch 'remotes/rth/tags/tcg-next-20140422' into stagingPeter Maydell26-167/+170
Pull tcg 2014-04-22 # gpg: Signature made Tue 22 Apr 2014 22:00:04 BST using RSA key ID 4DD0279B # gpg: Can't check signature: public key not found * remotes/rth/tags/tcg-next-20140422: tcg: Use HOST_WORDS_BIGENDIAN tcg: Fix fallback from muls2_i64 to mulu2_i64 tcg: Use tcg_gen_mulu2_i32 in tcg_gen_muls2_i32 tcg: Relax requirement for mulu2_i32 on 32-bit hosts tcg-s390: Remove W constraint tcg-sparc: Use the type parameter to tcg_target_const_match tcg-ppc64: Use the type parameter to tcg_target_const_match tcg-aarch64: Remove w constraint tcg: Add TCGType parameter to tcg_target_const_match tcg: Fix out of range shift in deposit optimizations tci: Mask shift counts to avoid undefined behavior tcg: Mask shift quantities while folding tcg: Use "unspecified behavior" for shifts tcg: Fix warning (1 bit signed bitfield entry) and replace int by bool Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-24Merge remote-tracking branch 'remotes/rth/tags/tcg-ia64-pull-20140421' into ↵Peter Maydell2-235/+265
staging Pull for 20140421 # gpg: Signature made Mon 21 Apr 2014 17:57:24 BST using RSA key ID 4DD0279B # gpg: Can't check signature: public key not found * remotes/rth/tags/tcg-ia64-pull-20140421: tcg-ia64: Convert to new ldst opcodes tcg-ia64: Move part of softmmu slow path out of line tcg-ia64: Convert to new ldst helpers tcg-ia64: Reduce code duplication in tcg_out_qemu_ld tcg-ia64: Move tlb addend load into tlb read tcg-ia64: Move bswap for store into tlb load tcg-ia64: Re-bundle the tlb load tcg-ia64: Optimize small arguments to exit_tb Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-24Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-04-18' ↵Peter Maydell12-25/+212
into staging trivial patches for 2014-04-18 # gpg: Signature made Fri 18 Apr 2014 07:36:15 BST using RSA key ID A4C3D7DB # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 # Subkey fingerprint: 6F67 E18E 7C91 C5B1 5514 66A7 BEE5 9D74 A4C3 D7DB * remotes/mjt/tags/trivial-patches-2014-04-18: Fix grammar in comment doc: grammify "allows to" configure: Remove redundant message for -Werror scripts: add sample model file for Coverity Scan xbzrle.c: Avoid undefined behaviour with signed arithmetic int128.h: Avoid undefined behaviours involving signed arithmetic hw/ide/ahci.c: Avoid shift left into sign bit net: Report error when device / hub combo is not found. configure: Fix indentation of help for --enable/disable-debug-info qga: trivial fix for unclear documentation of guest-set-time vl: Report accelerator not supported for target more nicely Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-23block/cloop: use PRIu32 format specifier for uint32_tStefan Hajnoczi1-6/+6
PRIu32 is the format string specifier for uint32_t, let's use it. Variables ->block_size, ->n_blocks, and i are all uint32_t. Suggested-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-04-23usb: mtp filesharingGerd Hoffmann4-0/+1129
Implementation of a USB Media Transfer Device device for easy filesharing. Read-only. No access control inside qemu, it will happily export any file it is able to open to the guest, i.e. standard unix access rights for the qemu process apply. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-04-22vmdk: Fix "%x" to PRIx32 in format strings for cidFam Zheng1-5/+5
Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-04-22qemu-img: Improve error messagesFam Zheng1-28/+46
Previously, when there is a user error in argv parsing, qemu-img prints help text and exits. Add an error_exit function to print a helpful error message and a hint to run 'qemu-img --help' for more information. As a bonus, "qemu-img <cmd> --help" now has a more reasonable exit code 0. In the future the help text should be split by sub command, and only print the information for the specified command. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-04-22usb: add CompatibleID support to msosGerd Hoffmann2-1/+6
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-04-22qemu-iotests: Check common namespace for id and node-nameKevin Wolf2-0/+57
A name that is taken by an ID can't be taken by a node-name at the same time. Check that conflicts are correctly detected. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com>
2014-04-22block: Catch duplicate IDs in bdrv_new()Kevin Wolf4-6/+57
Since commit f298d071, block devices added with blockdev-add don't have a QemuOpts around in dinfo->opts. Consequently, we can't rely any more on QemuOpts catching duplicate IDs for block devices. This patch adds a new check for duplicate IDs to bdrv_new(), and moves the existing check that the ID isn't already taken for a node-name there as well. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2014-04-22qemu-img: Avoid duplicate block device IDsKevin Wolf1-16/+22
qemu-img used to use "image" as ID for all block devices. This means that e.g. img_convert() ended up with potentially multiple source images and one target image, all with the same ID. The next patch will catch this and fail to open the block device. This patch makes sure that qemu-img uses meaningful unique IDs for the block devices it uses. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2014-04-22block: Add errp to bdrv_new()Kevin Wolf9-15/+24
This patch adds an errp parameter to bdrv_new() and updates all its callers. The next patches will make use of this in order to check for duplicate IDs. Most of the callers know that their ID is fine, so they can simply assert that there is no error. Behaviour doesn't change with this patch yet as bdrv_new() doesn't actually assign errors to errp. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2014-04-22convert fprintf() calls to error_setg() in block/qed.c:bdrv_qed_create()Aakriti Gupta1-7/+9
This patch converts fprintf() calls to error_setg() in block/qed.c:bdrv_qed_create() (error_setg() is part of error reporting API in include/qapi/error.h) Signed-off-by: Aakriti Gupta <aakritty@gmail.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-04-22block: Remove -errno return value from bdrv_assign_node_nameKevin Wolf1-12/+11
It takes an errp argument. That's enough for error handling. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-04-22curl: Replaced old error handling with error reporting API.Maria Kustova1-1/+1
Signed-off-by: Maria Kustova <maria.k@catit.be> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-04-22block: Handle error of bdrv_getlength in bdrv_create_dirty_bitmapFam Zheng4-8/+41
bdrv_getlength could fail, check the return value before using it. Return NULL and set errno if it fails. Callers are updated to handle the error case. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-04-22vmdk: Fix %d and %lld to PRI* in format stringsFam Zheng1-6/+7
Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-04-22block: Check bdrv_getlength() return value in bdrv_make_zero()Kevin Wolf1-1/+7
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
2014-04-22block: Catch integer overflow in bdrv_rw_co()Kevin Wolf2-4/+5
Insanely large requests could cause an integer overflow in bdrv_rw_co() while converting sectors to bytes. This patch catches the problem and returns an error (if we hadn't overflown the integer here, bdrv_check_byte_request() would have rejected the request, so we're not breaking anything that was supposed to work before). We actually do have a test case that triggers behaviour where we accidentally let such a request pass, so that it would return success, but read 0 bytes instead of the requested 4 GB. It fails now like it should. If the vdi block driver wants to be able to deal with huge images, it can't read the whole block bitmap at once into memory like it does today, but needs to use a metadata cache like qcow2 does. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-04-22block: Limit size to INT_MAX in bdrv_check_byte_request()Kevin Wolf1-0/+4
Commit 8f4754ed intended to protect against integer overflow bugs in block drivers by making sure that a single request that is passed to drivers is no longer than INT_MAX bytes. However, meanwhile there are some callers that don't use that code path any more but call bdrv_check_byte_request() directy, so let's add a check there as well. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
2014-04-22block: Fix nb_sectors check in bdrv_check_byte_request()Kevin Wolf1-1/+1
nb_sectors is signed, check for negative values. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
2014-04-18tcg: Use HOST_WORDS_BIGENDIANRichard Henderson12-32/+12
Instead of rolling a local TCG_TARGET_WORDS_BIGENDIAN. Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-18tcg: Fix fallback from muls2_i64 to mulu2_i64Richard Henderson1-20/+18
Brown Bag sez, don't put the fallback code into the wrong function. Also, check for muluh_i64 and use tcg_gen_mulu2_i64 instead of raw ops. Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-18tcg: Use tcg_gen_mulu2_i32 in tcg_gen_muls2_i32Richard Henderson1-4/+2
Rather than hard-coding use of mulu2_i32, allow muluh_i32. Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-18tcg: Relax requirement for mulu2_i32 on 32-bit hostsRichard Henderson5-1/+12
Instead require either mulu2_i32 or muluh_i32. The code in tcg-op.h already supports looking for both. Previous incomplete conversion? Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-18tcg-s390: Remove W constraintRichard Henderson1-24/+19
Now redundant with the type parameter to tcg_target_const_match. Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-18tcg-sparc: Use the type parameter to tcg_target_const_matchRichard Henderson1-1/+7
Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-18tcg-ppc64: Use the type parameter to tcg_target_const_matchRichard Henderson1-1/+9
Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-18tcg-aarch64: Remove w constraintRichard Henderson1-22/+18
Now redundant with the type parameter to tcg_target_const_match. Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-18tcg: Add TCGType parameter to tcg_target_const_matchRichard Henderson11-13/+13
Most 64-bit targets need to be able to ignore the high bits of a TCG_TYPE_I32 value. Suggested-by: Stuart Brady <sdb@zubnet.me.uk> Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-18tcg: Fix out of range shift in deposit optimizationsRichard Henderson1-6/+4
By inspection, for a deposit(x, y, 0, 64), we'd have a shift of (1<<64) and everything else falls apart. But we can reuse the existing deposit logic to get this right. Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-18tci: Mask shift counts to avoid undefined behaviorRichard Henderson1-10/+10
TCG now requires unspecified behavior rather than a potential crash, bring the C shift within the letter of the law. Signed-off-by: Richard Henderson <rth@twiddle.net>