summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * target-alpha: Convert opcode 0x12 to source/sinkRichard Henderson2014-04-171-36/+27
| | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
| * target-alpha: Convert opcode 0x11 to source/sinkRichard Henderson2014-04-171-89/+37
| | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
| * target-alpha: Introduce functions for source/sinkRichard Henderson2014-04-171-233/+163
| | | | | | | | | | | | | | This will allow cleaner handling of $31 and $f31. Convert opcodes 0x08, 0x09, 0x10 as examples. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * target-alpha: Introduce REQUIRE_REG_31Richard Henderson2014-04-171-26/+44
| | | | | | | | | | | | | | | | We were missing quite a few checks for Ra or Rb required to be 31. Further, the one place we did check we also checked for no literal operand and the Handbook says nothing about that. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * target-alpha: Introduce REQUIRE_TB_FLAGRichard Henderson2014-04-171-184/+133
| | | | | | | | | | | | | | The methods by which we check for cpu features varied wildly across the function. Using a nice macro cleans this up. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * target-alpha: fix the bracesPaolo Bonzini2014-04-171-133/+180
| | | | | | | | | | | | | | | | Conform to coding style, and avoid further occurrences of bugs due to misplaced braces. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
* | Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into stagingPeter Maydell2014-04-2518-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>
| * | block/cloop: use PRIu32 format specifier for uint32_tStefan Hajnoczi2014-04-231-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>
| * | vmdk: Fix "%x" to PRIx32 in format strings for cidFam Zheng2014-04-221-5/+5
| | | | | | | | | | | | | | | Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | qemu-img: Improve error messagesFam Zheng2014-04-221-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>
| * | qemu-iotests: Check common namespace for id and node-nameKevin Wolf2014-04-222-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>
| * | block: Catch duplicate IDs in bdrv_new()Kevin Wolf2014-04-224-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>
| * | qemu-img: Avoid duplicate block device IDsKevin Wolf2014-04-221-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>
| * | block: Add errp to bdrv_new()Kevin Wolf2014-04-229-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>
| * | convert fprintf() calls to error_setg() in block/qed.c:bdrv_qed_create()Aakriti Gupta2014-04-221-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>
| * | block: Remove -errno return value from bdrv_assign_node_nameKevin Wolf2014-04-221-12/+11
| | | | | | | | | | | | | | | | | | It takes an errp argument. That's enough for error handling. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | curl: Replaced old error handling with error reporting API.Maria Kustova2014-04-221-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>
| * | block: Handle error of bdrv_getlength in bdrv_create_dirty_bitmapFam Zheng2014-04-224-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>
| * | vmdk: Fix %d and %lld to PRI* in format stringsFam Zheng2014-04-221-6/+7
| | | | | | | | | | | | | | | Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | block: Check bdrv_getlength() return value in bdrv_make_zero()Kevin Wolf2014-04-221-1/+7
| | | | | | | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
| * | block: Catch integer overflow in bdrv_rw_co()Kevin Wolf2014-04-222-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>
| * | block: Limit size to INT_MAX in bdrv_check_byte_request()Kevin Wolf2014-04-221-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>
| * | block: Fix nb_sectors check in bdrv_check_byte_request()Kevin Wolf2014-04-221-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>
* | | Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-5' into stagingPeter Maydell2014-04-246-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>
| * | | usb: mtp filesharingGerd Hoffmann2014-04-234-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>
| * | | usb: add CompatibleID support to msosGerd Hoffmann2014-04-222-1/+6
| |/ / | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | Merge remote-tracking branch 'remotes/rth/tags/tcg-next-20140422' into stagingPeter Maydell2014-04-2426-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>
| * | | tcg: Use HOST_WORDS_BIGENDIANRichard Henderson2014-04-1812-32/+12
| | | | | | | | | | | | | | | | | | | | | | | | Instead of rolling a local TCG_TARGET_WORDS_BIGENDIAN. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | tcg: Fix fallback from muls2_i64 to mulu2_i64Richard Henderson2014-04-181-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>
| * | | tcg: Use tcg_gen_mulu2_i32 in tcg_gen_muls2_i32Richard Henderson2014-04-181-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | Rather than hard-coding use of mulu2_i32, allow muluh_i32. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | tcg: Relax requirement for mulu2_i32 on 32-bit hostsRichard Henderson2014-04-185-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>
| * | | tcg-s390: Remove W constraintRichard Henderson2014-04-181-24/+19
| | | | | | | | | | | | | | | | | | | | | | | | Now redundant with the type parameter to tcg_target_const_match. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | tcg-sparc: Use the type parameter to tcg_target_const_matchRichard Henderson2014-04-181-1/+7
| | | | | | | | | | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | tcg-ppc64: Use the type parameter to tcg_target_const_matchRichard Henderson2014-04-181-1/+9
| | | | | | | | | | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | tcg-aarch64: Remove w constraintRichard Henderson2014-04-181-22/+18
| | | | | | | | | | | | | | | | | | | | | | | | Now redundant with the type parameter to tcg_target_const_match. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | tcg: Add TCGType parameter to tcg_target_const_matchRichard Henderson2014-04-1811-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>
| * | | tcg: Fix out of range shift in deposit optimizationsRichard Henderson2014-04-181-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>
| * | | tci: Mask shift counts to avoid undefined behaviorRichard Henderson2014-04-181-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>
| * | | tcg: Mask shift quantities while foldingRichard Henderson2014-04-181-15/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TCG result would be undefined, but we can at least produce one plausible result and avoid triggering the wrath of analysis tools. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | tcg: Use "unspecified behavior" for shiftsRichard Henderson2014-04-181-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the definition such that shifts are not allowed to crash for any input. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | tcg: Fix warning (1 bit signed bitfield entry) and replace int by boolStefan Weil2014-04-185-13/+13
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Static code analyzers complain about signed bitfields with only a single bit. is_ld is used as a boolean value, so make it bool. ppc64 already used bool for the 2nd argument is_ld of the local function add_qemu_ldst_label. Modify all other TCG targets to do follow this example. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Richard Henderson <rth@twiddle.net>
* | | Merge remote-tracking branch 'remotes/rth/tags/tcg-ia64-pull-20140421' into ↵Peter Maydell2014-04-242-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>
| * | | tcg-ia64: Convert to new ldst opcodesRichard Henderson2014-04-172-67/+35
| | | | | | | | | | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | tcg-ia64: Move part of softmmu slow path out of lineRichard Henderson2014-04-171-62/+114
| | | | | | | | | | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | tcg-ia64: Convert to new ldst helpersRichard Henderson2014-04-171-62/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Still inline, but updated to the new routines. Always use the LE helpers, reusing the bswap between the fast and slot paths. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | tcg-ia64: Reduce code duplication in tcg_out_qemu_ldRichard Henderson2014-04-171-37/+24
| | | | | | | | | | | | | | | | | | | | | | | | The only differences were in the bswap insns emitted. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | tcg-ia64: Move tlb addend load into tlb readRichard Henderson2014-04-171-12/+12
| | | | | | | | | | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | tcg-ia64: Move bswap for store into tlb loadRichard Henderson2014-04-171-63/+31
| | | | | | | | | | | | | | | | | | | | | | | | Saving at least two cycles per store, and cleaning up the code. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | tcg-ia64: Re-bundle the tlb loadRichard Henderson2014-04-171-23/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This sequencing requires 5 stop bits instead of 6, and has room left over to pre-load the tlb addend, and bswap data prior to being stored. Signed-off-by: Richard Henderson <rth@twiddle.net>
| * | | tcg-ia64: Optimize small arguments to exit_tbRichard Henderson2014-04-171-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | Saves one bundle for the common case of exit_tb 0. Signed-off-by: Richard Henderson <rth@twiddle.net>
OpenPOWER on IntegriCloud