aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-10-28clean-up: removed duplicate #includesAnand J
Some files contain multiple #includes of the same header file. Removed most of those unnecessary duplicate entries using scripts/clean-includes. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Anand J <anand.indukala@gmail.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28scripts/clean-includes: added duplicate #include checkAnand J
Enhance the clean-includes script to optionally check for duplicate #include entries. Script might output false positive entries as well. Such entries should not be removed. So if it finds any duplicate entries script will terminate with an exit status 1. Then each and every file should be checked manually and corrected if necessary. In order to enable the check use --check-dup-head option with scripts/clean-includes. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Anand J <anand.indukala@gmail.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28monitor: deprecate 'default' optionMarc-André Lureau
This option does nothing since commit 06ac27f. Deprecate it. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28qemu-ga: Remove stray 'q' in documentationStefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28Makefile: Fix help text for target 'installer'Stefan Weil
The NSIS based installer currently does not install qemu-ga. It installs the executables and other files for the QEMU system emulation. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28s390: avoid always-true comparison in s390_pci_generate_fid()Peter Maydell
Coverity points out that the comparison "fid <= ZPCI_MAX_FID" in s390_pci_generate_fid() is always true (because fid is 32 bits and ZPCI_MAX_FID is 0xffffffff). This isn't a bug because the real loop termination condition is expressed later via an "if (...) break;" inside the loop, but it is a bit odd. Rephrase the loop to avoid the unnecessary duplicate-but-never-true conditional. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28migration: Remove unneeded NULL check from migrate_fd_error()Peter Maydell
All the callers of migrate_fd_error() pass a non-NULL error parameter, and if any did pass NULL then we would segfault in error_copy(), so remove the unnecessary NULL check earlier in the function. (Spotted by Coverity.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28scripts/hxtool: fix undefined behavour of echoDaniel Shahaf
Avoid undefined behaviour of echo(1) with backslashes in arguments The behaviour is implementation-defined, different /bin/sh's behave differently. Signed-off-by: Daniel Shahaf <danielsh@apache.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28qemu-options.hx: set: fix copy-paste errorMichael Tokarev
Reported-By: Daniel Shahaf <danielsh@apache.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28usb: Change *_exitfn return type from int to voidAkanksha Srivastava
The *_exitfn functions cannot fail and should not be returning int. This also removes the passthru_exitfn since this callback does nothing as of now. This was suggested as a Bite-sized task for code cleanup. Signed-off-by: Akanksha Srivastava <akanksha.dlf@gmail.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28MAINTAINERS: qemu-trivial informationLaurent Vivier
Information about "qemu-trivial" ML can be found in the wiki: http://wiki.qemu.org/Contribute/TrivialPatches But the first place where a developer looks is the file MAINTAINERS. This also allows the get_maintainer.pl script to display the qemu-trivial ML address when the mail subject contains "trivial". Signed-off-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28colo-compare: remove unused struct CompareChardevProps and 'props' variablezhanghailiang
After commit 0a73336d, 'props' variable in find_and_check_chardev() is unused. Remove it, togther with struct CompareChardevProps. Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Reviewed-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28milkymist-pfpu: fix potential integer overflowMichael Walle
Since the lm32 is a 32 bit architecture, just return a 32 bit value which is then converted to a 64 bit value. Spotted by coverity, CID 1005506. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28hw/block/nvme: Simplify if-statements a little bitThomas Huth
The condition '!A || (A && B)' is equivalent to '!A || B'. Buglink: https://bugs.launchpad.net/qemu/+bug/1464611 Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28target-lm32: rewrite gen_compare()Michael Walle
Drop the rX, rY and rZ stuff and use dc->r{0,1,2} directly. This should also fix the false positive in coverity CID 1005720. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28lm32: milkymist-tmu2: fix integer overflowMichael Walle
Don't truncate the multiplication and do a 64 bit one instead because because the result is stored in a 64 bit variable. Spotted by coverity, CID 1167561. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28target-lm32: disable asm logging via LOG_DIS()Michael Walle
The lm32 target already has a disassembler which logs the assembly instructions with "-d in_asm". Therefore, turn of the LOG_DIS() macro to prevent logging the assembly instructions twice. Also turn the macro in a one which is always compiled to catch any errors while the macro is turned off. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28target-lm32: swap operand of wcsr in LOG_DIS()Michael Walle
Be consistent with the reference manual. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28target-lm32: fix LOG_DIS operand orderMichael Walle
The order of most opcodes with immediates was wrong (according to the reference manual) in the (debug) logging. Additionally, one operand for the andhi instruction was completly wrong. Fix these. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28target-lm32: fix style issueMichael Walle
Both branches of the ternary operator have the same expressions. Drop the operator. This fixes: https://bugs.launchpad.net/qemu/+bug/1414293 Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Thomas Huth <huth@tuxfamily.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28hw/tpm/tpm_passthrough: Simplify if-statements a little bitThomas Huth
The condition '!A || (A && B)' is equivalent to '!A || B' Buglink: https://bugs.launchpad.net/qemu/+bug/1464611 Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28filter-dump: add missing "["Changlong Xie
Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2016-10-28Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into stagingPeter Maydell
# gpg: Signature made Thu 27 Oct 2016 22:15:57 BST # gpg: using RSA key 0x7DEF8106AAFC390E # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" # Primary key fingerprint: FAEB 9711 A12C F475 812F 18F2 88A9 064D 1835 61EB # Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76 CBD0 7DEF 8106 AAFC 390E * remotes/jnsnow/tags/ide-pull-request: qemu-iotests: Test creating floppy drives fdc: Move qdev properties to FloppyDrive fdc: Add a floppy drive qdev fdc: Add a floppy qbus macio: switch over to new byte-aligned DMA helpers dma-helpers: explicitly pass alignment into DMA helpers Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-10-28Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into stagingPeter Maydell
Block layer patches # gpg: Signature made Thu 27 Oct 2016 18:15:47 BST # gpg: using RSA key 0x7F09B272C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: (23 commits) iotests: Add test for NBD's blockdev-add interface iotests: Add assert_json_filename_equal() method socket_scm_helper: Accept fd directly iotests.py: Allow concurrent qemu instances iotests.py: Add qemu_nbd function qapi: Allow blockdev-add for NBD block/nbd: Use SocketAddress options block/nbd: Accept SocketAddress block/nbd: Add nbd_has_filename_options_conflict() block/nbd: Use qdict_put() block/nbd: Default port in nbd_refresh_filename() block/nbd: Reject port parameter without host block/nbd: Drop trailing "." in error messages qemu-iotests: Fix typo for NFS with IMGOPTSSYNTAX block: Remove bdrv_aio_ioctl() raw: Implement .bdrv_co_ioctl instead of .bdrv_aio_ioctl block: Introduce .bdrv_co_ioctl() driver callback block: Remove bdrv_ioctl() raw-posix: Don't use bdrv_ioctl() block: Use blk_co_ioctl() for all BB level ioctls ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-10-28Merge remote-tracking branch 'remotes/kraxel/tags/pull-seabios-20161027-2' ↵Peter Maydell
into staging seabios: update to 1.10.0 release. # gpg: Signature made Thu 27 Oct 2016 15:50:54 BST # gpg: using RSA key 0x4CB6D8EED3E87138 # 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>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/pull-seabios-20161027-2: seabios: update to 1.10.0 release. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-10-28Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20161027-1' into ↵Peter Maydell
staging virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d # gpg: Signature made Thu 27 Oct 2016 15:32:38 BST # gpg: using RSA key 0x4CB6D8EED3E87138 # 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>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/pull-vga-20161027-1: virtio-gpu: fix memory leak in virtio_gpu_resource_create_2d Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-10-27qemu-iotests: Test creating floppy drivesKevin Wolf
This tests the different supported methods to create floppy drives and how they interact. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-id: 1477386868-21826-5-git-send-email-kwolf@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
2016-10-27fdc: Move qdev properties to FloppyDriveKevin Wolf
This makes the FloppyDrive qdev object actually useful: Now that it has all properties that don't belong to the controller, you can actually use '-device floppy' and get a working result. Command line semantics is consistent with CD-ROM drives: By default you get a single empty floppy drive. You can override it with -drive and using the same index, but if you use -drive to add a floppy to a different index, you get both of them. However, as soon as you use any '-device floppy', even to a different slot, the default drive is disabled. Using '-device floppy' without specifying the unit will choose the first free slot on the controller. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-id: 1477386868-21826-4-git-send-email-kwolf@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
2016-10-27fdc: Add a floppy drive qdevKevin Wolf
Floppy controllers automatically create two floppy drive devices in qdev now. (They always created two drives, but managed them only internally.) Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 1477386868-21826-3-git-send-email-kwolf@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
2016-10-27fdc: Add a floppy qbusKevin Wolf
This adds a qbus to the floppy controller that should contain the floppy drives eventually. At the moment it just exists and is empty. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 1477386868-21826-2-git-send-email-kwolf@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
2016-10-27macio: switch over to new byte-aligned DMA helpersMark Cave-Ayland
Now that the DMA helpers are byte-aligned they can be called directly from the macio routines rather than emulating byte-aligned accesses via multiple block-level accesses. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-Id: 1476445266-27503-3-git-send-email-mark.cave-ayland@ilande.co.uk Signed-off-by: John Snow <jsnow@redhat.com>
2016-10-27dma-helpers: explicitly pass alignment into DMA helpersMark Cave-Ayland
The hard-coded default alignment is BDRV_SECTOR_SIZE, however this is not necessarily the case for all platforms. Use this as the default alignment for all current callers. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Eric Blake <eblake@redhat.com> Acked-by: John Snow <jsnow@redhat.com> Message-id: 1476445266-27503-2-git-send-email-mark.cave-ayland@ilande.co.uk Signed-off-by: John Snow <jsnow@redhat.com>
2016-10-27trace: Fix 'char **' compilation error in simple backendFam Zheng
Currently, the generated function body will do "strlen(arg)" but the argument could be 'char **' or 'char * const *'. Avoid that by excluding such cases in is_string check. Reported by patchew's "make docker-test-mingw@fedora". Suggested-by: Eric Blake <eblake@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1477453806-21097-1-git-send-email-famz@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-10-27iotests: Add test for NBD's blockdev-add interfaceMax Reitz
Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27iotests: Add assert_json_filename_equal() methodMax Reitz
Since the order of keys in JSON filenames is not necessarily fixed, they should not be compared to fixed strings. This method takes a Python dict as a reference, parses a given JSON filename and compares both. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27socket_scm_helper: Accept fd directlyMax Reitz
This gives us more freedom about the fd that is passed to qemu, allowing us to e.g. pass sockets. Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27iotests.py: Allow concurrent qemu instancesMax Reitz
By adding an optional suffix to the files used for communication with a VM, we can launch multiple VM instances concurrently. Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27iotests.py: Add qemu_nbd functionMax Reitz
Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27qapi: Allow blockdev-add for NBDMax Reitz
Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27block/nbd: Use SocketAddress optionsMax Reitz
Drop the use of legacy options in favor of the SocketAddress representation, even for internal use (i.e. for storing the result of the filename parsing). Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27block/nbd: Accept SocketAddressMax Reitz
Add a new option "server" to the NBD block driver which accepts a SocketAddress. "path", "host" and "port" are still supported as legacy options and are mapped to their corresponding SocketAddress representation. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27block/nbd: Add nbd_has_filename_options_conflict()Max Reitz
Right now, we have four possible options that conflict with specifying an NBD filename, and a future patch will add another one ("address"). This future option is a nested QDict that is flattened at this point, requiring us to test each option whether its key has an "address." prefix. Therefore, we will then need to iterate through all options (including the "export" option which was not covered so far). Adding this iteration logic now will simplify adding the new option later. A nice side effect is that the user will not receive a long list of five options which are not supposed to be specified with a filename, but we can actually print the problematic option. Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27block/nbd: Use qdict_put()Max Reitz
Instead of inlining this nice macro (i.e. resorting to qdict_put_obj(..., QOBJECT(...))), use it. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27block/nbd: Default port in nbd_refresh_filename()Max Reitz
Instead of not emitting the port in nbd_refresh_filename(), just set it to the default if the user did not specify it. This makes the logic a bit simpler. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27block/nbd: Reject port parameter without hostMax Reitz
Currently, a port that is passed along with a UNIX socket path is silently ignored. That is not exactly ideal, it should be an error instead. Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27block/nbd: Drop trailing "." in error messagesMax Reitz
Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27qemu-iotests: Fix typo for NFS with IMGOPTSSYNTAXKevin Wolf
Commit 076003f5 added configuration for NFS with IMGOPTSSYNTAX enabled, but it didn't use the right variable name: $TEST_DIR_OPTS doesn't exist. This fixes the mistake. However, this doesn't make anything work that was broken before: The only way to get IMGOPTSSYNTAX is with -luks, but the combination of -luks and -nfs doesn't get qemu-img create commands right (because qemu-img create doesn't support --image-opts yet), so even after this fix some more work would be required to make the tests pass. Reported-by: Tomáš Golembiovský <tgolembi@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-10-27block: Remove bdrv_aio_ioctl()Kevin Wolf
It is unused now. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-10-27raw: Implement .bdrv_co_ioctl instead of .bdrv_aio_ioctlKevin Wolf
It's the simpler interface to use for the raw format driver. Apart from that, this removes the last user of the AIO emulation implemented by bdrv_aio_ioctl(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2016-10-27block: Introduce .bdrv_co_ioctl() driver callbackKevin Wolf
This allows drivers to implement ioctls in a coroutine-based way. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>