aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-03-26rdma: Fix cleanup in error pathsPadmanabh Ratnakar
As part of commit e325b49a320b493cc5d69e263751ff716dc458fe, order in which resources are destroyed was changed for fixing a seg fault. Due to this change, CQ will never get destroyed as CQ should be destroyed after QP destruction. Seg fault is caused improper cleanup when connection fails. Fixing cleanup after connection failure and order in which resources are destroyed in qemu_rdma_cleanup() routine. Signed-off-by: Meghana Cheripady <meghana.cheripady@emulex.com> Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-03-26Avoid crashing on multiple -incomingDr. David Alan Gilbert
Passing multiple -incoming options used to crash qemu (due to an invalid state transition incoming->incoming). Instead we now take the last -incoming option, e.g.: qemu-system-x86_64 -nographic -incoming tcp::4444 -incoming defer ends up doing the defer. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-03-26Merge remote-tracking branch 'remotes/agraf/tags/signed-ppc-for-upstream' ↵Peter Maydell
into staging Patch queue for 2.3 ppc - 2015-03-25 Just a few bug fixes before 2.3 gets released: - pseries: Firmware update, bugfixes - remove POWER5+ v0.0 that we incorrectly introduced in 2.3 - Fix -machine usb=no - Fix -boot once=foo in pseries - Add NULL pointer check in pseries machine init # gpg: Signature made Wed Mar 25 21:53:20 2015 GMT using RSA key ID 03FEDC60 # gpg: Good signature from "Alexander Graf <agraf@suse.de>" # gpg: aka "Alexander Graf <alex@csgraf.de>" * remotes/agraf/tags/signed-ppc-for-upstream: powerpc: fix -machine usb=no for newworld and pseries machines PPC: pseries: Implement boot once=foo target-ppc: Remove POWER5+ v0.0 that never existed spapr: Add missing checks for NULL pointers and report failures pseries: Update SLOF firmware image to qemu-slof-20150313 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-03-26virtio-scsi-dataplane: fix memory leak for VirtIOSCSIVringTing Wang
VirtIOSCSIVring which allocated in virtio_scsi_vring_init should be free when dataplane has been stopped or failed to start. Signed-off-by: Ting Wang <kathy.wangting@huawei.com> Message-Id: <1427355752-25844-1-git-send-email-kathy.wangting@huawei.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-26misc: fix typos in copyright declarationGonglei
Add a space after comma. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Message-Id: <1427374663-10168-1-git-send-email-arei.gonglei@huawei.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-26Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell
pc, virtio bugfixes for 2.3 Several bugfixes, nothing stands out especially. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Wed Mar 25 12:42:10 2015 GMT using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: virtio-net: validate backend queue numbers against bus limitation virtio-serial: fix virtio config size acpi: Add missing GCC_FMT_ATTR to local function Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-03-26Merge remote-tracking branch 'remotes/otubo/tags/pull-seccomp-20150325' into ↵Peter Maydell
staging seccomp branch queue # gpg: Signature made Wed Mar 25 10:09:29 2015 GMT using RSA key ID 12F8BD2F # gpg: Can't check signature: public key not found * remotes/otubo/tags/pull-seccomp-20150325: seccomp: update libseccomp version and remove arch restriction Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-03-26exec: avoid possible overwriting of mmaped area in qemu_ram_remapPaolo Bonzini
It is not necessary to munmap an area before remapping it with MAP_FIXED; if the memory region specified by addr and len overlaps pages of any existing mapping, then the overlapped part of the existing mapping will be discarded. On the other hand, if QEMU does munmap the pages, there is a small probability that another mmap sneaks in and catches the just-freed portion of the address space. In effect, munmap followed by mmap(MAP_FIXED) is a use-after-free error, and Coverity flags it as such. Fix it. Reviewed-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-25powerpc: fix -machine usb=no for newworld and pseries machinesPaolo Bonzini
Capture the explicit setting of "usb=no" into a separate bool, and use it to skip the update of machine->usb in the board init function. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2015-03-25PPC: pseries: Implement boot once=fooAlexander Graf
On sPAPR we haven't supported boot once ever since it emerged, but recently grew need for it. This patch implements boot once logic to it. While at it, we also move to the new bootdevice handling that got introduced to the tree recently. Reported-by: Dinar Valeev <dvaleev@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2015-03-25target-ppc: Remove POWER5+ v0.0 that never existedAlexey Kardashevskiy
IBM uses low 16bits to specify the chip version of a POWER CPU. So there has never been an actual silicon with PVR = 0x003B0000. The first silicon would have PVR 0x003B0100 but it is very unlikely to find it in any machine shipped to any customer as it was too raw. This removes CPU_POWERPC_POWER5P_v00 definition and changes POWER5+ and POWERgs aliases (which are synonyms) to point to POWER5+_v2.1 which can still be found in real machines. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Andreas Färber <afaerber@suse.de> [agraf: fix commit message] Signed-off-by: Alexander Graf <agraf@suse.de>
2015-03-25spapr: Add missing checks for NULL pointers and report failuresStefan Weil
This fixes potential runtime crashes and two warnings from Coverity. The new error message does not add a prefix "qemu:" because that is already done in function hw_error. It also starts with an uppercase letter because that seems to be the mostly used form. Signed-off-by: Stefan Weil <sw@weilnetz.de> [agraf: fix typo] Signed-off-by: Alexander Graf <agraf@suse.de>
2015-03-25pseries: Update SLOF firmware image to qemu-slof-20150313Alexey Kardashevskiy
The changelog is: > virtio: Fix vring allocation > helpers: Fix SLOF_alloc_mem_aligned to meet callers expectation > Set default palette according to "16-color Text Extension" document > Fix rectangle drawing functions to work also with higher bit depths > Fix the x86emu patch file > Silence compiler warning when building the biosemu > Use device-type Forth word to set up the corresponding property > Improve /openprom node > pci-properties: Remove redundant call to device-type > cas: reconfigure memory nodes > pci: use 64bit bar ranges Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
2015-03-25sparc: memory: Replace memory_region_init_ram with ↵Dirk Müller
memory_region_allocate_system_memory Commit 0b183fc871:"memory: move mem_path handling to memory_region_allocate_system_memory" split memory_region_init_ram and memory_region_init_ram_from_file. Also it moved mem-path handling a step up from memory_region_init_ram to memory_region_allocate_system_memory. Therefore for any board that uses memory_region_init_ram directly, -mem-path is not supported. Fix this by replacing memory_region_init_ram with memory_region_allocate_system_memory. Signed-off-by: Dirk Mueller <dmueller@suse.com> Message-Id: <CAL5wTH7o8uA59Ep0n41i0M19VFWa73n9m172j2W3fjz6=PSVBA@mail.gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-25mips: memory: Replace memory_region_init_ram with ↵Dirk Müller
memory_region_allocate_system_memory Commit 0b183fc871:"memory: move mem_path handling to memory_region_allocate_system_memory" split memory_region_init_ram and memory_region_init_ram_from_file. Also it moved mem-path handling a step up from memory_region_init_ram to memory_region_allocate_system_memory. Therefore for any board that uses memory_region_init_ram directly, -mem-path is not supported. Fix this by replacing memory_region_init_ram with memory_region_allocate_system_memory. Signed-off-by: Dirk Mueller <dmueller@suse.com> Message-Id: <CAL5wTH4-=HJUvwBu+2o6jGanJesJOyNf3sL8-5+d_-6C3cWBfA@mail.gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Acked-by: Leon Alrae <leon.alrae@imgtec.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-25m68k: memory: Replace memory_region_init_ram with ↵Dirk Müller
memory_region_allocate_system_memory Commit 0b183fc871:"memory: move mem_path handling to memory_region_allocate_system_memory" split memory_region_init_ram and memory_region_init_ram_from_file. Also it moved mem-path handling a step up from memory_region_init_ram to memory_region_allocate_system_memory. Therefore for any board that uses memory_region_init_ram directly, -mem-path is not supported. Fix this by replacing memory_region_init_ram with memory_region_allocate_system_memory. Signed-off-by: Dirk Mueller <dmueller@suse.com> Message-Id: <CAL5wTH6X-GsT1AA8kEtP_e7oZWGZgi=fCcDfSs3wLgJN30DbUw@mail.gmail.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-25virtio-net: validate backend queue numbers against bus limitationJason Wang
We don't validate the backend queue numbers against bus limitation, this will easily crash qemu if it exceeds the limitation which will hit the abort() in virtio_del_queue(). An example is trying to starting a virtio-net device with 256 queues. E.g: ./qemu-system-x86_64 -netdev tap,id=hn0,queues=256 -device virtio-net-pci,netdev=hn0 Fixing this by doing the validation and fail early. Cc: Michael S. Tsirkin <mst@redhat.com> Cc: qemu-stable <qemu-stable@nongnu.org> Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-03-25virtio-serial: fix virtio config sizeMichael S. Tsirkin
commit 9b70c1790acacae54d559d38ca69186a85040bb8 virtio-serial: switch to standard-headers changes virtio_console_config size from 8 to 12 bytes: it adds an optional 4 byte emerg_wr field. As this crosses a power of two boundary, this changes the PCI BAR size, which breaks migration compatibility with old qemu machine types. It's probably a problem for other transports as well. As a temporary fix, as we don't yet support this new field anyway, simply make the config size smaller at init time. Long terms we probably want something along the lines of virtio_net_set_config_size. Reported-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Cole Robinson <crobinso@redhat.com>
2015-03-25acpi: Add missing GCC_FMT_ATTR to local functionStefan Weil
This fixes these gcc warnings (not enabled in default build): hw/acpi/aml-build.c:83:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] hw/acpi/aml-build.c:88:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-03-25nbd: Fix up comment after commit e140177Markus Armbruster
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <1427271528-11624-1-git-send-email-armbru@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-25vmw_pvscsi: use PCI DMA APIsPaolo Bonzini
It is wrong to use address_space_memory directly, because there could be an IOMMU in the middle. Passing the entire PVSCSIRingInfo to RS_GET_FIELD and RS_SET_FIELD makes it easy to go back to the PVSCSIState. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-25megasas: use PCI DMA APIsPaolo Bonzini
It is wrong to use address_space_memory directly, because there could be an IOMMU in the middle. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-25cpus: Don't kick un-realized cpus.Peter Crosthwaite
following a464982499b2f637f6699e3d03e0a9d2e0b5288b, it's now possible for there to be attempts to take the BQL before CPUs have been realized in cases where a machine model inits peripherals before the first CPU. BQL lock aquisition kicks the first_cpu, leading to a segfault if this happens pre-realize. Guard the CPU kick routine to perform no action for a CPU that doesn't exist or doesn't have a thread yet. There was a fix to this with commit 6b49809c597331803ea941eadda813e5bb4e8fe2, but the check there misses the case where the CPU has been inited and not realized. Strengthen the check to make sure that the first_cpu has a thread (i.e. it is realized) before allowing the kick. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-Id: <1427107689-6946-1-git-send-email-peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-25i6300esb: Fix signed integer overflowDavid Gibson
If the guest programs a sufficiently large timeout value an integer overflow can occur in i6300esb_restart_timer(). e.g. if the maximum possible timer preload value of 0xfffff is programmed then we end up with the calculation: timeout = get_ticks_per_sec() * (0xfffff << 15) / 33000000; get_ticks_per_sec() returns 1000000000 (10^9) giving: 10^9 * (0xfffff * 2^15) == 0x1dcd632329b000000 (65 bits) Obviously the division by 33MHz brings it back under 64-bits, but the overflow has already occurred. Since signed integer overflow has undefined behaviour in C, in theory this could be arbitrarily bad. In practice, the overflowed value wraps around to something negative, causing the watchdog to immediately expire, killing the guest, which is still fairly bad. The bug can be triggered by running a Linux guest, loading the i6300esb driver with parameter "heartbeat=2046" and opening /dev/watchdog. The watchdog will trigger as soon as the device is opened. This patch corrects the problem by using muldiv64(), which effectively allows a 128-bit intermediate value between the multiplication and division. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <1427075508-12099-3-git-send-email-david@gibson.dropbear.id.au> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-25i6300esb: Correct endiannnessDavid Gibson
The IO operations for the i6300esb watchdog timer are marked as DEVICE_NATIVE_ENDIAN. This is not correct, and - as a PCI device - should be DEVICE_LITTLE_ENDIAN. This allows i6300esb to work on ppc targets (yes, using an Intel ICH derived device on ppc is a bit odd, but the driver exists on the guest and there's no more obviously suitable watchdog device). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Message-Id: <1427075508-12099-2-git-send-email-david@gibson.dropbear.id.au> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-25fw_cfg: factor out initialization of FW_CFG_ID (rev. number)Gabriel L. Somlo
The fw_cfg documentation says this of the revision key (0x0001, FW_CFG_ID): > A 32-bit little-endian unsigned int, this item is used as an interface > revision number, and is currently set to 1 by all QEMU architectures > which expose a fw_cfg device. arm/virt doesn't. It could be argued that that's an error in "hw/arm/virt.c"; on the other hand, all of the other fw_cfg providing boards set the interface version to 1 manually, despite the device coming from the same, shared implementation. Therefore, instead of adding fw_cfg_add_i32(fw_cfg, FW_CFG_ID, 1); to arm/virt, consolidate all such existing calls in the fw_cfg initialization code. Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Message-Id: <1426789244-26318-1-git-send-email-somlo@cmu.edu> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-25rcu tests: fix compilation on 32-bit ppcPaolo Bonzini
32-bit PPC cannot do atomic operations on long long. Inside the loops, we are already using local counters that are summed at the end of the run---with some exceptions (rcu_stress_count for rcutorture, n_nodes for test-rcu-list): fix them to use the same technique. For test-rcu-list, remove the mostly unused member "val" from the list. Then, use a mutex to protect the global counts. Performance does not matter there because every thread will only enter the critical section once. Remaining uses of atomic instructions are for ints or pointers. Reported-by: Andreas Faerber <afaerber@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-03-25seccomp: update libseccomp version and remove arch restrictionEduardo Otubo
Libseccomp version updated to 2.2.0 and arch restriction to x86/x86_64 is now removed. It's supposed to work on armv7l as well. Related bug: https://bugs.launchpad.net/qemu/+bug/1363641 Signed-off-by: Eduardo Otubo <eduardo.otubo@profitbricks.com>
2015-03-24Update version for v2.3.0-rc1 releasePeter Maydell
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-03-24Merge remote-tracking branch ↵Peter Maydell
'remotes/bkoppelmann/tags/pull-tricore-20150324' into staging TriCore bugfixes for 2.3-rc1 # gpg: Signature made Tue Mar 24 08:48:33 2015 GMT using RSA key ID 6B69CA14 # gpg: Good signature from "Bastian Koppelmann <kbastian@mail.uni-paderborn.de>" * remotes/bkoppelmann/tags/pull-tricore-20150324: target-tricore: properly fix dvinit_b/h_13 target-tricore: fix RRPW_DEXTR using wrong reg target-tricore: fix DVINIT_HU/BU calculating overflow before result target-tricore: Fix two helper functions (clang warnings) Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-03-24target-tricore: properly fix dvinit_b/h_13Bastian Koppelmann
The TriCore documentation was wrong on how to calculate ovf bits for those two instructions, which I confirmed with real hardware (TC1796 chip). An ovf actually happens, if the result (without remainder) does not fit into 8/16 bits. Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
2015-03-24target-tricore: fix RRPW_DEXTR using wrong regBastian Koppelmann
RRPW_DEXTR used r1 for the low part and r2 for the high part. It should be the other way round. This also fixes that the result of the first shift was not saved in a temp and could overwrite registers that were needed for the second shift. Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
2015-03-24target-tricore: fix DVINIT_HU/BU calculating overflow before resultBastian Koppelmann
dvinit_hu/bu for ISA v1.3 calculate the higher part of the result, that is needed for the overflow bits, after calculating the overflow bits. Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
2015-03-24target-tricore: Fix two helper functions (clang warnings)Stefan Weil
clang report: target-tricore/op_helper.c:1247:24: warning: taking the absolute value of unsigned type 'uint32_t' (aka 'unsigned int') has no effect [-Wabsolute-value] target-tricore/op_helper.c:1248:25: warning: taking the absolute value of unsigned type 'uint32_t' (aka 'unsigned int') has no effect [-Wabsolute-value] target-tricore/op_helper.c:1249:19: warning: taking the absolute value of unsigned type 'uint32_t' (aka 'unsigned int') has no effect [-Wabsolute-value] target-tricore/op_helper.c:1297:24: warning: taking the absolute value of unsigned type 'uint32_t' (aka 'unsigned int') has no effect [-Wabsolute-value] target-tricore/op_helper.c:1298:25: warning: taking the absolute value of unsigned type 'uint32_t' (aka 'unsigned int') has no effect [-Wabsolute-value] target-tricore/op_helper.c:1299:19: warning: taking the absolute value of unsigned type 'uint32_t' (aka 'unsigned int') has no effect [-Wabsolute-value] Fix also the divisor which was taken from the wrong register (thanks to Peter Maydell for this hint). Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Signed-off-by: Stefan Weil <sw@weilnetz.de> Message-Id: <1425739412-8144-1-git-send-email-sw@weilnetz.de> Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
2015-03-23Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into stagingPeter Maydell
# gpg: Signature made Mon Mar 23 16:51:45 2015 GMT using RSA key ID AAFC390E # gpg: Can't check signature: public key not found * remotes/jnsnow/tags/ide-pull-request: ahci-test: improve rw buffer patterns ahci: Fix sglist offset manipulation for BE machines ide: fix cmd_read_pio when nsectors > 1 ide: fix cmd_write_pio when nsectors > 1 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-03-23ahci-test: improve rw buffer patternsJohn Snow
My pattern was cyclical every 256 bytes, so it missed a fairly obvious failure case. Add some rand() pepper into the test pattern, and for large patterns that exceed 256 sectors, start writing an ID per-sector so that we never generate identical sector patterns. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Andreas Färber <afaerber@suse.de> Message-id: 1426811056-2202-5-git-send-email-jsnow@redhat.com
2015-03-23ahci: Fix sglist offset manipulation for BE machinesJohn Snow
This does not bother DMA, because DMA generally transfers the entire SGList in one shot if it can. PIO, on the other hand, tries to transfer just one sector at a time, and will make multiple visits to the sglist to fetch memory addresses. Fix the memory address calculaton when we have an offset by moving the offset addition OUTSIDE of the le64_to_cpu calculation. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Andreas Färber <afaerber@suse.de> Message-id: 1426811056-2202-4-git-send-email-jsnow@redhat.com
2015-03-23ide: fix cmd_read_pio when nsectors > 1John Snow
Similar to the cmd_write_pio fix, update the nsector count and ide sector before we invoke ide_transfer_start. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Andreas Färber <afaerber@suse.de> Message-id: 1426811056-2202-3-git-send-email-jsnow@redhat.com
2015-03-23ide: fix cmd_write_pio when nsectors > 1John Snow
We need to adjust the sector being written to prior to calling ide_transfer_start, otherwise we'll write to the same sector again. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Andreas Färber <afaerber@suse.de> Message-id: 1426811056-2202-2-git-send-email-jsnow@redhat.com
2015-03-23Merge remote-tracking branch 'remotes/riku/tags/pull-linux-user-20150323' ↵Peter Maydell
into staging linux-user patches for 2.3-rc1 # gpg: Signature made Mon Mar 23 13:51:56 2015 GMT using RSA key ID DE3C9BC0 # gpg: Good signature from "Riku Voipio <riku.voipio@iki.fi>" # gpg: aka "Riku Voipio <riku.voipio@linaro.org>" * remotes/riku/tags/pull-linux-user-20150323: linux-user: fix broken cpu_copy() linux-user: fix emulation of splice syscall linux-user/main.c: Remove redundant end_exclusive() in arm_kernel_cmpxchg64_helper() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-03-23linux-user: fix broken cpu_copy()Leon Alrae
New threads always point at the same env which is incorrect and usually leads to a crash. Signed-off-by: Leon Alrae <leon.alrae@imgtec.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2015-03-22linux-user: fix emulation of splice syscallAndreas Schwab
The second and fourth argument are in/out parameters, store them back after the syscall. Also, the fourth argument was mishandled, and EFAULT handling was missing. Signed-off-by: Andreas Schwab <schwab@suse.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2015-03-22linux-user/main.c: Remove redundant end_exclusive() in ↵Chen Gang S
arm_kernel_cmpxchg64_helper() start/end_exclusive() need be pairs, except the start_exclusive() in stop_all_tasks() which is only used by force_sig(), which will be abort. So at present, start_exclusive() in stop_all_task() need not be paired. queue_signal() may call force_sig(), or return after kill pid (or queue signal). If could return from queue_signal(), stop_all_task() would not be called in time, the next end_exclusive() would be issue. So in arm_kernel_cmpxchg64_helper() for ARM, need remove end_exclusive() after queue_signal(). The related commit: "97cc756 linux-user: Implement new ARM 64 bit cmpxchg kernel helper". Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
2015-03-20Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into ↵Peter Maydell
staging X86 queue 2015-03-19 # gpg: Signature made Thu Mar 19 19:40:17 2015 GMT using RSA key ID 984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@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: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/x86-pull-request: target-i386: Haswell-noTSX and Broadwell-noTSX Revert "target-i386: Disable HLE and RTM on Haswell & Broadwell" Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-03-20Merge remote-tracking branch ↵Peter Maydell
'remotes/ehabkost/tags/work/numa-verify-cpus-pull-request' into staging NUMA queue 2015-03-19 # gpg: Signature made Thu Mar 19 19:25:53 2015 GMT using RSA key ID 984DC5A6 # gpg: Can't check signature: public key not found * remotes/ehabkost/tags/work/numa-verify-cpus-pull-request: numa: Print warning if no node is assigned to a CPU pc: fix default VCPU to NUMA node mapping numa: introduce machine callback for VCPU to node mapping numa: Reject configuration if CPU appears on multiple nodes numa: Reject CPU indexes > max_cpus numa: Fix off-by-one error at MAX_CPUMASK_BITS check Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-03-20Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20150320-1' into ↵Peter Maydell
staging usb: bugfix collection. # gpg: Signature made Fri Mar 20 07:51:19 2015 GMT 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-20150320-1: ehci: fix segfault when hot-unplugging ehci controller ohci: fix resource cleanup leak uhci: fix segfault when hot-unplugging uhci controller hw/usb: Include USB files only if necessary usb/dev-storage: Avoid qerror_report_err() outside QMP handlers usb/dev-storage: Fix QMP device_add missing encryption key failure monitor usb: Inline monitor_read_bdrv_key_start()'s first part monitor: Plug memory leak in monitor_read_bdrv_key_start() monitor: Drop dead QMP check from monitor_read_password() uhci: Convert to realize ohci: Complete conversion to realize usb: Improve companion configuration error messages usb: Propagate errors through usb_register_companion() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-03-20ehci: fix segfault when hot-unplugging ehci controllerGonglei
When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging. Let's hook up reset via DeviceClass->reset() and drop the qemu_register_reset() call. Then Qemu will register and unregister the reset handler automatically. Cc: qemu-stable <qemu-stable@nongnu.org> Reported-by: Lidonglin <lidonglin@huawei.com> Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-03-20ohci: fix resource cleanup leakGonglei
When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging. Let's hook up reset via DeviceClass->reset() and drop the qemu_register_reset() call. Then Qemu will register and unregister the reset handler automatically. Ohci does't support hotplugging/hotunplugging yet, but existing resource cleanup leak logic likes ehci/uhci. Cc: qemu-stable <qemu-stable@nongnu.org> Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-03-20uhci: fix segfault when hot-unplugging uhci controllerGonglei
When hot-unplugging the usb controllers (ehci/uhci), we have to clean all resouce of these devices, involved registered reset handler. Otherwise, it may cause NULL pointer access and/or segmentation fault if we reboot the guest os after hot-unplugging. Let's hook up reset via DeviceClass->reset() and drop the qemu_register_reset() call. Then Qemu will register and unregister the reset handler automatically. Cc: qemu-stable <qemu-stable@nongnu.org> Reported-by: Lidonglin <lidonglin@huawei.com> Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-03-19target-i386: Haswell-noTSX and Broadwell-noTSXEduardo Habkost
With the Intel microcode update that removed HLE and RTM, there will be different kinds of Haswell and Broadwell CPUs out there: some that still have the HLE and RTM features, and some that don't have the HLE and RTM features. On both cases people may be willing to use the pc-*-2.3 machine-types. So, to cover both cases, introduce Haswell-noTSX and Broadwell-noTSX CPU models, for hosts that have Haswell and Broadwell CPUs without TSX support. Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>