summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-04-21Update version for v2.6.0-rc3 releasev2.6.0-rc3Peter Maydell1-1/+1
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-21tcg: check for CONFIG_DEBUG_TCG instead of NDEBUGAurelien Jarno10-17/+12
Check for CONFIG_DEBUG_TCG instead of NDEBUG, drop now useless code. Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Message-id: 1461228530-14852-2-git-send-email-aurelien@aurel32.net Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-21tcg: use tcg_debug_assert instead of assert (fix performance regression)Aurelien Jarno11-93/+93
The TCG code is quite performance sensitive, but at the same time can also be quite tricky. That is why asserts that can be enabled with the --enable-debug-tcg configure option. This used to work the following way: | #include "config.h" | | ... | | #if !defined(CONFIG_DEBUG_TCG) && !defined(NDEBUG) | /* define it to suppress various consistency checks (faster) */ | #define NDEBUG | #endif | | ... | | #include <assert.h> Since commit 757e725b (tcg: Clean up includes) "config.h" as been replaced by "qemu/osdep.h" which itself includes <assert.h>. As a consequence the assertions are always enabled, even when using --disable-debug-tcg, causing a performance regression, especially on targets with many registers. For instance on qemu-system-ppc the speed difference is about 15%. tcg_debug_assert is controlled directly by CONFIG_DEBUG_TCG and already uses in some places. This patch replaces all the calls to assert into calss to tcg_debug_assert. Cc: Peter Maydell <peter.maydell@linaro.org> Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Message-id: 1461228530-14852-1-git-send-email-aurelien@aurel32.net Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-21hw/arm/boot: always clear r0 when booting kernelsSylvain Garrigues1-1/+1
The 32-bit ARM Linux kernel booting ABI requires that r0 is 0 when calling the kernel image. A bug in commit 10b8ec73e610e01 meant that for boards which use the write_board_setup hook (which means "highbank", "midway", "raspi2" and "xilinx-zynq-a9") we were incorrectly skipping the "clear r0" instruction in the mini-bootloader. Use the right offset in the "add lr, pc, #n" instruction so that we return from the board-setup code to the correct place. Signed-off-by: Sylvain Garrigues <sylvain@sylvaingarrigues.com> [PMM: Expanded commit message] Cc: qemu-stable@nongnu.org Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-21MAINTAINERS: Avoid using K: for NUMA sectionEduardo Habkost1-2/+0
When using K: in MAINTAINERS, false positives makes get_maintainer.pl not use git history to find contributors. As those patterns cause lots of false positives they are causing more harm than good, so remove them. Reported-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-id: 1461164130-3847-1-git-send-email-ehabkost@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-20Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into stagingPeter Maydell6-36/+127
Mirror block job fixes for 2.6.0-rc3 # gpg: Signature made Wed 20 Apr 2016 15:56:43 BST using RSA key ID C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" * remotes/kevin/tags/for-upstream: iotests: Test case for drive-mirror with unaligned image size iotests: Add iotests.image_size mirror: Don't extend the last sub-chunk block/mirror: Refresh stale bitmap iterator cache block/mirror: Revive dead yielding code Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-20Merge remote-tracking branch 'remotes/sstabellini/tags/xen-2016-04-20' into ↵Peter Maydell1-1/+1
staging Xen 2016/04/20 # gpg: Signature made Wed 20 Apr 2016 12:08:56 BST using RSA key ID 70E1AE90 # gpg: Good signature from "Stefano Stabellini <stefano.stabellini@eu.citrix.com>" * remotes/sstabellini/tags/xen-2016-04-20: xenfb: use the correct condition to avoid excessive looping Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-20iotests: Test case for drive-mirror with unaligned image sizeFam Zheng3-0/+68
This is the regression test for the virtual size mismatch issue between target and source images. [ kwolf: Added test_unaligned_with_update ] Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Jeff Cody <jcody@redhat.com>
2016-04-20iotests: Add iotests.image_sizeFam Zheng1-0/+6
This retrieves the virtual size of the image out of qemu-img info. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-04-20mirror: Don't extend the last sub-chunkFam Zheng2-26/+37
The last sub-chunk is rounded up to the copy granularity in the target image, resulting in a larger size than the source. Add a function to clip the copied sectors to the end. This undoes the "wrong" changes to tests/qemu-iotests/109.out in e5b43573e28. The remaining two offset changes are okay. [ kwolf: Use DIV_ROUND_UP to calculate nb_chunks now ] Reported-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Jeff Cody <jcody@redhat.com>
2016-04-20block/mirror: Refresh stale bitmap iterator cacheMax Reitz1-0/+5
If the drive's dirty bitmap is dirtied while the mirror operation is running, the cache of the iterator used by the mirror code may become stale and not contain all dirty bits. This only becomes an issue if we are looking for contiguously dirty chunks on the drive. In that case, we can easily detect the discrepancy and just refresh the iterator if one occurs. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-04-20block/mirror: Revive dead yielding codeMax Reitz1-11/+12
mirror_iteration() is supposed to wait if the current chunk is subject to a still in-flight mirroring operation. However, it mixed checking this conflict situation with checking the dirty status of a chunk. A simplification for the latter condition (the first chunk encountered is always dirty) led to neglecting the former: We just skip the first chunk and thus never test whether it conflicts with an in-flight operation. To fix this, pull out the code which waits for in-flight operations on the first chunk of the range to be mirrored to settle. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-04-20Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2016-04-19-tag' ↵Peter Maydell1-1/+3
into staging qemu-ga patch queue for 2.6 * fixes inadvertant change that unconditionally disables qemu-ga unit test * fixes make check failures when building with --disable-guest-agent that were present visible before the unit test was inadvertantly disabled. # gpg: Signature made Tue 19 Apr 2016 23:30:09 BST using RSA key ID F108B584 # gpg: Good signature from "Michael Roth <flukshun@gmail.com>" # gpg: aka "Michael Roth <mdroth@utexas.edu>" # gpg: aka "Michael Roth <mdroth@linux.vnet.ibm.com>" * remotes/mdroth/tags/qga-pull-2016-04-19-tag: qemu-ga: do not run qga test when guest agent disabled Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-20Merge remote-tracking branch 'remotes/cody/tags/block-pull-request' into stagingPeter Maydell2-13/+72
# gpg: Signature made Tue 19 Apr 2016 17:28:01 BST using RSA key ID C0DE3057 # gpg: Good signature from "Jeffrey Cody <jcody@redhat.com>" # gpg: aka "Jeffrey Cody <jeff@codyprime.org>" # gpg: aka "Jeffrey Cody <codyprime@gmail.com>" * remotes/cody/tags/block-pull-request: block/gluster: prevent data loss after i/o error block/gluster: code movement of qemu_gluster_close() block/gluster: return correct error value Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-19qemu-ga: do not run qga test when guest agent disabledYang Hongyang1-1/+3
When configure with --disable-guest-agent, make check will fail with: ERROR:tests/test-qga.c:74:fixture_setup: assertion failed (error == NULL): Failed to execute child process "/home/xx/qemu/qemu-ga" (No such file or directory) (g-exec-error-quark, 8) make: *** [check-tests/test-qga] Error 1 This check was commented out by bab47d9a75a. I think that was by mistake, because the commit message of that commit didn't mention this change. Signed-off-by: Yang Hongyang <hongyang.yang@easystack.cn> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Michael Roth <mdroth@linux.vnet.ibm.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Cc: qemu-stable@nongnu.org
2016-04-19Update language files for QEMU 2.6.0Peter Maydell7-127/+127
Update translation files (change created via 'make -C po update'). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1461059023-14470-1-git-send-email-peter.maydell@linaro.org Reviewed-by: Stefan Weil <sw@weilnetz.de>
2016-04-19block/gluster: prevent data loss after i/o errorJeff Cody2-1/+60
Upon receiving an I/O error after an fsync, by default gluster will dump its cache. However, QEMU will retry the fsync, which is especially useful when encountering errors such as ENOSPC when using the werror=stop option. When using caching with gluster, however, the last written data will be lost upon encountering ENOSPC. Using the write-behind-cache xlator option of 'resync-failed-syncs-after-fsync' should cause gluster to retain the cached data after a failed fsync, so that ENOSPC and other transient errors are recoverable. Unfortunately, we have no way of knowing if the 'resync-failed-syncs-after-fsync' xlator option is supported, so for now close the fd and set the BDS driver to NULL upon fsync error. Signed-off-by: Jeff Cody <jcody@redhat.com>
2016-04-19block/gluster: code movement of qemu_gluster_close()Jeff Cody1-11/+11
Move qemu_gluster_close() further up in the file, in preparation for the next patch, to avoid a forward declaration. Signed-off-by: Jeff Cody <jcody@redhat.com>
2016-04-19block/gluster: return correct error valueJeff Cody1-1/+1
Upon error, gluster will call the aio callback function with a ret value of -1, with errno set to the proper error value. If we set the acb->ret value to the return value in the callback, that results in every error being EPERM (i.e. 1). Instead, set it to the proper error result. Reviewed-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: Jeff Cody <jcody@redhat.com>
2016-04-19Merge remote-tracking branch 'remotes/armbru/tags/pull-fw_cfg-2016-04-19' ↵Peter Maydell2-24/+36
into staging fw_cfg: Adopt /opt/RFQDN convention # gpg: Signature made Tue 19 Apr 2016 15:14:20 BST using RSA key ID EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" * remotes/armbru/tags/pull-fw_cfg-2016-04-19: fw_cfg: Adopt /opt/RFQDN convention Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-19fw_cfg: Adopt /opt/RFQDN conventionMarkus Armbruster2-24/+36
FW CFG's primary user is QEMU, which uses it to expose configuration information (in the widest sense) to Firmware. Thus the name FW CFG. FW CFG can also be used by others for their own purposes. QEMU is merely acting as transport then. Names starting with opt/ are reserved for such uses. There is no provision, however, to guide safe sharing among different such users. Fix that, loosely following QMP precedence: names should start with opt/RFQDN/, where RFQDN is a reverse fully qualified domain name you control. Based on a more ambitious patch from Michael Tsirkin. Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Gabriel L. Somlo <somlo@cmu.edu> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2016-04-19Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20160419-1' into ↵Peter Maydell1-4/+7
staging ehci: fix (s)iTD looping issue (CVE-2015-8558) in a different way. # gpg: Signature made Tue 19 Apr 2016 07:22:22 BST using RSA key ID D3E87138 # 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>" * remotes/kraxel/tags/pull-usb-20160419-1: Revert "ehci: make idt processing more robust" ehci: apply limit to iTD/sidt descriptors Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-19Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.6-20160419' ↵Peter Maydell1-2/+2
into staging ppc patch queueu for 2016-04-19 A single fix for a regression since 2.5. This should be the last ppc pull request for 2.6. # gpg: Signature made Tue 19 Apr 2016 02:48:30 BST using RSA key ID 20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" # 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: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-2.6-20160419: cuda: fix off-by-one error in SET_TIME command Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-19cadence_uart: bounds check write offsetMichael S. Tsirkin1-0/+3
cadence_uart_init() initializes an I/O memory region of size 0x1000 bytes. However in uart_write(), the 'offset' parameter (offset within region) is divided by 4 and then used to index the array 'r' of size CADENCE_UART_R_MAX which is much smaller: (0x48/4). If 'offset>>=2' exceeds CADENCE_UART_R_MAX, this will cause an out-of-bounds memory write where the offset and the value are controlled by guest. This will corrupt QEMU memory, in most situations this causes the vm to crash. Fix by checking the offset against the array size. Cc: qemu-stable@nongnu.org Reported-by: 李强 <liqiang6-s@360.cn> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> Message-id: 20160418100735.GA517@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-19Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into ↵Peter Maydell1-8/+8
staging X86 fix for 2.6.0-rc3 # gpg: Signature made Mon 18 Apr 2016 20:02:15 BST using RSA key ID 984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" * remotes/ehabkost/tags/x86-pull-request: target-i386: Set AMD alias bits after filtering CPUID data Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-19Revert "ehci: make idt processing more robust"Gerd Hoffmann1-3/+2
This reverts commit 156a2e4dbffa85997636a7a39ef12da6f1b40254. Breaks FreeBSD. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-04-19ehci: apply limit to iTD/sidt descriptorsGerd Hoffmann1-1/+5
Commit "156a2e4 ehci: make idt processing more robust" tries to avoid a DoS by the guest (create a circular iTD queue and let qemu ehci emulation run in circles forever). Unfortunately this has two problems: First it misses the case of siTDs, and second it reportedly breaks FreeBSD. So lets go for a different approach: just count the number of iTDs and siTDs we have seen per frame and apply a limit. That should really catch all cases now. Reported-by: 杜少博 <dushaobo@360.cn> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2016-04-19cuda: fix off-by-one error in SET_TIME commandAurelien Jarno1-2/+2
With the new framework the cuda_cmd_set_time command directly receive the data, without the command byte. Therefore the time is stored at in_data[0], not at in_data[1]. This fixes the "hwclock --systohc" command in a guest. Cc: Hervé Poussineau <hpoussin@reactos.org> Cc: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Hervé Poussineau <hpoussin@reactos.org> [this fixes a regression introduced by e647317 "cuda: port SET_TIME command to new framework"] Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-04-18target-i386: Set AMD alias bits after filtering CPUID dataEduardo Habkost1-8/+8
QEMU complains about -cpu host on an AMD machine: warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 0] For bits 0,1,3,4,5,6,7,8,9,12,13,14,15,16,17,23,24. KVM_GET_SUPPORTED_CPUID and and x86_cpu_get_migratable_flags() don't handle the AMD CPUID aliases bits, making x86_cpu_filter_features() print warnings and clear those CPUID bits incorrectly. To avoid hacking x86_cpu_get_migratable_flags() to handle CPUID_EXT2_AMD_ALIASES (just like the existing hack inside kvm_arch_get_supported_cpuid()), simply move the CPUID_EXT2_AMD_ALIASES code in x86_cpu_realizefn() after the x86_cpu_filter_features() call. This will probably make the CPUID_EXT2_AMD_ALIASES hack in kvm_arch_get_supported_cpuid() unnecessary, too. The hack will be removed in a follow-up patch after v2.6.0. Reported-by: Radim Krčmář <rkrcmar@redhat.com> Tested-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2016-04-18Merge remote-tracking branch 'remotes/afaerber/tags/qom-cpu-for-peter' into ↵Peter Maydell1-1/+0
staging QOM CPUState and X86CPU * MAINTAINERS cleanup # gpg: Signature made Mon 18 Apr 2016 17:23:16 BST using RSA key ID 3E7E013F # gpg: Good signature from "Andreas Färber <afaerber@suse.de>" # gpg: aka "Andreas Färber <afaerber@suse.com>" * remotes/afaerber/tags/qom-cpu-for-peter: MAINTAINERS: Drop target-i386 from CPU subsystem Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-18MAINTAINERS: Drop target-i386 from CPU subsystemAndreas Färber1-1/+0
X86CPU QOM type is in good hands and actively maintained these days, so drop it from the generic QOM CPU subsystem. Some refactorings and design questions will still intersect, but review and discussions of individual series can still take place while opting out of general X86CPU patch review. Acked-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2016-04-18Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-signed' ↵Peter Maydell4-0/+0
into staging Update OpenBIOS images # gpg: Signature made Mon 18 Apr 2016 09:39:31 BST using RSA key ID AE0F321F # gpg: Good signature from "Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>" * remotes/mcayland/tags/qemu-openbios-signed: Update OpenBIOS images Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-18Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.6-20160418' ↵Peter Maydell4-7/+16
into staging ppc patch queue for 2-16-04-18 Three bugfixe patches for 2.6 here. * Two for bad implementation of some of the strong load/store instructions * One for bad migration of the XER register. This is a regression from 2.5, cause by a change in the way we represent at XER during runtime. # gpg: Signature made Mon 18 Apr 2016 06:17:03 BST using RSA key ID 20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" # 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: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-2.6-20160418: ppc: Fix migration of the XER register ppc: Fix the bad exception NIP value and the range check in LSWX ppc: Fix the range check in the LSWI instruction Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-18Merge remote-tracking branch 'remotes/otubo/tags/pull-seccomp-20160416' into ↵Peter Maydell2-3/+9
staging seccomp branch queue # gpg: Signature made Sat 16 Apr 2016 19:58:46 BST using RSA key ID 12F8BD2F # gpg: Good signature from "Eduardo Otubo (Software Engineer @ ProfitBricks) <eduardo.otubo@profitbricks.com>" # 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: 1C96 46B6 E1D1 C38A F2EC 3FDE FD0C FF5B 12F8 BD2F * remotes/otubo/tags/pull-seccomp-20160416: seccomp: adding sysinfo system call to whitelist seccomp: Whitelist cacheflush since 2.2.0 not 2.2.3 configure: Enable seccomp sandbox for MIPS Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-18Merge remote-tracking branch 'remotes/weil/tags/pull-wxx-20160415' into stagingPeter Maydell2-5/+1
wxx patch queue # gpg: Signature made Fri 15 Apr 2016 18:36:41 BST using RSA key ID 677450AD # gpg: Good signature from "Stefan Weil <sw@weilnetz.de>" # gpg: aka "Stefan Weil <stefan.weil@weilnetz.de>" # gpg: aka "Stefan Weil <stefan.weil@bib.uni-mannheim.de>" # 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: 4923 6FEA 75C9 5D69 8EC2 B78A E08C 21D5 6774 50AD * remotes/weil/tags/pull-wxx-20160415: wxx: Fix broken TCP networking (regression) Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-18Update OpenBIOS imagesMark Cave-Ayland4-0/+0
Update OpenBIOS images to SVN r1395 built from submodule. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2016-04-18ppc: Fix migration of the XER registerThomas Huth1-1/+1
env->xer only holds the lower bits of the XER register nowadays, the SO, OV and CA bits are stored in separate variables (see the function cpu_write_xer() for details). Since the migration code currently only reads the "xer" variable, the upper bits are lost during migration. Fix it by using cpu_read_xer() instead. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-04-18ppc: Fix the bad exception NIP value and the range check in LSWXThomas Huth1-2/+3
The range checks in the LSWX instruction are completely insufficient: They do not take the wrap-around case into account, and the check "reg < rx" should be "reg <= rx" instead. Fix it by using the new lsw_reg_in_range() helper function that is already used for LSWI, too. Then there is a second problem: In case the INVAL exception is generated, the NIP value is wrong, it currently points to the instruction before the LSWX instruction. This is because gen_lswx() already decreases the NIP value by 4 (to be prepared for page fault exceptions), and powerpc_excp() later decreases it again by 4 while handling the program exception. So to get this right, we've got to undo the "- 4" from gen_lswx() here before calling helper_raise_exception_err(). Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-04-18ppc: Fix the range check in the LSWI instructionThomas Huth2-4/+12
There are two issues: First, the number of registers that are used has to be calculated with "(nb + 3) / 4" (i.e. round always up, not down). Second, the "start <= ra && (start + nr - 32) > ra" condition for the wrap-around case is wrong: It has to be tested with "||" instead of "&&". Since we can reuse this check later for the LSWX instruction, let's place the fixed code into a helper function, too. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2016-04-16seccomp: adding sysinfo system call to whitelistMiroslav Rezanina1-0/+1
Newer version of nss-softokn libraries (> 3.16.2.3) use sysinfo call so qemu using rbd image hang after start when run in sandbox mode. To allow using rbd images in sandbox mode we have to whitelist it. Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com> Acked-by: Eduardo Otubo <eduardo.otubo@profitbricks.com>
2016-04-16seccomp: Whitelist cacheflush since 2.2.0 not 2.2.3James Hogan1-3/+5
The cacheflush system call (found on MIPS and ARM) has been included in the libseccomp header since 2.2.0, so include it back to that version. Previously it was only enabled since 2.2.3 since that is when it was enabled properly for ARM. This will allow seccomp support to be enabled for MIPS back to libseccomp 2.2.0. Signed-off-by: James Hogan <james.hogan@imgtec.com> Reviewed-By: Andrew Jones <drjones@redhat.com> Acked-by: Eduardo Otubo <eduardo.otubo@profitbricks.com>
2016-04-16configure: Enable seccomp sandbox for MIPSJames Hogan1-0/+3
Enable seccomp on MIPS since libseccomp version 2.2.0 when MIPS support was first added. Signed-off-by: James Hogan <james.hogan@imgtec.com> Reviewed-by: Andrew Jones <drjones@redhat.com> Acked-by: Eduardo Otubo <eduardo.otubo@profitbricks.com>
2016-04-15wxx: Fix broken TCP networking (regression)Stefan Weil2-5/+1
It is broken since commit c619644067f98098dcdbc951e2dda79e97560afa. Reported-by: Michael Fritscher <michael@fritscher.net> Tested-by: Michael Fritscher <michael@fritscher.net> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Stefan Weil <sw@weilnetz.de>
2016-04-15Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into stagingPeter Maydell130-353/+281
Block layer patches for 2.6.0-rc3 # gpg: Signature made Fri 15 Apr 2016 17:02:23 BST using RSA key ID C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" * remotes/kevin/tags/for-upstream: nbd: Don't kill server on client that doesn't request TLS nbd: fix assert() on qemu-nbd stop nbd: Don't fail handshake on NBD_OPT_LIST descriptions qemu-iotests: 041: More robust assertion on quorum node qemu-iotests: place valgrind log file in scratch dir qemu-iotests: tests: do not set unused tmp variable qemu-iotests: common.rc: drop unused _do() qemu-iotests: drop unused _within_tolerance() filter Fix pflash migration block: Don't ignore flags in blk_{,co,aio}_write_zeroes() block/vpc: update comments to be compliant w/coding guidelines block/vpc: set errp in vpc_open block/vpc: make checks on max table size a bit more lax block/vpc: Use the correct max sector count for VHD images block/vpc: use current_size field for XenConverter VHD images vpc: use current_size field for XenServer VHD images block/vpc: set errp in vpc_create block: Fix blk_aio_write_zeroes() qemu-io: Support 'aio_write -z' Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-15Merge remote-tracking branch 'remotes/armbru/tags/pull-backends-2016-04-15' ↵Peter Maydell1-0/+8
into staging hostmem-file: plug a small leak # gpg: Signature made Fri 15 Apr 2016 17:30:42 BST using RSA key ID EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" * remotes/armbru/tags/pull-backends-2016-04-15: hostmem-file: plug a small leak Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-04-15Merge remote-tracking branch 'mreitz/tags/pull-block-for-kevin-2016-04-15' ↵Kevin Wolf125-278/+54
into queue-block Block patches for 2.6.0-rc3. # gpg: Signature made Fri Apr 15 17:57:30 2016 CEST using RSA key ID E838ACAD # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" * mreitz/tags/pull-block-for-kevin-2016-04-15: nbd: Don't kill server on client that doesn't request TLS nbd: fix assert() on qemu-nbd stop nbd: Don't fail handshake on NBD_OPT_LIST descriptions qemu-iotests: 041: More robust assertion on quorum node qemu-iotests: place valgrind log file in scratch dir qemu-iotests: tests: do not set unused tmp variable qemu-iotests: common.rc: drop unused _do() qemu-iotests: drop unused _within_tolerance() filter Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-04-15nbd: Don't kill server on client that doesn't request TLSEric Blake1-2/+13
Upstream NBD documents (as of commit 4feebc95) that servers MAY choose to operate in a conditional mode, where it is up to the client whether to use TLS. For qemu's case, we want to always be in FORCEDTLS mode, because of the risk of man-in-the-middle attacks, and since we never export more than one device; likewise, the qemu client will ALWAYS send NBD_OPT_STARTTLS as its first option. But now that SELECTIVETLS servers exist, it is feasible to encounter a (non-qemu) client that is programmed to talk to such a server, and does not do NBD_OPT_STARTTLS first, but rather wants to probe if it can use a non-encrypted export. The NBD protocol documents that we should let such a client continue trying, on the grounds that maybe the client will get the hint to send NBD_OPT_STARTTLS, rather than immediately dropping the connection. Note that NBD_OPT_EXPORT_NAME is a special case: since it is the only option request that can't have an error return, we have to (continue to) drop the connection on that one; rather, what we are fixing here is that all other replies prior to TLS initiation tell the client NBD_REP_ERR_TLS_REQD, but keep the connection alive. Signed-off-by: Eric Blake <eblake@redhat.com> Message-id: 1460671343-18485-1-git-send-email-eblake@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2016-04-15nbd: fix assert() on qemu-nbd stopPavel Butsykin1-1/+1
From time to time qemu-nbd is crashing on the following assert: assert(state == TERMINATING); nbd_export_closed nbd_export_put main and the state at the moment of the crash is evaluated to TERMINATE. During shutdown process of the client the nbd_client_thread thread sends SIGTERM signal and the main thread calls the nbd_client_closed callback. If the SIGTERM callback will be executed after change the state to TERMINATING, then the state will once again be TERMINATE. To solve the issue, we must change the state to TERMINATE only if the state is RUNNING. In the other case we are shutting down already. Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com> Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1460629215-11567-1-git-send-email-den@openvz.org Signed-off-by: Max Reitz <mreitz@redhat.com>
2016-04-15nbd: Don't fail handshake on NBD_OPT_LIST descriptionsEric Blake1-2/+21
The NBD Protocol states that NBD_REP_SERVER may set 'length > sizeof(namelen) + namelen'; in which case the rest of the packet is a UTF-8 description of the export. While we don't know of any NBD servers that send this description yet, we had better consume the data so we don't choke when we start to talk to such a server. Also, a (buggy/malicious) server that replies with length < sizeof(namelen) would cause us to block waiting for bytes that the server is not sending, and one that replies with super-huge lengths could cause us to temporarily allocate up to 4G memory. Sanity check things before blindly reading incorrectly. Signed-off-by: Eric Blake <eblake@redhat.com> Message-id: 1460077777-31004-1-git-send-email-eblake@redhat.com Reviewed-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Max Reitz <mreitz@redhat.com>
2016-04-15qemu-iotests: 041: More robust assertion on quorum nodeFam Zheng2-8/+18
Block nodes are now assigned names automatically, therefore the test case is fragile in using fixed indices in result. Introduce a method in iotests.py and do the matching more sensibly. Signed-off-by: Fam Zheng <famz@redhat.com> Message-id: 1460518995-1338-1-git-send-email-famz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>