- 10 2月, 2015 21 次提交
-
-
由 Maxim Ostapenko 提交于
Fix TARGET_SI_PAD_SIZE calculation to match the way the kernel does it. Use different TARGET_SI_PREAMBLE_SIZE for 32-bit and 64-bit targets. Signed-off-by: NMaxim Ostapenko <m.ostapenko@partner.samsung.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Kevin Wolf 提交于
The size of the stack allocated host[] array didn't account for the terminating '\0' byte that sscanf() writes. Fix the array size. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NJohn Snow <jsnow@redhat.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Christian Borntraeger 提交于
valgrind complains about: ==42062== 16 bytes in 1 blocks are definitely lost in loss record 387 of 1,048 ==42062== at 0x402DCB2: malloc (vg_replace_malloc.c:299) ==42062== by 0x40C1BE3: g_malloc (in /usr/lib64/libglib-2.0.so.0.3800.2) ==42062== by 0x40DA133: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.3800.2) ==42062== by 0x40DB2E5: g_slist_prepend (in /usr/lib64/libglib-2.0.so.0.3800.2) ==42062== by 0x801637FF: object_class_get_list_tramp (object.c:690) ==42062== by 0x40A96C9: g_hash_table_foreach (in /usr/lib64/libglib-2.0.so.0.3800.2) ==42062== by 0x80164885: object_class_foreach (object.c:665) ==42062== by 0x80164975: object_class_get_list (object.c:698) ==42062== by 0x800100A5: machine_parse (vl.c:2447) ==42062== by 0x800100A5: main (vl.c:3756) Lets free machines in case of mc. Signed-off-by: NChristian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Paolo Bonzini 提交于
bits is checked to be 128, 192 or 256 at the beginning of the function. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Paolo Bonzini 提交于
Coverity complains about not checking the returned value of mkstemp. While at it, also improve error checking for snprintf, and refine error messages in general. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Paolo Bonzini 提交于
Use MIN instead of an "if" statement. Move "tb" assignment where the value is actually used. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Paolo Bonzini 提交于
All uses of TB inside cpu_exec are dominated by "tb = tb_find_fast(env)", and there are no uses after the switch statement. So the assignment is dead, as reported by Coverity. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Thomas Huth 提交于
The logging of the CPU state during reset is done for all architectures nowadays (see cpu_common_reset() in qom/cpu.c), so the "x86 only" text does not apply here anymore. Signed-off-by: NThomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Chen Gang S 提交于
linux-user/syscall.c: do_ioctl_dm: Need to call unlock_user() before going to failure return in default case In abi_long do_ioctl_dm(), after lock_user() call, the code does not call unlock_user() before going to failure return in default case. Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Chen Gang S 提交于
In main.c, all SIG* should be TARGET_SIG*, since the relevant functions (queue_signal() and gdb_handlesig()) expect TARGET_SIG*. The corresponding vi command is "1,$ s/\<SIG/TARGET_SIG/g". Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Chen Gang S 提交于
linux-user/syscall.c: Fix typo issue for using target_vec[i].iov_len instead of target_vec[i].iov_base It is only a typo issue, need use tswapal(target_vec[i].iov_len) for the len. Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Chen Gang S 提交于
When failure occurs during locking of vec[i], we also need to unlock all already locked vec[i] in failure processing code block before return. Code in unlock_user() checks vec[i].iov_base for NULL, so there's no need not check it . If error is EFAULT when "i == 0", vec[i].iov_base is NULL, we can just skip it, so can still use "while (--i >= 0)" loop condition. Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Gonglei 提交于
Signed-off-by: NGonglei <arei.gonglei@huawei.com> Reviewed-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Markus Armbruster 提交于
monitor_parse() desugars --monitor, --qmp and -qmp-pretty to --mon. The ID it picks can clash with a user-specified ID. When it happens, the error message is misleading. Reproducer: $ qemu --mon id=compat_monitor0 --monitor stdio Message before the patch: duplicate chardev: compat_monitor0 There's no "duplicate chardev" here. The problem is a duplicate monitor ID. Moreover, the message provides no clue which option caused the problem. The patch changes the message to: qemu: --monitor stdio: Duplicate ID 'compat_monitor0' for mon monitor_parse() is also used for creating a default monitor, but that's not done when the user specifies a monitor, so an ID clash is impossible then. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Don Koch 提交于
Signed-off-by: NDon Koch <dkoch@verizon.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Don Koch 提交于
Add trace calls. Convert some #ifdef DEBUG printfs to trace. Signed-off-by: NDon Koch <dkoch@verizon.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Don Koch 提交于
Signed-off-by: NDon Koch <dkoch@verizon.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Don Koch 提交于
Signed-off-by: NDon Koch <dkoch@verizon.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Gonglei 提交于
Signed-off-by: NGonglei <arei.gonglei@huawei.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Markus Armbruster 提交于
Commit fecd2646 added a number of fall-throughs, but neglected to properly document them as intentional. Commit d9224450 cleaned that up for many, but not all cases. Take care of the remaining ones. Spotted by Coverity. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
由 Leon Yu 提交于
Signed-off-by: NLeon Yu <chianglungyu@gmail.com> Message-id: 1422853731-5282-1-git-send-email-chianglungyu@gmail.com Fixes: df887684 ("monitor: add query-vnc-servers command") Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 07 2月, 2015 19 次提交
-
-
由 Peter Maydell 提交于
Block patches for 2.3 # gpg: Signature made Fri 06 Feb 2015 17:14:10 GMT using RSA key ID C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" * remotes/kevin/tags/for-upstream: (47 commits) block/raw-posix.c: Fix raw_getlength() on Mac OS X block devices block: Eliminate silly QERR_ macros used for encryption keys block: New bdrv_add_key(), convert monitor to use it blockdev: Eliminate silly QERR_BLOCK_JOB_NOT_ACTIVE macro blockdev: Give find_block_job() an Error ** parameter qcow2: Rewrite qcow2_alloc_bytes() block: Give always priority to unused entries in the qcow2 L2 cache nbd: fix max_discard/max_transfer_length block: introduce BDRV_REQUEST_MAX_SECTORS nbd: Improve error messages iotests: Fix 104 for NBD iotests: Fix 100 for nbd iotests: Fix 083 block: fix off-by-one error in qcow and qcow2 qemu-iotests: add 116 invalid QED input file tests qed: check for header size overflow block/dmg: improve zeroes handling block/dmg: support bzip2 block entry types block/dmg: factor out block type check block/dmg: use SectorNumber from BLKX header ... Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Programmingkid 提交于
This patch replaces the dummy code in raw_getlength() for block devices on OS X, which always returned LLONG_MAX, with a real implementation that returns the actual block device size. Signed-off-by: NJohn Arbuckle <programmingkidx@gmail.com> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Tested-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
* mreitz/block: block: Eliminate silly QERR_ macros used for encryption keys block: New bdrv_add_key(), convert monitor to use it blockdev: Eliminate silly QERR_BLOCK_JOB_NOT_ACTIVE macro blockdev: Give find_block_job() an Error ** parameter
-
由 Markus Armbruster 提交于
The QERR_ macros are leftovers from the days of "rich" error objects. They're used with error_set() and qerror_report(), and expand into the first *two* arguments. This trickiness has become pointless. Clean up QERR_DEVICE_ENCRYPTED and QERR_DEVICE_NOT_ENCRYPTED. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Message-id: 1422524221-8566-5-git-send-email-armbru@redhat.com Reviewed-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NMax Reitz <mreitz@redhat.com>
-
由 Markus Armbruster 提交于
Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Message-id: 1422524221-8566-4-git-send-email-armbru@redhat.com Reviewed-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NMax Reitz <mreitz@redhat.com>
-
由 Markus Armbruster 提交于
The QERR_ macros are leftovers from the days of "rich" error objects. They're used with error_set() and qerror_report(), and expand into the first *two* arguments. This trickiness has become pointless. Clean this one up. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Message-id: 1422524221-8566-3-git-send-email-armbru@redhat.com Reviewed-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NMax Reitz <mreitz@redhat.com>
-
由 Markus Armbruster 提交于
When find_block_job() fails, all its callers build the same Error object. Build it in find_block_job() instead. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com> Message-id: 1422524221-8566-2-git-send-email-armbru@redhat.com Reviewed-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NMax Reitz <mreitz@redhat.com>
-
由 Max Reitz 提交于
qcow2_alloc_bytes() is a function with insufficient error handling and an unnecessary goto. This patch rewrites it. Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Alberto Garcia 提交于
The current algorithm to replace entries from the L2 cache gives priority to newer hits by dividing the hit count of all existing entries by two everytime there is a cache miss. However, if there are several cache misses the hit count of the existing entries can easily go down to 0. This will result in those entries being replaced even when there are others that have never been used. This problem is more noticeable with larger disk images and cache sizes, since the chances of having several misses before the cache is full are higher. If we make sure that the hit count can never go down to 0 again, unused entries will always have priority. Signed-off-by: NAlberto Garcia <berto@igalia.com> Reviewed-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Denis V. Lunev 提交于
nbd_co_discard calls nbd_client_session_co_discard which uses uint32_t as the length in bytes of the data to discard due to the following definition: struct nbd_request { uint32_t magic; uint32_t type; uint64_t handle; uint64_t from; uint32_t len; <-- the length of data to be discarded, in bytes } QEMU_PACKED; Thus we should limit bl_max_discard to UINT32_MAX >> BDRV_SECTOR_BITS to avoid overflow. NBD read/write code uses the same structure for transfers. Fix max_transfer_length accordingly. Signed-off-by: NDenis V. Lunev <den@openvz.org> CC: Peter Lieven <pl@kamp.de> CC: Kevin Wolf <kwolf@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Peter Lieven 提交于
we check and adjust request sizes at several places with sometimes inconsistent checks or default values: INT_MAX INT_MAX >> BDRV_SECTOR_BITS UINT_MAX >> BDRV_SECTOR_BITS SIZE_MAX >> BDRV_SECTOR_BITS This patches introdocues a macro for the maximal allowed sectors per request and uses it at several places. Signed-off-by: NPeter Lieven <pl@kamp.de> Reviewed-by: NDenis V. Lunev <den@openvz.org> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
This patch makes use of the Error object for nbd_receive_negotiate() so that errors during negotiation look nicer. Furthermore, this patch adds an additional error message if the received magic was wrong, but would be correct for the other protocol version, respectively: So if an export name was specified, but the NBD server magic corresponds to an old handshake, this condition is explicitly signaled to the user, and vice versa. As these messages are now part of the "Could not open image" error message, additional filtering has to be employed in iotest 083, which this patch does as well. Signed-off-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
_make_test_img sets up an NBD server, _cleanup_test_img shuts it down; thus, _cleanup_test_img has to be called before _make_test_img is invoked another time. Furthermore, the pipe through _filter_test_img was unnecessary; _make_test_img already takes care of that. And finally, a filter is added to _filter_img_info to replace "nbd://127.0.0.1:10810" by "TEST_DIR/t.IMGFMT", since the former is the way to express the full image path (normally the latter) for NBD tests. Signed-off-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
In case of NBD, _make_test_img starts a new NBD server. Therefore, _cleanup_test_img (which shuts that server down) has to be invoked before the next _make_test_img call in order to make 100 work for NBD. Signed-off-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
As of 8f9e835f, probing should be disabled in the qemu-iotests (at least when using qemu-io). This broke 083's reference output (which consisted mostly of "Could not read image for determining its format"). This patch fixes it. Note that one case which failed before is now successful: Disconnect after data. This is due to qemu having read twice before (once for probing, once for the qemu-io read command), but only once now (the qemu-io read command). Therefore, reading is successful (which is correct). Signed-off-by: NMax Reitz <mreitz@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Jeff Cody 提交于
This fixes an off-by-one error introduced in 9a29e18f. Both qcow and qcow2 need to make sure to leave room for string terminator '\0' for the backing file, so the max length of the non-terminated string is either 1023 or PATH_MAX - 1. Reported-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NJeff Cody <jcody@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Stefan Hajnoczi 提交于
These tests exercise error code paths in the QED image format. The tests are very simple, they just prove that the error path exits cleanly. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Message-id: 1421065893-18875-3-git-send-email-stefanha@redhat.com Reviewed-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Stefan Hajnoczi 提交于
Header size is denoted in clusters. The maximum cluster size is 64 MB but there is no limit on header size. Check for uint32_t overflow in case the header size field has a whacky value. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Message-id: 1421065893-18875-2-git-send-email-stefanha@redhat.com Reviewed-by: NKevin Wolf <kwolf@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Peter Wu 提交于
Disk images may contain large all-zeroes gaps (1.66k sectors or 812 MiB is seen in the real world). These blocks (type 2) do not need to be extracted into a temporary buffer, there is no need to allocate memory for these blocks nor to check its length. (For the test image, the maximum uncompressed size is 1054371 bytes, probably for a bzip2-compressed block.) Signed-off-by: NPeter Wu <peter@lekensteyn.nl> Reviewed-by: NJohn Snow <jsnow@redhat.com> Message-id: 1420566495-13284-13-git-send-email-peter@lekensteyn.nl Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-