aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-08-15Update version for v2.10.0-rc3 releasev2.10.0-rc3Peter Maydell
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-15Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2017-08-15' into ↵Peter Maydell
staging nbd patches for 2017-08-15 - Eric Blake: nbd: Fix trace message for disconnect - Stefan Hajnoczi: qemu-iotests: step clock after each test iteration - Fam Zheng: 0/4 block: Fix non-shared storage migration - Eric Blake: nbd-client: Fix regression when server sends garbage # gpg: Signature made Tue 15 Aug 2017 16:06:02 BST # gpg: using RSA key 0xA7A16B4A2527436A # gpg: Good signature from "Eric Blake <eblake@redhat.com>" # gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" # gpg: aka "[jpeg image of size 6874]" # Primary key fingerprint: 71C2 CC22 B1C4 6029 27D2 F3AA A7A1 6B4A 2527 436A * remotes/ericb/tags/pull-nbd-2017-08-15: nbd-client: Fix regression when server sends garbage iotests: Add non-shared storage migration case 192 block-backend: Defer shared_perm tightening migration completion nbd: Fix order of bdrv_set_perm and bdrv_invalidate_cache stubs: Add vm state change handler stubs qemu-iotests: step clock after each test iteration nbd: Fix trace message for disconnect Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-15mmio-interface: Mark as not user creatablePeter Maydell
The mmio-interface device is not something we want to allow users to create on the command line: * it is intended as an implementation detail of the memory subsystem, which gets created and deleted by that subsystem on demand; it makes no sense to create it by hand on the command line * it uses a pointer property 'host_ptr' which can't be set on the command line Mark the device as not user_creatable to avoid confusion. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1502807418-9994-1-git-send-email-peter.maydell@linaro.org Reviewed-by: Thomas Huth <thuth@redhat.com>
2017-08-15target/arm: Require alignment for load exclusiveAlistair Francis
According to the ARM ARM exclusive loads require the same alignment as exclusive stores. Let's update the memops used for the load to match that of the store. This adds the alignment requirement to the memops. Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20170815145714.17635-4-richard.henderson@linaro.org [rth: Require 16-byte alignment for 64-bit LDXP.] Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-15target/arm: Correct load exclusive pair atomicityRichard Henderson
We are not providing the required single-copy atomic semantics for the 64-bit operation that is the 32-bit paired load. At the same time, leave the entire 64-bit value in cpu_exclusive_val and stop writing to cpu_exclusive_high. This means that we do not have to re-assemble the 64-bit quantity when it comes time to store. At the same time, drop a redundant temporary and perform all loads directly into the cpu_exclusive_* globals. Tested-by: Alistair Francis <alistair.francis@xilinx.com> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20170815145714.17635-3-richard.henderson@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-15target/arm: Correct exclusive store cmpxchg memop maskAlistair Francis
When we perform the atomic_cmpxchg operation we want to perform the operation on a pair of 32-bit registers. Previously we were just passing the register size in which was set to MO_32. This would result in the high register to be ignored. To fix this issue we hardcode the size to be 64-bits long when operating on 32-bit pairs. Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Tested-by: Portia Stephens <portia.stephens@xilinx.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-id: 20170815145714.17635-2-richard.henderson@linaro.org Message-Id: <bc18dddca56e8c2ea4a3def48d33ceb5d21d1fff.1502488636.git.alistair.francis@xilinx.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-15nbd-client: Fix regression when server sends garbageEric Blake
When we switched NBD to use coroutines for qemu 2.9 (in particular, commit a12a712a), we introduced a regression: if a server sends us garbage (such as a corrupted magic number), we quit the read loop but do not stop sending further queued commands, resulting in the client hanging when it never reads the response to those additional commands. In qemu 2.8, we properly detected that the server is no longer reliable, and cancelled all existing pending commands with EIO, then tore down the socket so that all further command attempts get EPIPE. Restore the proper behavior of quitting (almost) all communication with a broken server: Once we know we are out of sync or otherwise can't trust the server, we must assume that any further incoming data is unreliable and therefore end all pending commands with EIO, and quit trying to send any further commands. As an exception, we still (try to) send NBD_CMD_DISC to let the server know we are going away (in part, because it is easier to do that than to further refactor nbd_teardown_connection, and in part because it is the only command where we do not have to wait for a reply). Based on a patch by Vladimir Sementsov-Ogievskiy. A malicious server can be created with the following hack, followed by setting NBD_SERVER_DEBUG to a non-zero value in the environment when running qemu-nbd: | --- a/nbd/server.c | +++ b/nbd/server.c | @@ -919,6 +919,17 @@ static int nbd_send_reply(QIOChannel *ioc, NBDReply *reply, Error **errp) | stl_be_p(buf + 4, reply->error); | stq_be_p(buf + 8, reply->handle); | | + static int debug; | + static int count; | + if (!count++) { | + const char *str = getenv("NBD_SERVER_DEBUG"); | + if (str) { | + debug = atoi(str); | + } | + } | + if (debug && !(count % debug)) { | + buf[0] = 0; | + } | return nbd_write(ioc, buf, sizeof(buf), errp); | } Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20170814213426.24681-1-eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-08-15iotests: Add non-shared storage migration case 192Fam Zheng
Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170815130740.31229-5-famz@redhat.com> Tested-by: Eric Blake <eblake@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2017-08-15block-backend: Defer shared_perm tightening migration completionFam Zheng
As in the case of nbd_export_new(), bdrv_invalidate_cache() can be called when migration is still in progress. In this case we are not ready to tighten the shared permissions fenced by blk->disable_perm. Defer to a VM state change handler. Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170815130740.31229-4-famz@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2017-08-15nbd: Fix order of bdrv_set_perm and bdrv_invalidate_cacheKevin Wolf
The "inactive" state of BDS affects whether the permissions can be granted, we must call bdrv_invalidate_cache before bdrv_set_perm to support "-incoming defer" case. Reported-by: Christian Ehrhardt <christian.ehrhardt@canonical.com> Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170815130740.31229-3-famz@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2017-08-15stubs: Add vm state change handler stubsFam Zheng
They will be used by BlockBackend code in block-obj-y, which doesn't always get linked with common-obj-y. Add stubs to keep ld happy. Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170815130740.31229-2-famz@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2017-08-15qemu-iotests: step clock after each test iterationStefan Hajnoczi
The 093 throttling test submits twice as many requests as the throttle limit in order to ensure that we reach the limit. The remaining requests are left in-flight at the end of each test iteration. Commit 452589b6b47e8dc6353df257fc803dfc1383bed8 ("vl.c/exit: pause cpus before closing block devices") exposed a hang in 093. This happens because requests are still in flight when QEMU terminates but QEMU_CLOCK_VIRTUAL time is frozen. bdrv_drain_all() hangs forever since throttled requests cannot complete. Step the clock at the end of each test iteration so in-flight requests actually finish. This solves the hang and is cleaner than leaving tests in-flight. Note that this could also be "fixed" by disabling throttling when drives are closed in QEMU. That approach has two issues: 1. We must drain requests before disabling throttling, so the hang cannot be easily avoided! 2. Any time QEMU disables throttling internally there is a chance that malicious users can abuse the code path to bypass throttling limits. Therefore it makes more sense to fix the test case than to modify QEMU. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20170815130502.8736-1-stefanha@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com>
2017-08-15nbd: Fix trace message for disconnectEric Blake
NBD_CMD_DISC is a disconnect request, not a data discard request. Signed-off-by: Eric Blake <eblake@redhat.com> Message-Id: <20170811015749.20365-1-eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-08-15qxl: call qemu_spice_display_init_common for secondary devicesPaolo Bonzini
Fixes this 2.10 regression: $ qemu-system-x86_64 -cpu host -m 6144 -vga qxl -device qxl qemu-system-x86_64: util/qemu-thread-posix.c:64: qemu_mutex_lock: Assertion `mutex->initialized' failed. Reported-by: ademaria@redhat.com Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 20170814231552.24593-1-pbonzini@redhat.com Cc: kraxel@redhat.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-15Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' ↵Peter Maydell
into staging # gpg: Signature made Tue 15 Aug 2017 14:27:34 BST # gpg: using RSA key 0x9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/tracing-pull-request: simpletrace: fix flight recorder --no-header option trace: use static event ID mapping in simpletrace.stp Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-15simpletrace: fix flight recorder --no-header optionStefan Hajnoczi
The simpletrace.py script can pretty-print flight recorder ring buffers. These are not full simpletrace binary trace files but just the end of a trace file. There is no header and the event ID mapping information is often unavailable since the ring buffer may have filled up and discarded event ID mapping records. The simpletrace.stp script that generates ring buffer traces uses the same trace-events-all input file as simpletrace.py. Therefore both scripts have the same global ordering of trace events. A dynamic event ID mapping isn't necessary: just use the trace-events-all file as the reference for how event IDs are numbered. It is now possible to analyze simpletrace.stp ring buffers again using: $ ./simpletrace.py trace-events-all path/to/ring-buffer Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20170815084430.7128-3-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-08-15trace: use static event ID mapping in simpletrace.stpStefan Hajnoczi
This is a partial revert of commit 7f1b588f20d027730676e627713ae3bbf6baab04 ("trace: emit name <-> ID mapping in simpletrace header"), which broke the SystemTap flight recorder because event mapping records may not be present in the ring buffer when the trace is analyzed. This means simpletrace.py --no-header does not know the event ID mapping needed to pretty-print the trace. Instead of numbering events dynamically, use a static event ID mapping as dictated by the event order in the trace-events-all file. The simpletrace.py script also uses trace-events-all so the next patch will fix the simpletrace.py --no-header option to take advantage of this knowledge. Cc: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20170815084430.7128-2-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-08-15Merge remote-tracking branch 'remotes/famz/tags/build-and-test-pull-request' ↵Peter Maydell
into staging # gpg: Signature made Tue 15 Aug 2017 11:50:36 BST # gpg: using RSA key 0xCA35624C6A9171C6 # gpg: Good signature from "Fam Zheng <famz@redhat.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 5003 7CB7 9706 0F76 F021 AD56 CA35 624C 6A91 71C6 * remotes/famz/tags/build-and-test-pull-request: docker: add centos7 image docker: install more packages on CentOS to extend code coverage docker: add Xen libs to centos6 image docker: use one package per line in CentOS config Makefile: Let "make check-help" work without running ./configure Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-15Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20170815' into stagingPeter Maydell
Regression fix for 'make clean' on s390x. # gpg: Signature made Tue 15 Aug 2017 08:24:54 BST # gpg: using RSA key 0xDECF6B93C6F02FAF # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" # gpg: aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" # gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>" # gpg: aka "Cornelia Huck <cohuck@kernel.org>" # gpg: aka "Cornelia Huck <cohuck@redhat.com>" # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF * remotes/cohuck/tags/s390x-20170815: pc-bios/s390-ccw: Use rm command during make clean Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-15docker: add centos7 imagePhilippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20170728233316.13352-5-f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-08-15docker: install more packages on CentOS to extend code coveragePhilippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20170728233316.13352-4-f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-08-15docker: add Xen libs to centos6 imagePhilippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20170728233316.13352-3-f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-08-15docker: use one package per line in CentOS configPhilippe Mathieu-Daudé
This ease rebase/cherry-pick, also it is faster to visually find if a package is here. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20170728233316.13352-2-f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-08-15Makefile: Let "make check-help" work without running ./configureFam Zheng
Currently if you do "make check-help" in a fresh checkout, only an error is printed which is not nice: $ make check-help V=1 cc -nostdlib -o check-help.mo cc: fatal error: no input files compilation terminated. rules.mak:115: recipe for target 'check-help.mo' failed make: *** [check-help.mo] Error 1 Move the config-host.mak condition into the body of tests/Makefile.include and always include the rule for check-help. Reported-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170810085025.14076-1-famz@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Fam Zheng <famz@redhat.com>
2017-08-15pc-bios/s390-ccw: Use rm command during make cleanEric Farman
This reverts a change that replaced the "rm -f" command with the undefined variable RM (expected to be set by make), and causes the "make clean" command to fail for a s390 target: make[1]: Entering directory '/usr/src/qemu/build/pc-bios/s390-ccw' rm -f *.timestamp *.o *.d *.img *.elf *~ *.a /bin/sh: *.o: command not found Makefile:39: recipe for target 'clean' failed make[1]: *** [clean] Error 127 make[1]: Leaving directory '/usr/src/qemu/build/pc-bios/s390-ccw' Makefile:489: recipe for target 'clean' failed make: *** [clean] Error 1 Fixes: 3e4415a751d2 ("pc-bios/s390-ccw: Add core files for the network bootloading program") Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com> Message-Id: <20170814204450.24118-2-farman@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-08-14xlnx-qspi: add a property for mmio-executionKONRAD Frederic
This adds mmio-exec property to workaround the migration bug. When enabled the migration is blocked and will return an error. Signed-off-by: KONRAD Frederic <frederic.konrad@adacore.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Message-id: 1502438052-5117-1-git-send-email-frederic.konrad@adacore.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-14Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into ↵Peter Maydell
staging # gpg: Signature made Mon 14 Aug 2017 13:32:10 BST # gpg: using RSA key 0xEF04965B398D6211 # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 215D 46F4 8246 689E C77F 3562 EF04 965B 398D 6211 * remotes/jasowang/tags/net-pull-request: qemu-doc: Mention host_net_add/-remove in the deprecation chapter Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-14qemu-doc: Mention host_net_add/-remove in the deprecation chapterThomas Huth
The two HMP commands host_net_add and -remove have recently been marked as deprecated, too, so we should now mention them in the chapter of deprecated features. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
2017-08-14Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-fetch' into ↵Peter Maydell
staging trivial patches for 2017-08-14 # gpg: Signature made Mon 14 Aug 2017 12:07:03 BST # gpg: using RSA key 0x701B4F6B1A693E59 # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" # Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 # Subkey fingerprint: 7B73 BAD6 8BE7 A2C2 8931 4B22 701B 4F6B 1A69 3E59 * remotes/mjt/tags/trivial-patches-fetch: hw/misc/mmio_interface: Return after error_setg() to avoid crash qemu-iotests: remove comment about root privileges requirement qemu-iotests: remove commented out variables qemu-iotests: get rid of _full_imgproto_details() qemu-doc: Fix "-net van" typo libqtest: Fix typo in comments unicore32: abort when entering "x 0" on the monitor Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-14Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell
* Lone typo fix (Thomas) # gpg: Signature made Mon 14 Aug 2017 09:41:52 BST # gpg: using RSA key 0xBFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: qemu-doc: Fix "-net van" typo Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-14hw/misc/mmio_interface: Return after error_setg() to avoid crashThomas Huth
QEMU currently abort()s if the user tries to specify the mmio_interface device without parameters: x86_64-softmmu/qemu-system-x86_64 -nographic -device mmio_interface qemu-system-x86_64: /home/thuth/devel/qemu/util/error.c:57: error_setv: Assertion `*errp == ((void *)0)' failed. Aborted (core dumped) This happens because the realize function is trying to set the errp twice in this case. After setting an error, the realize function should immediately return instead. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-08-14qemu-iotests: remove comment about root privileges requirementCleber Rosa
The check script contains a commented out root user requirement, probably because of its xfstests heritage. This requirement doesn't apply to qemu-iotests, so it better be gone. Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-08-14qemu-iotests: remove commented out variablesCleber Rosa
The variables FULL_MKFS_OPTIONS and FULL_MOUNT_OPTIONS are commented out, never used, and even refer to functions that do exist. The last time these were touched was around 8 years ago, so I guess it's safe to assume outputting such information on test execution is still on the radar. Signed-off-by: Cleber Rosa <crosa@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-08-14qemu-iotests: get rid of _full_imgproto_details()Cleber Rosa
Although this function is used, its implementation does nothing besides echoing a variable name. There's no need to wrap this functionality in a function, and based on the one usage it has, it's not even required to adhere to a convention or code style. Signed-off-by: Cleber Rosa <crosa@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-08-14qemu-doc: Fix "-net van" typoThomas Huth
While Andrew S. Tanenbaum has a point by saying "Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway", we don't support that way of transportation in QEMU yet, so replace the typo with the correct word "vlan". Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-08-14libqtest: Fix typo in commentsEric Blake
s/continuosly/continuously/ Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-08-14unicore32: abort when entering "x 0" on the monitorEduardo Otubo
Starting Qemu with "qemu-system-unicore32 -M puv3,accel=qtest -S -nographic" and entering "x 0 " at the monitor prompt leads to abort(): $ ./unicore32-softmmu/qemu-system-unicore32 -M puv3,accel=qtest -S -nographic QEMU 2.9.90 monitor - type 'help' for more information (qemu) x 0 qemu: fatal: uc32_cpu_get_phys_page_debug not supported yet R00=00000000 R01=00000000 R02=00000000 R03=00000000 R04=00000000 R05=00000000 R06=00000000 R07=00000000 R08=00000000 R09=00000000 R10=00000000 R11=00000000 R12=00000000 R13=00000000 R14=00000000 R15=00000000 R16=00000000 R17=00000000 R18=00000000 R19=00000000 R20=00000000 R21=00000000 R22=00000000 R23=00000000 R24=00000000 R25=00000000 R26=00000000 R27=00000000 R28=00000000 R29=00000000 R30=00000000 R31=03000000 PSR=40000013 -Z-- PRIV Aborted (core dumped) This happens because uc32_cpu_get_phys_page_debug() is not implemented yet, this is a temporary workaround to avoid the crash. Signed-off-by: Eduardo Otubo <otubo@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-08-14Merge remote-tracking branch ↵Peter Maydell
'remotes/cohuck/tags/boot-serial-no-tcg-20170811' into staging Fix the boot-serial test to work with the new --disable-tcg. # gpg: Signature made Fri 11 Aug 2017 14:55:15 BST # gpg: using RSA key 0xDECF6B93C6F02FAF # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" # gpg: aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" # gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>" # gpg: aka "Cornelia Huck <cohuck@kernel.org>" # gpg: aka "Cornelia Huck <cohuck@redhat.com>" # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF * remotes/cohuck/tags/boot-serial-no-tcg-20170811: boot-serial-test: fallback to kvm accelerator Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-14qemu-doc: Fix "-net van" typoThomas Huth
While Andrew S. Tanenbaum has a point by saying "Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway", we don't support that way of transportation in QEMU yet, so replace the typo with the correct word "vlan". Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1502365466-19432-1-git-send-email-thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-08-11Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into stagingPeter Maydell
Block layer patches for 2.10.0-rc3 # gpg: Signature made Fri 11 Aug 2017 15:02:58 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: qemu-iotests: fix 185 file-posix: Do runtime check for ofd lock API osdep: Add runtime OFD lock detection qcow2: Check failure of bdrv_getlength() qcow2: Drop debugging dump_refcounts() vpc: Check failure of bdrv_getlength() tests/multiboot: Fix whitespace failure Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-11boot-serial-test: fallback to kvm acceleratorCornelia Huck
Currently, at least x86_64 and s390x support building with --disable-tcg. Instead of forcing tcg (which causes the test to fail on such builds), allow to use kvm as well. Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-08-11qemu-iotests: fix 185Vladimir Sementsov-Ogievskiy
185 can sometimes produce wrong output like this: 185 2s ... - output mismatch (see 185.out.bad) --- /work/src/qemu/master/tests/qemu-iotests/185.out 2017-07-14 \ 15:14:29.520343805 +0300 +++ 185.out.bad 2017-08-07 16:51:02.231922900 +0300 @@ -37,7 +37,7 @@ {"return": {}} {"return": {}} {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, \ "event": "SHUTDOWN", "data": {"guest": false}} -{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, \ "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", \ "len": 4194304, "offset": 4194304, "speed": 65536, "type": \ "mirror"}} +{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, \ "event": "BLOCK_JOB_CANCELLED", "data": {"device": "disk", \ "len": 0, "offset": 0, "speed": 65536, "type": "mirror"}} === Start backup job and exit qemu === Failures: 185 Failed 1 of 1 tests This is because, under heavy load, the quit can happen before the first iteration of the mirror request has occurred. To make sure we've had time to iterate, let's just add a sleep for 0.5 seconds before quitting. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2017-08-11file-posix: Do runtime check for ofd lock APIFam Zheng
It is reported that on Windows Subsystem for Linux, ofd operations fail with -EINVAL. In other words, QEMU binary built with system headers that exports F_OFD_SETLK doesn't necessarily run in an environment that actually supports it: $ qemu-system-aarch64 ... -drive file=test.vhdx,if=none,id=hd0 \ -device virtio-blk-pci,drive=hd0 qemu-system-aarch64: -drive file=test.vhdx,if=none,id=hd0: Failed to unlock byte 100 qemu-system-aarch64: -drive file=test.vhdx,if=none,id=hd0: Failed to unlock byte 100 qemu-system-aarch64: -drive file=test.vhdx,if=none,id=hd0: Failed to lock byte 100 As a matter of fact this is not WSL specific. It can happen when running a QEMU compiled against a newer glibc on an older kernel, such as in a containerized environment. Let's do a runtime check to cope with that. Reported-by: Andrew Baumann <Andrew.Baumann@microsoft.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2017-08-11osdep: Add runtime OFD lock detectionFam Zheng
Build time check of OFD lock is not sufficient and can cause image open errors when the runtime environment doesn't support it. Add a helper function to probe it at runtime, additionally. Also provide a qemu_has_ofd_lock() for callers to check the status. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2017-08-11qcow2: Check failure of bdrv_getlength()Eric Blake
qcow2_co_pwritev_compressed() should not call bdrv_truncate() if determining the size failed. Reported-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2017-08-11qcow2: Drop debugging dump_refcounts()Eric Blake
It's been #if 0'd since its introduction in 2006, commit 585f8587. We can revive dead code if we need it, but in the meantime, it has bit-rotted (for example, not checking for failure in bdrv_getlength()). Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2017-08-11vpc: Check failure of bdrv_getlength()Eric Blake
vpc_open() was checking for bdrv_getlength() failure in one, but not the other, location. Reported-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Jeff Cody <jcody@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2017-08-11tests/multiboot: Fix whitespace failureEric Blake
Commit b43671f8 accidentally broke run_test.sh within tests/multiboot; due to a subtle change in whitespace. These two commands produce theh same output (at least, for sane $IFS of space-tab-newline): echo -e "...$@..." echo -e "...$*..." But that's only because echo inserts spaces between multiple arguments (the $@ case), while the $* form gives a single argument to echo with the spaces already present. But when converting to printf %b, there are no automatic spaces between multiple arguments, so we HAVE to use $*. It doesn't help that run_test.sh isn't part of 'make check'. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2017-08-10Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ↵Peter Maydell
staging # gpg: Signature made Thu 10 Aug 2017 18:48:13 BST # gpg: using RSA key 0x9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/block-pull-request: virtio-blk: handle blk_getlength() errors IDE: test flush on empty CDROM IDE: Do not flush empty CDROM drives Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-08-10Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into stagingPeter Maydell
Just a single fix for an annoying regression introduced in 2.9 when fixing CVE-2016-9602. # gpg: Signature made Thu 10 Aug 2017 13:40:28 BST # gpg: using DSA key 0x02FC3AEB0101DBC2 # gpg: Good signature from "Greg Kurz <groug@kaod.org>" # gpg: aka "Greg Kurz <groug@free.fr>" # gpg: aka "Greg Kurz <gkurz@linux.vnet.ibm.com>" # gpg: aka "Gregory Kurz (Groug) <groug@free.fr>" # gpg: aka "[jpeg image of size 3330]" # 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: 2BD4 3B44 535E C0A7 9894 DBA2 02FC 3AEB 0101 DBC2 * remotes/gkurz/tags/for-upstream: 9pfs: local: fix fchmodat_nofollow() limitations Signed-off-by: Peter Maydell <peter.maydell@linaro.org>