aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-10-28hbitmap: handle set/reset with zero lengthVladimir Sementsov-Ogievskiy
Passing zero length to these functions leads to unpredicted results. Zero-length set/reset may occur in active-mirror, on zero-length write (which is unlikely, but not guaranteed to never happen). Let's just do nothing on zero-length request. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20191011090711.19940-2-vsementsov@virtuozzo.com Reviewed-by: Max Reitz <mreitz@redhat.com> Cc: qemu-stable@nongnu.org Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-10-28iotests: Cache supported_formats()Max Reitz
Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 20190917092004.999-8-mreitz@redhat.com Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-10-28iotests: Test driver whitelisting in 136Max Reitz
null-aio may not be whitelisted. Skip all test cases that require it. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20190917092004.999-7-mreitz@redhat.com Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-10-28iotests: Test driver whitelisting in 093Max Reitz
null-aio may not be whitelisted. Skip all test cases that require it. (And skip the whole test if null-co is not whitelisted.) Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20190917092004.999-6-mreitz@redhat.com Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-10-28iotests: Let skip_if_unsupported accept a functionMax Reitz
This lets tests use skip_if_unsupported() with a potentially variable list of required formats. Suggested-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20190917092004.999-5-mreitz@redhat.com Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-10-28iotests: Use case_skip() in skip_if_unsupported()Max Reitz
skip_if_unsupported() should use the stronger variant case_skip(), because this allows it to be used even with setUp() (in a meaningful way). In the process, make it explicit what we expect the first argument of the func_wrapper to be (namely something derived of QMPTestCase). Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20190917092004.999-4-mreitz@redhat.com Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-10-28iotests: Allow skipping test casesMax Reitz
case_notrun() does not actually skip the current test case. It just adds a "notrun" note and then returns to the caller, who manually has to skip the test. Generally, skipping a test case is as simple as returning from the current function, but not always: For example, this model does not allow skipping tests already in the setUp() function. Thus, add a QMPTestCase.case_skip() function that invokes case_notrun() and then self.skipTest(). To make this work, we need to filter the information on how many test cases were skipped from the unittest output. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Message-id: 20190917092004.999-3-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-10-28iotests: Prefer null-co over null-aioMax Reitz
We use null-co basically everywhere in the iotests. Unless we want to test null-aio specifically, we should use it instead (for consistency). Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-id: 20190917092004.999-2-mreitz@redhat.com Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2019-10-26Merge remote-tracking branch ↵Peter Maydell
'remotes/stsquad/tags/pull-testing-next-251019-3' into staging Testing updates (split from mega PR) - various Travis dependency updates - enable tcg debug for check-tcg - additional Xcode build for Cirrus - dependency tweak for gitlab # gpg: Signature made Fri 25 Oct 2019 20:35:56 BST # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full] # Primary key fingerprint: 6685 AE99 E751 67BC AFC8 DF35 FBD0 DB09 5A9E 2A44 * remotes/stsquad/tags/pull-testing-next-251019-3: tests/docker: update Travis image to a more current version tests/docker: set HOST_ARCH if we don't have ARCH travis.yml: --enable-debug-tcg to check-tcg gitlab-ci.yml: Use libvdeplug-dev to compile-test the VDE network backend travis.yml: cache the clang sanitizer build tests/vm/netbsd: Disable IPv6 tests/vm: Let subclasses disable IPv6 cirrus.yml: add latest Xcode build target travis.yml: bump Xcode 10 to latest dot release travis.yml: Test the release tarball travis.yml: Fix the ccache lines travis.yml: Use newer version of libgnutls and libpng travis.yml: Use libsdl2 instead of libsdl1.2, and install libsdl2-image travis.yml: Add libvdeplug-dev to compile-test net/vde.c travis.yml: reduce scope of the --enable-debug build Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-10-25Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ↵Peter Maydell
staging Pull request # gpg: Signature made Fri 25 Oct 2019 20:18:23 BST # gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full] # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full] # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/block-pull-request: yield_until_fd_readable: make it work with any AioContect virtio-blk: Add blk_drain() to virtio_blk_device_unrealize() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-10-25tests/docker: update Travis image to a more current versionAlex Bennée
This isn't the latest one available on hub.docker.com but it does match the ID reported by the Xenial builds running on Travis: instance: ... travis-ci-sardonyx-xenial-1553530528-f909ac5 Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-10-25tests/docker: set HOST_ARCH if we don't have ARCHAlex Bennée
As the docker rules want to be able to be run on a virgin unconfigured checkout add a fallback and use it if we need to. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-10-25travis.yml: --enable-debug-tcg to check-tcgAlex Bennée
This adds a whole bunch of asserts which will catch bugs you might introduce into the TCG code. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-10-25gitlab-ci.yml: Use libvdeplug-dev to compile-test the VDE network backendThomas Huth
The libvdeplug-dev package is required to compile-test net/vde.c. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20191016131002.29663-1-thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-10-25travis.yml: cache the clang sanitizer buildAlex Bennée
Hopefully we'll see the same benefits as the other builds. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-10-25tests/vm/netbsd: Disable IPv6Eduardo Habkost
Workaround for issues when the host has no IPv6 connectivity. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <20191018181705.17957-4-ehabkost@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-10-25tests/vm: Let subclasses disable IPv6Eduardo Habkost
The mechanism will be used to work around issues related to IPv6 on the netbsd image builder. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20191018181705.17957-3-ehabkost@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-10-25cirrus.yml: add latest Xcode build targetAlex Bennée
CirrusCI provides a mojave-xcode alias for the latest Xcode available. Let's use it to make sure we track the latest releases. Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-10-25travis.yml: bump Xcode 10 to latest dot releaseAlex Bennée
According to: https://docs.travis-ci.com/user/reference/osx/#macos-version we have 10.3 available so lets use it. I don't know what Apple's deprecation policy is for Xcode because it requires an AppleID to find out. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-10-25travis.yml: Test the release tarballPhilippe Mathieu-Daudé
Add a job to generate the release tarball and build/install few QEMU targets from it. Ideally we should build the 'efi' target from the 'roms' directory, but it is too time consuming. This job is only triggered when a tag starting with 'v' is pushed, which is the case with release candidate tags. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20191007160450.3619-1-philmd@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-10-25travis.yml: Fix the ccache linesThomas Huth
The "command -v ccache && ccache ..." likely were supposed to test the availability of ccache before running the program. But this shell construct causes Travis to abort if ccache is not available. Use an if-statement instead to fix this problem. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20191009170701.14756-5-thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-10-25travis.yml: Use newer version of libgnutls and libpngThomas Huth
libgnutls-dev and libpng12-dev are not available in newer versions of Ubuntu anymore, so installing these packages fails e.g. in the new arm64 containers on Travis. Let's use newer versions of these packages by default instead. (The old versions still get tested in the "gcc-9" build). Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20191009170701.14756-4-thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-10-25travis.yml: Use libsdl2 instead of libsdl1.2, and install libsdl2-imageThomas Huth
We've removed support for SDL 1.2 quite a while ago already, so let's use SDL 2 now in Travis to get test coverage for SDL again. And while we're at it, also add libsdl2-image-dev which can be used by QEMU nowadays, too. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20191009170701.14756-3-thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2019-10-25travis.yml: Add libvdeplug-dev to compile-test net/vde.cThomas Huth
This library is needed to compile the VDE network backend. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <20191009170701.14756-2-thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-10-25travis.yml: reduce scope of the --enable-debug buildAlex Bennée
Adding debug makes things run a bit slower so lets not hammer all the targets. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-10-25Merge remote-tracking branch ↵Peter Maydell
'remotes/amarkovic/tags/mips-queue-oct-24-2019-v2' into staging MIPS queue for October 24th, 2019 - v2 # gpg: Signature made Fri 25 Oct 2019 17:37:29 BST # gpg: using RSA key D4972A8967F75A65 # gpg: Good signature from "Aleksandar Markovic <amarkovic@wavecomp.com>" [unknown] # 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: 8526 FBF1 5DA3 811F 4A01 DD75 D497 2A89 67F7 5A65 * remotes/amarkovic/tags/mips-queue-oct-24-2019-v2: tests/ssh_linux_malta: Fix 64-bit target tests tests/ssh_linux_malta: Refactor how to get image/kernel info tests/ssh_linux_malta: Match stricter console output tests/ssh_linux_malta: Remove duplicated test tests/ssh_linux_malta: Run tests using a snapshot image target/mips: Refactor handling of vector compare 'less than' (signed) instructions target/mips: Refactor handling of vector compare 'equal' instructions target/mips: Demacro LMI decoder target/mips: msa: Split helpers for ASUB_<S|U>.<B|H|W|D> target/mips: msa: Split helpers for HSUB_<S|U>.<H|W|D> target/mips: msa: Split helpers for PCK<EV|OD>.<B|H|W|D> target/mips: msa: Split helpers for S<LL|RA|RAR|RL|RLR>.<B|H|W|D> target/mips: msa: Split helpers for HADD_<S|U>.<H|W|D> target/mips: msa: Split helpers for ADD<_A|S_A|S_S|S_U|V>.<B|H|W|D> target/mips: msa: Split helpers for ILV<EV|OD|L|R>.<B|H|W|D> target/mips: msa: Split helpers for <MAX|MIN>_<S|U>.<B|H|W|D> target/mips: msa: Split helpers for <MAX|MIN>_A.<B|H|W|D> MAINTAINERS: Update mail address of Aleksandar Rikalo target/mips: Clean up op_helper.c target/mips: Clean up helper.c Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-10-25tests/ssh_linux_malta: Fix 64-bit target testsPhilippe Mathieu-Daudé
Commit 9090d3332cdcc added tests for specific to the 32-bit machines, which inadvertently make the 64-bit tests failing. Now than we have this information available in the CPU_INFO array, use it to have the 64-bit tests back. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <20191019153437.9820-12-f4bug@amsat.org>
2019-10-25tests/ssh_linux_malta: Refactor how to get image/kernel infoPhilippe Mathieu-Daudé
The qcow and kernel images use a similar pattern regarding they are for big/little endianess, or 32/64 bit. Refactor using more dictionary keys. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <20191019153437.9820-11-f4bug@amsat.org>
2019-10-25tests/ssh_linux_malta: Match stricter console outputPhilippe Mathieu-Daudé
Match on stricter console output. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <20191019153437.9820-10-f4bug@amsat.org>
2019-10-25tests/ssh_linux_malta: Remove duplicated testPhilippe Mathieu-Daudé
Remove duplicated test (probably copy/paste error in commit 9090d3332cdcc). Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <20191019153437.9820-9-f4bug@amsat.org>
2019-10-25tests/ssh_linux_malta: Run tests using a snapshot imagePhilippe Mathieu-Daudé
If a test fails, it can corrupt the underlying QCow2 image, making further tests failing. Fix this by running each test with a snapshot. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <20191019153437.9820-8-f4bug@amsat.org>
2019-10-25target/mips: Refactor handling of vector compare 'less than' (signed) ↵Filip Bozuta
instructions Remove unnecessary argument and provide separate function for each instruction. Signed-off-by: Filip Bozuta <Filip.Bozuta@rt-rk.com> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571837825-24438-3-git-send-email-Filip.Bozuta@rt-rk.com>
2019-10-25target/mips: Refactor handling of vector compare 'equal' instructionsFilip Bozuta
Remove unnecessary argument and provide separate function for each instruction. Signed-off-by: Filip Bozuta <Filip.Bozuta@rt-rk.com> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571837825-24438-2-git-send-email-Filip.Bozuta@rt-rk.com>
2019-10-25target/mips: Demacro LMI decoderAleksandar Markovic
This makes searches for instances of opcode usages easier. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571826227-10583-15-git-send-email-aleksandar.markovic@rt-rk.com>
2019-10-25target/mips: msa: Split helpers for ASUB_<S|U>.<B|H|W|D>Aleksandar Markovic
Achieves clearer code and slightly better performance. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Message-Id: <1571826227-10583-13-git-send-email-aleksandar.markovic@rt-rk.com>
2019-10-25target/mips: msa: Split helpers for HSUB_<S|U>.<H|W|D>Aleksandar Markovic
Achieves clearer code and slightly better performance. Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Message-Id: <1571826227-10583-12-git-send-email-aleksandar.markovic@rt-rk.com>
2019-10-25target/mips: msa: Split helpers for PCK<EV|OD>.<B|H|W|D>Aleksandar Markovic
Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571826227-10583-11-git-send-email-aleksandar.markovic@rt-rk.com>
2019-10-25target/mips: msa: Split helpers for S<LL|RA|RAR|RL|RLR>.<B|H|W|D>Aleksandar Markovic
Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571826227-10583-10-git-send-email-aleksandar.markovic@rt-rk.com>
2019-10-25target/mips: msa: Split helpers for HADD_<S|U>.<H|W|D>Aleksandar Markovic
Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571826227-10583-9-git-send-email-aleksandar.markovic@rt-rk.com>
2019-10-25target/mips: msa: Split helpers for ADD<_A|S_A|S_S|S_U|V>.<B|H|W|D>Aleksandar Markovic
Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571826227-10583-8-git-send-email-aleksandar.markovic@rt-rk.com>
2019-10-25target/mips: msa: Split helpers for ILV<EV|OD|L|R>.<B|H|W|D>Aleksandar Markovic
Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571826227-10583-7-git-send-email-aleksandar.markovic@rt-rk.com>
2019-10-25target/mips: msa: Split helpers for <MAX|MIN>_<S|U>.<B|H|W|D>Aleksandar Markovic
Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571826227-10583-6-git-send-email-aleksandar.markovic@rt-rk.com>
2019-10-25target/mips: msa: Split helpers for <MAX|MIN>_A.<B|H|W|D>Aleksandar Markovic
Achieves clearer code and slightly better performance. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571826227-10583-5-git-send-email-aleksandar.markovic@rt-rk.com>
2019-10-25MAINTAINERS: Update mail address of Aleksandar RikaloAleksandar Markovic
Aleksandar Rikalo wishes to change his primary mail address for QEMU. Some minor line order is corrected in .mailmap to be alphabetical, too. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571826227-10583-4-git-send-email-aleksandar.markovic@rt-rk.com>
2019-10-25target/mips: Clean up op_helper.cAleksandar Markovic
Mostly fix errors and warnings reported by 'checkpatch.pl -f'. Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571826227-10583-3-git-send-email-aleksandar.markovic@rt-rk.com>
2019-10-25target/mips: Clean up helper.cAleksandar Markovic
Mostly fix errors and warnings reported by 'checkpatch.pl -f'. Cc: Markus Armbruster <armbru@redhat.com> Reviewed-by: Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> Message-Id: <1571826227-10583-2-git-send-email-aleksandar.markovic@rt-rk.com>
2019-10-25Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into stagingPeter Maydell
Block layer patches: - qcow2: Fix data corruption bug that is triggered in partial cluster allocation with default options - qapi: add support for blkreplay driver - doc: Describe missing generic -blockdev options - iotests: Fix 118 when run as root - Minor code cleanups # gpg: Signature made Fri 25 Oct 2019 14:19:04 BST # gpg: using RSA key 7F09B272C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full] # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: qcow2: Fix corruption bug in qcow2_detect_metadata_preallocation() coroutine: Add qemu_co_mutex_assert_locked() doc: Describe missing generic -blockdev options block/backup: drop dead code from backup_job_create blockdev: Use error_report() in hmp_commit() iotests: Skip read-only cases in 118 when run as root qapi: add support for blkreplay driver Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-10-25qcow2: Fix corruption bug in qcow2_detect_metadata_preallocation()Kevin Wolf
qcow2_detect_metadata_preallocation() calls qcow2_get_refcount() which requires s->lock to be taken to protect its accesses to the refcount table and refcount blocks. However, nothing in this code path actually took the lock. This could cause the same cache entry to be used by two requests at the same time, for different tables at different offsets, resulting in image corruption. As it would be preferable to base the detection on consistent data (even though it's just heuristics), let's take the lock not only around the qcow2_get_refcount() calls, but around the whole function. This patch takes the lock in qcow2_co_block_status() earlier and asserts in qcow2_detect_metadata_preallocation() that we hold the lock. Fixes: 69f47505ee66afaa513305de0c1895a224e52c45 Cc: qemu-stable@nongnu.org Reported-by: Michael Weiser <michael.weiser@gmx.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Tested-by: Michael Weiser <michael.weiser@gmx.de> Reviewed-by: Michael Weiser <michael.weiser@gmx.de> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
2019-10-25coroutine: Add qemu_co_mutex_assert_locked()Kevin Wolf
Some functions require that the caller holds a certain CoMutex for them to operate correctly. Add a function so that they can assert the lock is really held. Cc: qemu-stable@nongnu.org Signed-off-by: Kevin Wolf <kwolf@redhat.com> Tested-by: Michael Weiser <michael.weiser@gmx.de> Reviewed-by: Michael Weiser <michael.weiser@gmx.de> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Max Reitz <mreitz@redhat.com>
2019-10-25Merge remote-tracking branch ↵Peter Maydell
'remotes/vivier2/tags/trivial-branch-pull-request' into staging Fix typos and docs, trivial changes and RTC devices split # gpg: Signature made Fri 25 Oct 2019 09:35:02 BST # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full] # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/trivial-branch-pull-request: hw/rtc/aspeed_rtc: Remove unused includes hw/rtc/xlnx-zynqmp-rtc: Remove unused "ptimer.h" include hw/rtc/mc146818: Include mc146818rtc_regs.h a bit less hw: Move Aspeed RTC from hw/timer/ to hw/rtc/ subdirectory hw: Move Exynos4210 RTC from hw/timer/ to hw/rtc/ subdirectory hw: Move Xilinx ZynqMP RTC from hw/timer/ to hw/rtc/ subdirectory hw: Move DS1338 device from hw/timer/ to hw/rtc/ subdirectory hw: Move TWL92230 device from hw/timer/ to hw/rtc/ subdirectory hw: Move sun4v hypervisor RTC from hw/timer/ to hw/rtc/ subdirectory hw: Move M41T80 device from hw/timer/ to hw/rtc/ subdirectory hw: Move M48T59 device from hw/timer/ to hw/rtc/ subdirectory hw: Move MC146818 device from hw/timer/ to hw/rtc/ subdirectory hw: Move PL031 device from hw/timer/ to hw/rtc/ subdirectory hw/timer: Compile devices not target-dependent as common object qemu-timer: reuse MIN macro in qemu_timeout_ns_to_ms event_notifier: avoid dandling file descriptor in event_notifier_cleanup util/async: avoid useless cast pci_bridge: fix a typo in comment qemu-options.hx: Update for reboot-timeout parameter Signed-off-by: Peter Maydell <peter.maydell@linaro.org> # Conflicts: # hw/timer/trace-events