summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* curl: Remove unnecessary use of gotoMatthew Booth2014-04-301-28/+27
| | | | | | | | This isn't any of the usually acceptable uses of goto. Signed-off-by: Matthew Booth <mbooth@redhat.com> Tested-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* curl: Fix long lineMatthew Booth2014-04-301-1/+2
| | | | | | Signed-off-by: Matthew Booth <mbooth@redhat.com> Tested-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block/vdi: Error out immediately in vdi_create()Max Reitz2014-04-301-1/+6
| | | | | | | | | | | | | | Currently, if an error occurs during the part of vdi_create() which actually writes the image, the function stores -errno, but continues anyway. Instead of trying to write data which (if it can be written at all) does not make any sense without the operations before succeeding (e.g., writing the image header), just error out immediately. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block/bochs: Fix error handling for seek_to_sector()Max Reitz2014-04-301-9/+14
| | | | | | | | | | | | | | | | | | | Currently, seek_to_sector() returns -1 both for errors and unallocated sectors, resulting in silent errors. As 0 is an invalid offset of data clusters (bitmap_offset is greater than 0 because s->data_offset is greater than 0), just return 0 for unallocated sectors and -errno in case of error. This should then be propagated by bochs_read(), the sole user of seek_to_sector(). That function also has a case of "return -1 in case of error", which is fixed by this patch as well. bochs_read() is called by bochs_co_read() which passes the return value through, therefore it is indeed correct for bochs_read() to return -errno. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qcow2: Check min_size in qcow2_grow_l1_table()Max Reitz2014-04-301-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | First, new_l1_size is an int64_t, whereas min_size is a uint64_t. Therefore, during the loop which adjusts new_l1_size until it equals or exceeds min_size, new_l1_size might overflow and become negative. The comparison in the loop condition however will take it as an unsigned value (because min_size is unsigned) and therefore recognize it as exceeding min_size. Therefore, the loop is left with a negative new_l1_size, which is not correct. This could be fixed by making new_l1_size uint64_t. On the other hand, however, by doing this, the while loop may take forever. If min_size is e.g. UINT64_MAX, it will take new_l1_size probably multiple overflows to reach the exact same value (if it reaches it at all). Then, right after the loop, new_l1_size will be recognized as being too big anyway. Both problems require a ridiculously high min_size value, which is very unlikely to occur; but both problems are also simply avoided by checking whether min_size is sane before calculating new_l1_size (which should still be checked separately, though). Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qcow2: Catch bdrv_getlength() errorMax Reitz2014-04-301-0/+5
| | | | | | | | The call to bdrv_getlength() from qcow2_check_refcounts() may result in an error. Check this and abort if necessary. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block: Use correct width in format stringsMax Reitz2014-04-306-24/+28
| | | | | | | | | | | Instead of blindly relying on a normal integer having a width of 32 bits (which is a pretty good assumption, but we should not rely on it if there is no need), use the correct format string macros. This does not touch DEBUG output. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qcow2: Avoid overflow in alloc_clusters_noref()Max Reitz2014-04-301-0/+7
| | | | | | | | | | | alloc_clusters_noref() stores the cluster index in a uint64_t. However, offsets are often represented as int64_t (as for example the return value of alloc_clusters_noref() itself demonstrates). Therefore, we should make sure all offsets in the allocated range of clusters are representable using int64_t without overflows. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block: Use error_abort in bdrv_image_info_specific_dump()Max Reitz2014-04-301-2/+1
| | | | | | | | | | | | | Currently, bdrv_image_info_specific_dump() uses an error variable for visit_type_ImageInfoSpecific, but ignores the result. As this function is used here with an output visitor to transform the ImageInfoSpecific object to a generic QDict, an error should actually be impossible. It is however better to assert that this is indeed the case. This is done by this patch using error_abort instead of an unused local Error variable. Signed-off-by: Max Reitz <mreitz@redhat.com> Reported-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block: Fix open_flags in bdrv_reopen()Kevin Wolf2014-04-301-1/+4
| | | | | | | | | | Use the same function as bdrv_open() for determining what the right flags for bs->file are. Without doing this, a reopen means that bs->file loses BDRV_O_CACHE_WB or BDRV_O_UNMAP if bs doesn't have it as well. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* Revert "block: another bdrv_append fix"Kevin Wolf2014-04-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 3a389e7926750cba5c83f662b1941888b2bebc04. The commit was wrong and what it tried to fix just works today without any change. What the commit tried to fix: When creating live snapshots, the new image file is opened with BDRV_O_NO_BACKING because the whole backing chain is already opened. It is then appended to the chain using bdrv_append(). The result of this was that the image had a backing file, but BDRV_O_NO_BACKING was still set. This is obviously inconsistent. There used to be some places in qemu that closed and image and then opened it again, with its old flags (a bdrv_open()/close() sequence involves reopening the whole backing file chain, too). In this case the BDRV_O_NO_BACKING flag meant that the backing chain wasn't reopened and only the top layer was left. (Most, but not all of these places are replaced by bdrv_reopen() today, which doesn't touch the backing files at all.) Other places that looked at bs->open_flags weren't interested in BDRV_O_NO_BACKING, so no breakage there. What it actually did: The commit moved the BDRV_O_NO_BACKING away to the backing file. Because the bdrv_open()/close() sequences only looked at the flags of the top level BlockDriverState and used it for the whole chain, the flag didn't hurt there any more. Obviously, it is still inconsistent because the backing file may have another backing file, but without practical impact. At the same time, it swapped all other flags. This is practically irrelevant as long as live snapshots only allow opening the new layer with the same flags as the old top layer. It still doesn't make any sense, and it is a time bomb that explodes as soon as the flags can differ. bdrv_append_temp_snapshot() is such a case: It adds the new flag BDRV_O_TEMPORARY for the temporary snapshot. The swapping of commit 3a389e79 results in the following nonsensical configuration: bs->open_flags: BDRV_O_TEMPORARY cleared bs->file->open_flags: BDRV_O_TEMPORARY set bs->backing_hd->open_flags: BDRV_O_TEMPORARY set bs->backing_hd->file->open_flags: BDRV_O_TEMPORARY cleared We're still lucky because the format layer ignores the flag and the protocol layer happens to get the right value, but sooner or later this is bound to go wrong... What the right fix would have been: Simply clear the BDRV_O_NO_BACKING flag when the BlockDriverState is appended to an existing backing file chain, because now it does have a backing file. Commit 4ddc07ca already implemented this silently in bdrv_append(), so we don't have to come up with a new fix. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* block: Unlink temporary files in raw-posix/win32Kevin Wolf2014-04-305-28/+18
| | | | | | | | | | | | | | Instead of having unlink() calls in the generic block layer, where we aren't even guarateed to have a file name, move them to those block drivers that are actually used and that always have a filename. Gets us rid of some #ifdefs as well. The patch also converts bs->is_temporary to a new BDRV_O_TEMPORARY open flag so that it is inherited in the protocol layer and the raw-posix and raw-win32 drivers can unlink the file. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* block: Remove BDRV_O_COPY_ON_READ for bs->fileKevin Wolf2014-04-301-1/+1
| | | | | | | | | | Copy on Read makes sense on the format level where backing files are implemented, but it's not required on the protocol level. While it shouldn't actively break anything to have COR enabled on both layers, needless serialisation and allocation checks may impact performance. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* block: Create bdrv_backing_flags()Kevin Wolf2014-04-301-6/+17
| | | | | | | | | Instead of manipulation flags inline, move the derivation of the flags of a backing file into a new function next to the existing functions that derive flags for bs->file and for the block driver open function. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* block: Create bdrv_inherited_flags()Kevin Wolf2014-04-301-2/+26
| | | | | | | | | Instead of having bdrv_open_flags() as a function that creates flags for several unrelated places and then adding open-coded flags on top, create a new function that derives the flags for bs->file from the flags for bs. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* iotests: Discarding compressed clusters on qcow2Max Reitz2014-04-293-0/+74
| | | | | | | | Add a test which discards a compressed cluster on qcow2. This should work without any problems. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* qcow2: Fix discardMax Reitz2014-04-291-8/+18
| | | | | | | | | | | | | discard_single_l2() should not implement its own version of qcow2_get_cluster_type(), but rather rely on this already existing function. By doing so, it will work for compressed clusters as well (which it did not so far). Also, rename "old_offset" to "old_l2_entry", as both are quite different (and the value is indeed of the latter kind). Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block: qemu-iotests: make test 019 and 086 work with spaced pathnamesJeff Cody2014-04-292-5/+5
| | | | | | | | | | Both tests 019 and 086 need proper quotations to work with pathnames that contain spaces. Reviewed-by: Benoit Canet <benoit@irqsave.net> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block: qemu-iotests - fix image cleanup when using spaced pathnamesJeff Cody2014-04-291-2/+2
| | | | | | | | | | | | The _rm_test_img() function in common.rc did not quote the image file, which left droppings in the scratch directory (and performed a potentially unsafe rm -f). This adds the necessary quotes. Reviewed-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* mirror: Check for bdrv_get_info resultFam Zheng2014-04-291-1/+4
| | | | | | | bdrv_get_info could fail. Add check before using the returned value. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* mirror: Fix resource leak when bdrv_getlength failsFam Zheng2014-04-291-2/+2
| | | | | | | | The direct return will skip releasing of all the resouces at immediate_exit, don't miss that. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block: Ignore duplicate or NULL format_name in bdrv_iterate_formatJeff Cody2014-04-291-1/+16
| | | | | | | | | | | | | | | | | | | | Some block drivers have multiple BlockDriver instances with identical format_name fields (e.g. gluster, nbd). Both qemu-img and qemu will use bdrv_iterate_format() to list the supported formats when a help option is invoked. As protocols and formats may register multiple drivers, redundant listings of formats occur (e.g., "Supported formats: ... gluster gluster gluster gluster ... "). Since the list of driver formats will be small, this performs a simple linear search on format_name, and ignores any duplicates. The end result change is that the iterator will no longer receive duplicate string names, nor will it receive NULL pointers. Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block: Add '--version' option to qemu-imgJeff Cody2014-04-291-4/+11
| | | | | | | | | | | | | This allows qemu-img to print out version information, without needing to print the long help wall of text. While there, perform some minor whitespace cleanup, and remove the unused option_index variable in the call to getopt_long(). Reported-by: Eric Blake <eblake@redhat.com> Signed-off-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* mirror: Use DIV_ROUND_UPFam Zheng2014-04-281-1/+1
| | | | | | | | | Although bdrv_getlength() was just called above this, and checked for error, it is better to just use the value we already get, and use DIV_ROUND_UP. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* block: fix qemu-img --help invocationJeff Cody2014-04-281-2/+13
| | | | | | | | | | This fixes a bug introduced in commit ac1307ab, that caused the '--help' option to not be recognized as a valid command, and not print any help. Signed-off-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* Merge remote-tracking branch 'remotes/otubo/seccomp' into stagingPeter Maydell2014-04-281-1/+6
|\ | | | | | | | | | | | | | | * remotes/otubo/seccomp: seccomp: add shmctl(), mlock(), and munlock() to the syscall whitelist seccomp: add timerfd_create and timerfd_settime to the whitelist Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * seccomp: add shmctl(), mlock(), and munlock() to the syscall whitelistPaul Moore2014-04-251-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Additional testing reveals that PulseAudio requires shmctl() and the mlock()/munlock() syscalls on some systems/configurations. As before, on systems that do require these syscalls, the problem can be seen with the following command line: # qemu -monitor stdio -sandbox on \ -device intel-hda -device hda-duplex Signed-off-by: Paul Moore <pmoore@redhat.com> Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
| * seccomp: add timerfd_create and timerfd_settime to the whitelistFelix Geyer2014-04-251-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libusb calls timerfd_create() and timerfd_settime() when it's built with timerfd support. Command to reproduce: -device usb-host,hostbus=1,hostaddr=3,id=hostdev0 Log messages: audit(1390730418.924:135): auid=4294967295 uid=121 gid=103 ses=4294967295 pid=5232 comm="qemu-system-x86" sig=31 syscall=283 compat=0 ip=0x7f2b0f4e96a7 code=0x0 audit(1390733100.580:142): auid=4294967295 uid=121 gid=103 ses=4294967295 pid=16909 comm="qemu-system-x86" sig=31 syscall=286 compat=0 ip=0x7f03513a06da code=0x0 Reading a few hundred MB from a USB drive on x86_64 shows this syscall distribution. Therefore the timerfd_settime priority is set to 242. calls syscall --------- ---------------- 5303600 write 2240554 read 2167030 ppoll 2134828 ioctl 704023 timerfd_settime 689105 poll 83122 futex 803 writev 476 rt_sigprocmask 287 recvmsg 178 brk Signed-off-by: Felix Geyer <debfx@fobos.de> Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
* | Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-04-28' ↵Peter Maydell2014-04-2822-92/+1155
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging trivial patches for 2014-04-28 # gpg: Signature made Mon 28 Apr 2014 05:56:01 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-28: slirp/smb: Move ncalrpc directory to tmp po: add proper Language: tags to .po files po/Makefile: fix $SRC_PATH reference init_paths: fix minor memory leak virtfs-proxy-helper: fix call to accept net/net.c: remove unnecessary semicolon Add QEMU logo (SVG file) vl: avoid closing stdout with 'writeconfig' xilinx: Fix typo in comment (Marvel -> Marvell) vl: Eliminate a superfluous local variable vl: Remove useless 'continue' gitignore: cleanups #2 tests/.gitignore: Ignore test-rfifolock move test-* from .gitignore to tests/.gitignore configure: Improve help behavior vl: convert -m to QemuOpts qemu-option: introduce qemu_find_opts_singleton misc: Use cpu_physical_memory_read and cpu_physical_memory_write Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | slirp/smb: Move ncalrpc directory to tmpMichael Buesch2014-04-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The smbd forked by qemu still uses the default ncalrpc directory in /var/run/samba. This may lead to problems, if /var/run/samba does not exist (for example if /var/run is a tmpfs and the host smbd was not started). This leads to the following error message from samba and an unworkable smbd: Failed to create pipe directory /var/run/samba/ncalrpc - No such file or directory Fix this by pointing smbd to /tmp/qemu-smb.%d.%d/ncalrpc as ncalrpc directory. Smbd will create the actual ncalrpc subdirectory on its own. Signed-off-by: Michael Buesch <m@bues.ch> Cc: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> (Applying this to -trivial because it _is_ rather trivial and because Jan does not reply for months)
| * | po: add proper Language: tags to .po filesMichael Tokarev2014-04-285-5/+5
| | | | | | | | | | | | Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * | po/Makefile: fix $SRC_PATH referenceMichael Tokarev2014-04-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The rule for messages.po appears to be slightly wrong. Move the `cd' command within parens. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Tested-by: Stefan Weil <sw@weilnetz.de>
| * | init_paths: fix minor memory leakKirill Batuzov2014-04-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fields "name" (created with strdup in new_entry) and "pathname" (created with g_strdup_printf in new_entry) of pathelem struct should be freed before the whole struct is. Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * | virtfs-proxy-helper: fix call to acceptTim Comer2014-04-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code calls accept() without initializing the size parameter which means the accept call might write too much to the stack. URL: https://bugs.gentoo.org/486714 Signed-off-by: Tim Comer <comer0@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * | net/net.c: remove unnecessary semicolonIgor Ryzhov2014-04-281-1/+1
| | | | | | | | | | | | | | | | | | Signed-off-by: Igor Ryzhov <iryzhov@arccn.ru> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * | Add QEMU logo (SVG file)Stefan Weil2014-04-281-0/+1010
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "Q" of the logo is already included in pc-bios/qemu_logo_no_text.svg. This file now adds the complete logo as it was designed by Benoît Canet. Benoît licensed it under CC-BY 3.0, see http://lists.gnu.org/archive/html/qemu-devel/2012-02/msg02865.html. Unneeded borders from Benoît's original logo were removed, and metadata (license, author, date) was added in this version. Cc: Benoît Canet <benoit@irqsave.net> Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * | vl: avoid closing stdout with 'writeconfig'Chen Gang2014-04-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'writeconfig' supports output to stdout (with '-'); when that happens, we must not close stdout, or further command line options that also use stdout will be impacted. (Although 'writeconfig' was copied from 'readconfig', the latter does not have the problem because it does not support reading from '-') Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * | xilinx: Fix typo in comment (Marvel -> Marvell)Stefan Weil2014-04-281-1/+1
| | | | | | | | | | | | | | | | | | Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * | vl: Eliminate a superfluous local variableChen Gang2014-04-281-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | CODING_STYLE frowns upon mixing declarations and statements. main() has such a declaration. Clean up by eliminating the variable. Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * | vl: Remove useless 'continue'Chen Gang2014-04-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | "This if else has no code between it and the end of the enclosing while loop. This makes this continue redundant." Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * | gitignore: cleanups #2Michael Tokarev2014-04-281-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few more cleanups for .gitignore file. The final goal is to have only files in there which are generated during build. Things like .orig or .gdbinit are definitely not generated during build. Also, anchor a few more build-time directories. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * | tests/.gitignore: Ignore test-rfifolockCole Robinson2014-04-271-0/+1
| | | | | | | | | | | | | | | Signed-off-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * | move test-* from .gitignore to tests/.gitignoreLaszlo Ersek2014-04-272-11/+9
| | | | | | | | | | | | | | | | | | | | | Also sort the test-* entries in the latter. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * | configure: Improve help behaviorFam Zheng2014-04-271-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Old: There are two paths to show help and exit 1, one is with "-h" or "--help", one is with invalid options. New: Show help and exit 0 for --help. On invalid option, don't show the long help and bury the early "ERROR:" line, just give a message pointing to --help. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * | vl: convert -m to QemuOptsIgor Mammedov2014-04-272-17/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds option to -m "size" - startup memory amount For compatibility with legacy CLI if suffix-less number is passed, it assumes amount in Mb. Otherwise user is free to use suffixed number using suffixes b,k/K,M,G Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * | qemu-option: introduce qemu_find_opts_singletonPaolo Bonzini2014-04-273-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * | misc: Use cpu_physical_memory_read and cpu_physical_memory_writeStefan Weil2014-04-274-26/+23
| | | | | | | | | | | | | | | | | | | | | | | | These functions don't need type casts (as does cpu_physical_memory_rw) and also make the code better readable. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* | | Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into stagingPeter Maydell2014-04-2831-209/+153
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remotes/qmp-unstable/queue/qmp: monitor: fix qmp_getfd() fd leak in error case HMP: support specifying dump format for dump-guest-memory HMP: fix doc of dump-guest-memory qmp: object-add: Validate class before creating object monitor: Add device_add and device_del completion. monitor: Add command_completion callback to mon_cmd_t. monitor: Fix drive_del id argument type completion. error: Remove some unused headers qerror.h: Replace QERR_NOT_SUPPORTED with QERR_UNSUPPORTED qerror.h: Remove QERR defines that are only used once qerror.h: Remove unused error classes error: Print error_report() to stderr if using qmp monitor: Remove unused monitor_print_filename error: Privatize error_print_loc vnc: Remove default_mon usage slirp: Remove default_mon usage Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | monitor: fix qmp_getfd() fd leak in error caseStefan Hajnoczi2014-04-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qemu_chr_fe_get_msgfd() transfers ownership of the file descriptor to the caller. Therefore all code paths in qmp_getfd() should either register the file descriptor somewhere or close it. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
| * | | HMP: support specifying dump format for dump-guest-memoryQiao Nuohan2014-04-252-6/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dumping guest memory is available to specify the dump format now. This patch adds options '-z|-l|-s' to HMP command dump-guest-memory to specify dumping in kdump-compression format, with zlib/lzo/snappy compression. And without these options ELF format will be used. The discussion about this feature is here: http://lists.nongnu.org/archive/html/qemu-devel/2014-03/msg04235.html Signed-off-by: Qiao Nuohan <qiaonuohan@cn.fujitsu.com> Suggested-by: Christian Borntraeger <borntraeger@de.ibm.com> Tested-by: Christian Borntraeger <borntraeger@de.ibm.com> (on s390x/kvm) Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
OpenPOWER on IntegriCloud