summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | hw/riscv/sifive_u: Connect the Cadence GEM Ethernet deviceAlistair Francis2018-07-064-2/+61
| | | | | | | | | | | | | | | | | | | | | | | | Connect the Cadence GEM ethernet device. This also requires us to expose the plic interrupt lines. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Michael Clark <mjc@sifive.com>
| * | hw/riscv/sifive_u: Move the uart device tree node under /soc/Alistair Francis2018-07-061-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Michael Clark <mjc@sifive.com>
| * | hw/riscv/sifive_u: Set the interrupt controller number of interruptsAlistair Francis2018-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Set the interrupt-controller ndev to the correct number taken from the HiFive Unleashed board. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Michael Clark <mjc@sifive.com>
| * | hw/riscv/sifive_u: Set the soc device tree node as a simple-busAlistair Francis2018-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | To allow Linux to ennumerate devices on the /soc/ node set it as a "simple-bus". Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Michael Clark <mjc@sifive.com>
| * | hw/riscv/sifive_plic: Use gpios instead of irqsAlistair Francis2018-07-065-12/+9Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of creating the interrupt in lines with qemu_allocate_irq() use qdev_init_gpio_in() as this gives us the ability to use the qdev*gpio*() helpers later on. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Suggested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Michael Clark <mjc@sifive.com>
| * | hw/riscv/sifive_e: Create a SiFive E SoC objectAlistair Francis2018-07-062-27/+83
| | | | | | | | | | | | | | | Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Michael Clark <mjc@sifive.com>
| * | hw/riscv/sifive_u: Create a SiFive U SoC objectAlistair Francis2018-07-062-24/+79
|/ / | | | | | | | | | | | | | | | | | | Create a SiFive Unleashed U54 SoC and use that in the sifive_u machine. We leave the SoC, RAM, device tree and reset/fdt loading as part of the machine. All the other device creation has been moved to the SoC. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Michael Clark <mjc@sifive.com>
* | Merge remote-tracking branch ↵Peter Maydell2018-07-0521-56/+223
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/stsquad/tags/pull-code-coverage-and-build-tweaks-050718-3' into staging Code coverage and other build tweaks - revert 208ecb3e (and drop filter for mingw, tweak for check-tcg) - some travis speed-ups - modernise code coverage support - docker image cleanups - clean-up binfmt_misc docker infrastructure - add debian-powerpc-user-cross image for ppc32 build # gpg: Signature made Thu 05 Jul 2018 17:00:02 BST # gpg: using RSA key FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * remotes/stsquad/tags/pull-code-coverage-and-build-tweaks-050718-3: docker: add linux-user powered cross builder for QEMU docker: add special rule for deboostrapped images docker: add special handling for FROM:debian-%-user targets docker: debian-bootstrap.pre allow customising of variant/url docker: drop QEMU build-dep from bootstrap docker: Do not run tests in 'intermediate' images docker: Clean the MXE base image docker: ubuntu: Use SDL2 docker: ubuntu: Update the package list before installing new ones linux-user: add gcov support to preexit_cleanup linux-user: introduce preexit_cleanup build-system: add coverage-report target build-system: add clean-coverage target travis: add gcovr summary for GCOV build docker: add gcovr to travis image .gitignore: add .gcov files build-system: remove per-test GCOV reporting travis: test out-of-tree builds travis: do not waste time cloning unused submodules Revert "Makefile: Rename TARGET_DIRS to TARGET_LIST" Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | docker: add linux-user powered cross builder for QEMUAlex Bennée2018-07-052-9/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't use cross compilers in the current Debian stable and Debian sid is sketchy as hell. So for powerpc fall back to dog-fooding our own linux-user to do the build. As we can only build the base image with a suitably configured source tree we fall back to checking for its existence when we can't build it from scratch. However this does mean you don't have to keep a static powerpc-linux-user in your active configuration just to update the cross build image. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
| * | docker: add special rule for deboostrapped imagesAlex Bennée2018-07-051-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We might as well have a custom rule for this. For one thing the dependencies are different. As the primary dependency for docker-image-% could never be docker-image-debian-bootstrap we can drop that test in the main rule as well. Missing EXECUTABLE, DEB_ARCH and DEB_TYPE are treated as hard faults now. We also error out if the EXECUTABLE file isn't there. We should really do this with a dependency on any source rules but currently subdir-FOO-linux-user isn't enough on a clean build. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
| * | docker: add special handling for FROM:debian-%-user targetsAlex Bennée2018-07-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These will have been build with debootstrap so we need to check against the debian-bootstrap dockerfile. This does mean sticking to debian-FOO-user as the naming conventions for boot-strapped images. The actual cross image is built on top. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
| * | docker: debian-bootstrap.pre allow customising of variant/urlAlex Bennée2018-07-051-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We default to the buildd variant as most of our images are for building. However lets give the user the ability to specify "minbase" if they want to create a simple base image for experimentation. Allowing the tweaking of DEB_URL means we can also bootstrap other Debian based OS's. For example: make docker-binfmt-image-debian-ubuntu-bionic-arm64 \ DEB_ARCH=arm64 DEB_TYPE=bionic \ DEB_VARIANT=minbase DEB_URL=http://ports.ubuntu.com/ \ EXECUTABLE=./aarch64-linux-user/qemu-aarch64 Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
| * | docker: drop QEMU build-dep from bootstrapAlex Bennée2018-07-051-2/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | This is best done with any child images that actually need it. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
| * | docker: Do not run tests in 'intermediate' imagesPhilippe Mathieu-Daudé2018-07-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | We can still build the DOCKER_INTERMEDIATE_IMAGES images, but they won't appear in 'make test*@$IMAGE'. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
| * | docker: Clean the MXE base imagePhilippe Mathieu-Daudé2018-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Using the duplicated same package is confusing. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
| * | docker: ubuntu: Use SDL2Philippe Mathieu-Daudé2018-07-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Do not test the deprecated API versions (see cabd35840749d). Debian MXE MinGW cross images are already using SDL2. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
| * | docker: ubuntu: Update the package list before installing new onesPhilippe Mathieu-Daudé2018-07-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since docker caches the different layers, updating the package list does not invalidate the previous "apt-get update" layer, and it is likely "apt-get install" hits an outdated repository. See https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#apt-get This fixes: $ make docker-image-ubuntu V=1 ./tests/docker/docker.py build qemu:ubuntu tests/docker/dockerfiles/ubuntu.docker --add-current-user Sending build context to Docker daemon 3.072kB [...] E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libgles2-mesa_17.0.7-0ubuntu0.16.04.2_amd64.deb 404 Not Found E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libgles2-mesa-dev_17.0.7-0ubuntu0.16.04.2_amd64.deb 404 Not Found E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? The command '/bin/sh -c apt-get -y install $PACKAGES' returned a non-zero code: 100 tests/docker/Makefile.include:40: recipe for target 'docker-image-ubuntu' failed make: *** [docker-image-ubuntu] Error 1 Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
| * | linux-user: add gcov support to preexit_cleanupAlex Bennée2018-07-051-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we don't always take the normal exit path when running a guest we can skip the normal exit destructors where gcov normally dumps it's info. The GCC manual suggests long running programs use __gcov_dump() to flush out the coverage state periodically so we use that here. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
| * | linux-user: introduce preexit_cleanupAlex Bennée2018-07-054-9/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid repeating ourselves move our preexit clean-up code into a helper function. I figured the continuing effort to split of the syscalls made it worthwhile creating a new file for it now. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu>
| * | build-system: add coverage-report targetAlex Bennée2018-07-052-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will build a coverage report under the current directory in reports/coverage. At the users option a report can be generated by directly invoking something like: make foo/bar/coverage-report.html Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
| * | build-system: add clean-coverage targetAlex Bennée2018-07-052-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can be used to remove any stale coverage data before any particular test run. This is useful for analysing individual tests. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>---
| * | travis: add gcovr summary for GCOV buildAlex Bennée2018-07-053-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gives a more useful summary, sorted by descending % coverage, after the tests have run. The final numbers will give an idea if our coverage is getting better or worse. To keep the width sane we need to post process the file that the old gcovr tool generates. This is done with a mix of sed, awk and column in the scripts/coverage-summary.sh script. As quite a lot of lines don't get covered at all we filter out all the 0% lines. If the file doesn't appear it is not being exercised. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
| * | docker: add gcovr to travis imageAlex Bennée2018-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Useful for debugging if nothing else as the gcovr on the Travis images are a little old. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
| * | .gitignore: add .gcov filesAlex Bennée2018-07-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are temporary files generated on gcov runs and shouldn't be included in the source tree. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
| * | build-system: remove per-test GCOV reportingAlex Bennée2018-07-052-16/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm not entirely sure who's using this information and certainly in a CI environment it just washes over as additional noise. Later patches will provide new reporting options so a user who wants to analyse individual tests will be able to use that to get the information. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
| * | travis: test out-of-tree buildsPhilippe Mathieu-Daudé2018-07-051-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Force one config to build 'out-of-tree' (object files and executables are created in a tree outside the project source code). Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
| * | travis: do not waste time cloning unused submodulesPhilippe Mathieu-Daudé2018-07-051-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Builds only require: - dtc - keycodemapdb - capstone Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> [AJB: drop wget cache] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
| * | Revert "Makefile: Rename TARGET_DIRS to TARGET_LIST"Alex Bennée2018-07-054-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 208ecb3e1acc8d55dab49fdf721a86d513691688. This was causing problems by making DEF_TARGET_LIST pointless and having to jump through hoops to build on mingw with a dully enabled config. This includes a change to fix the per-guest TCG test probe which was added after 208ecb3 and used TARGET_LIST. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Cc: Paolo Bonzini <pbonzini@redhat.com>
* | | Merge remote-tracking branch 'remotes/armbru/tags/pull-cov-model-2018-07-05' ↵Peter Maydell2018-07-051-6/+2Star
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging Coverity model patches for 2018-07-05 # gpg: Signature made Thu 05 Jul 2018 14:11:03 BST # gpg: using RSA key 3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-cov-model-2018-07-05: coverity-model: Fix replay_get_byte() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | coverity-model: Fix replay_get_byte()Markus Armbruster2018-07-051-6/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity 2018.06 chokes on replay_get_byte(): $ cov-make-library -of scripts/coverity-model.xmldb scripts/coverity-model.c output file: scripts/coverity-model.xmldb Compiling scripts/coverity-model.c with command /opt/cov-sa-2018.06/bin/cov-emit --dir /tmp/cov-armbru/930a6fb31e5f464fc1a53354b2deb66b/cov-make-library-emit -w --no_error_recovery --emit_header_functions --no_implicit_decl --preinclude /opt/cov-sa-2018.06/library/decls.h --c scripts/coverity-model.c "scripts/coverity-model.c", line 110: error #20: identifier "replay_file" is undefined if (replay_file) { ^ Emit for file '/work/armbru/qemu/scripts/coverity-model.c' complete. [ERROR] 1 error detected in the compilation of "scripts/coverity-model.c". ERROR: cov-emit returned with code 1 Broken in commit 04a0afe5285. Fix by dumbing down. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180626085642.4973-1-armbru@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
* | | | Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into stagingPeter Maydell2018-07-0514-50/+791
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Block layer patches: - qcow2: Use worker threads for compression to improve performance of 'qemu-img convert -W' and compressed backup jobs - blklogwrites: New filter driver to log write requests to an image in the dm-log-writes format - file-posix: Fix image locking during image creation - crypto: Fix memory leak in error path - Error out instead of silently truncating node names # gpg: Signature made Thu 05 Jul 2018 11:24:33 BST # gpg: using RSA key 7F09B272C88F2FD6 # 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: file-posix: Unlock FD after creation file-posix: Fix creation locking block/blklogwrites: Add an option for the update interval of the log superblock block/blklogwrites: Add an option for appending to an old log block/blklogwrites: Change log_sector_size from int64_t to uint64_t block/crypto: Fix memory leak in create error path block: Don't silently truncate node names block: Add blklogwrites block: Move two block permission constants to the relevant enum qcow2: add compress threads qcow2: refactor data compression qemu-img: allow compressed not-in-order writes Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | file-posix: Unlock FD after creationMax Reitz2018-07-051-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closing the FD does not necessarily mean that it is unlocked. Fix this by relinquishing all permission locks before qemu_close(). Reported-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | | file-posix: Fix creation lockingMax Reitz2018-07-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_apply_lock_bytes() takes a bit mask of "permissions that are NOT shared". Also, make the "perm" and "shared" variables uint64_t, because I do not particularly like using ~ on signed integers (and other permission masks are usually uint64_t, too). Reported-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | | block/blklogwrites: Add an option for the update interval of the log superblockAri Sundholm2018-07-052-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a way to ensure that the log superblock is periodically updated. Before, this was only done on flush requests, which may not be enough if the VM exits abnormally, omitting the final flush. The default interval is 4096 write requests. Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | | block/blklogwrites: Add an option for appending to an old logAri Sundholm2018-07-052-15/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggested by Kevin Wolf. May be useful when testing multiple batches of writes or doing long-term testing involving restarts of the VM. Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | | block/blklogwrites: Change log_sector_size from int64_t to uint64_tAri Sundholm2018-07-051-5/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a simple oversight when working on intermediate versions of the original patch which introduced blklogwrites. Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | | block/crypto: Fix memory leak in create error pathKevin Wolf2018-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: Coverity CID 1393782 Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
| * | | block: Don't silently truncate node namesKevin Wolf2018-07-054-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user passes a too long node name string, we silently truncate it to fit into BlockDriverState.node_name, i.e. to 31 characters. Apart from surprising the user when the node has a different name than requested, this also bypasses the check for duplicate names, so that the same name can be assigned to multiple nodes. Fix this by just making too long node names an error. Reported-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | | block: Add blklogwritesAapo Vienamo2018-07-054-6/+448
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements a block device write logging system, similar to Linux kernel device mapper dm-log-writes. The write operations that are performed on a block device are logged to a file or another block device. The write log format is identical to the dm-log-writes format. Currently, log markers are not supported. This functionality can be used for crash consistency and fs consistency testing. By implementing it in qemu, tests utilizing write logs can be be used to test non-Linux drivers and older kernels. The driver accepts an optional parameter to set the sector size used for logging. This makes the driver require all requests to be aligned to this sector size and also makes offsets and sizes of writes in the log metadata to be expressed in terms of this value (the log format has a granularity of one sector for offsets and sizes). This allows accurate logging of writes to guest block devices that have unusual sector sizes. The implementation is based on the blkverify and blkdebug block drivers. Signed-off-by: Aapo Vienamo <aapo@tuxera.com> Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | | block: Move two block permission constants to the relevant enumAri Sundholm2018-07-052-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows using the two constants outside of block.c, which will happen in a subsequent patch. Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | | qcow2: add compress threadsVladimir Sementsov-Ogievskiy2018-07-052-1/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do data compression in separate threads. This significantly improve performance for qemu-img convert with -W (allow async writes) and -c (compressed) options. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | | qcow2: refactor data compressionVladimir Sementsov-Ogievskiy2018-07-051-27/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make a separate function for compression to be parallelized later. - use .avail_out field instead of .next_out to calculate size of compressed data. It looks more natural and it allows to keep dest to be void pointer - set avail_out to be at least one byte less than input, to be sure avoid inefficient compression earlier Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | | qemu-img: allow compressed not-in-order writesVladimir Sementsov-Ogievskiy2018-07-051-5/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No reason to forbid them, and they are needed to improve performance with compress-threads in further patches. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | | | Merge remote-tracking branch 'remotes/jnsnow/tags/bitmaps-pull-request' into ↵Peter Maydell2018-07-053-5/+12
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging Pull request # gpg: Signature made Wed 04 Jul 2018 07:33:42 BST # gpg: using RSA key 7DEF8106AAFC390E # 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/bitmaps-pull-request: dirty-bitmap: fix double lock on bitmap enabling block/dirty-bitmap: add bdrv_enable_dirty_bitmap_locked Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | dirty-bitmap: fix double lock on bitmap enablingVladimir Sementsov-Ogievskiy2018-07-042-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bitmap lock/unlock were added to bdrv_enable_dirty_bitmap in 8b1402ce80d, but some places were not updated correspondingly, which leads to trying to take this lock twice, which is dead-lock. Fix this. Actually, iotest 199 (about dirty bitmap postcopy migration) is broken now, and this fixes it. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20180625165745.25259-3-vsementsov@virtuozzo.com Signed-off-by: John Snow <jsnow@redhat.com>
| * | | block/dirty-bitmap: add bdrv_enable_dirty_bitmap_lockedVladimir Sementsov-Ogievskiy2018-07-042-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add _locked version of bdrv_enable_dirty_bitmap, to fix dirty bitmap migration in the following patch. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20180625165745.25259-2-vsementsov@virtuozzo.com Signed-off-by: John Snow <jsnow@redhat.com>
* | | | Merge remote-tracking branch ↵Peter Maydell2018-07-0516-523/+506Star
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/armbru/tags/pull-monitor-2018-07-03-v2' into staging Monitor patches for 2018-07-03 # gpg: Signature made Tue 03 Jul 2018 22:20:13 BST # gpg: using RSA key 3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-monitor-2018-07-03-v2: (32 commits) qapi: Polish command flags documentation in qapi-code-gen.txt monitor: Improve some comments qmp: Clean up capability negotiation after commit 02130314d8c qobject: Let qobject_from_jsonf() fail instead of abort qmp: Switch timestamp_put() to qdict_from_jsonf_nofail() qmp: Add some comments around null responses qmp: Simplify monitor_qmp_respond() qmp: Replace get_qmp_greeting() by qmp_greeting() qmp: Replace monitor_json_emitter{,raw}() by qmp_{queue,send}_response() qmp: Use QDict * instead of QObject * for response objects qmp: De-duplicate error response building qobject: New qdict_from_jsonf_nofail() monitor: Peel off @mon_global wrapper monitor: Rename use_io_thr to use_io_thread qmp: Don't let JSON errors jump the queue qmp: Don't let malformed in-band commands jump the queue tests/qmp-test: Demonstrate QMP errors jumping the queue qmp: Simplify code around monitor_qmp_dispatch_one() qmp: Always free QMPRequest with qmp_request_free() qmp: Revert change to handle_qmp_command tracepoint ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | | qapi: Polish command flags documentation in qapi-code-gen.txtMarkus Armbruster2018-07-031-36/+25Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180703085358.13941-33-armbru@redhat.com>
| * | | | monitor: Improve some commentsMarkus Armbruster2018-07-031-55/+45Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180703085358.13941-32-armbru@redhat.com>
| * | | | qmp: Clean up capability negotiation after commit 02130314d8cMarkus Armbruster2018-07-031-51/+38Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qmp_greeting() offers capabilities to the client, and qmp_qmp_capabilities() accepts or denies capabilities requested by the client. The two compute the set of available capabilities independently. Not nice. Clean this up as follows. Compute available capabilities just once in monitor_qmp_caps_reset(), and store them in Monitor member qmp.capab_offered[]. Have qmp_greeting() and qmp_qmp_capabilities() use that. Both are now oblivious of capability details. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180703085358.13941-31-armbru@redhat.com>