summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-09-02qtest: Fix FMT_timeval vs time_tRichard Henderson1-4/+4
Since FMT_timeval unconditionally uses %ld for both tv_sec and tv_usec, and already casts tv_usec to long, also cast tv_sec to long. Cc: Andreas Färber <afaerber@suse.de> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-09-02tcg: Constant fold div, remRichard Henderson1-0/+23
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-09-02tcg-ppc64: Implement muluh, mulshRichard Henderson2-29/+11
Using these instead of mulu2 and muls2 lets us avoid having to argument overlap analysis in the backend. Normal register allocation will DTRT. Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-09-02tcg-mips: Implement mulsh, muluhRichard Henderson2-2/+12
With the optimization in tcg_liveness_analysis, we can avoid the MFLO when it is unused. Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-09-02tcg: Add muluh and mulsh opcodesRichard Henderson16-11/+128
Use them in places where mulu2 and muls2 are used. Optimize mulx2 with dead low part to mulxh. Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-09-02usb/dev-hid: Modified usb-tablet category from Misc to InputMarcel Apfelbaum1-1/+1
usb-tablet device was wrongly assigned to Misc category Reported-by: Markus Armbruster <armbru@redhat.com> Cc: qemu-stable@nongnu.org Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-02Revert "usb-hub: report status changes only once"Gerd Hoffmann1-5/+1
This reverts commit a309ee6e0a256f690760abfba44fceaa52a7c2f3. This isn't in line with the usb specification and adds regressions, win7 fails to drive the usb hub for example. Was added because it "solved" the issue of hubs interacting badly with the xhci host controller. Now with the root cause being fixed in xhci (commit <FIXME>) we can revert this one. Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-02usb-hub: add tracepoint for status reportsGerd Hoffmann2-0/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-02usb: parallelize usb3 streamsGerd Hoffmann1-3/+4
usb3 bulk endpoints with streams are implicitly pipelined now, so the requests will actually be processed in parallel. Also allow them to complete out-of-order. Fixes stalls in the uas driver. Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-02uas: add property for request loggingGerd Hoffmann1-3/+12
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-02xhci: reset port when disabling slotGerd Hoffmann1-0/+1
Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-02xhci: emulate intr endpoint intervals correctlyGerd Hoffmann1-7/+37
Respect the interval for interrupt endpoints, so we don't finish transfers as fast as possible but at the rate configured by the guest. Fixes guest deadlocks triggered by interrupt storms. Cc: Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-02xhci: fix endpoint interval calculationGerd Hoffmann1-1/+1
Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-02xhci: add port to slot_address tracepointGerd Hoffmann2-2/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-02xhci: add tracepoint for endpoint state changesGerd Hoffmann2-0/+20
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-02xhci: remove leftover debug printfGerd Hoffmann1-2/+0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-09-02qemu-iotests: Overlapping cluster allocationsMax Reitz3-0/+156
A new test on corrupted images with overlapping cluster allocations. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-09-02qcow2_check: Mark image consistentMax Reitz1-1/+5
If no corruptions remain after an image repair (and no errors have been encountered), clear the corrupt flag in qcow2_check. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-09-02qcow2-refcount: Repair shared refcount blocksMax Reitz3-2/+148
If the refcount of a refcount block is greater than one, we can at least try to repair that problem by duplicating the affected block. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-09-02PPC: spapr: iommu: rework tracesAlexey Kardashevskiy2-47/+29
This converts old style fprintf to traces. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> [agraf: change patch subject] Signed-off-by: Alexander Graf <agraf@suse.de>
2013-09-02spapr: add "stop-self" RTAS call required to support hot CPU unplugAlexey Kardashevskiy1-0/+23
PAPR+ requires two RTAS calls to be supported by the hypervisor in order to allow hotplugging VCPUs from the guest. The "start-cpu" RTAS call was already there but "stop-self" was not. This adds the "stop-self" RTAS call. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-09-02PPC: KVM: Compile fix for qemu_notify_eventAlexander Graf1-0/+1
The function qemu_notify_event is defined by a header that we don't include in the PPC KVM code. Include it to get the code building again. target-ppc/kvm_ppc.c: In function 'kvmppc_timer_hack': target-ppc/kvm_ppc.c:26:5: error: implicit declaration of function 'qemu_notify_event' [-Werror=implicit-function-declaration] target-ppc/kvm_ppc.c:26:5: error: nested extern declaration of 'qemu_notify_event' [-Werror=nested-externs] Signed-off-by: Alexander Graf <agraf@suse.de>
2013-09-02pseries: Add H_SET_MODE hcall to change guest exception endiannessAnton Blanchard3-2/+67
H_SET_MODE is used for controlling various partition settings. One of these settings is the endianness a guest takes its exceptions in. Signed-off-by: Anton Blanchard <anton@samba.org> [agraf: fix whitespace] Signed-off-by: Alexander Graf <agraf@suse.de>
2013-09-02xics: move registration of global state to realize()Alexey Kardashevskiy1-10/+11
Registration of global state belongs into realize so move it there. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-09-02spapr-pci: rework MSI/MSIXAlexey Kardashevskiy4-42/+60
On the sPAPR platform a guest allocates MSI/MSIX vectors via RTAS hypercalls which return global IRQ numbers to a guest so it only operates with those and never touches MSIMessage. Therefore MSIMessage handling is completely hidden in QEMU. Previously every sPAPR PCI host bridge implemented its own MSI window to catch msi_notify()/msix_notify() calls from QEMU devices (virtio-pci or vfio) and route them to the guest via qemu_pulse_irq(). MSIMessage used to be encoded as: .addr - address within the PHB MSI window; .data - the device index on PHB plus vector number. The MSI MR write function translated this MSIMessage to a global IRQ number and called qemu_pulse_irq(). However the total number of IRQs is not really big (at the moment it is 1024 IRQs starting from 4096) and even 16bit data field of MSIMessage seems to be enough to store an IRQ number there. This simplifies MSI handling in sPAPR PHB. Specifically, this does: 1. remove a MSI window from a PHB; 2. add a single memory region for all MSIs to sPAPREnvironment and spapr_pci_msi_init() to initialize it; 3. encode MSIMessage as: * .addr - a fixed address of SPAPR_PCI_MSI_WINDOW==0x40000000000ULL; * .data as an IRQ number. 4. change IRQ allocator to align first IRQ number in a block for MSI. MSI uses lower bits to specify the vector number so the first IRQ has to be aligned. MSIX does not need any special allocator though. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-09-02target-ppc: Use #define instead of opencoding SLB valid bitAneesh Kumar K.V1-1/+1
Use SLB_ESID_V instead of (1 << 27) in the code Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-09-02spapr-pci: fix config space access to support bridgesAlexey Kardashevskiy1-10/+2
spapr-pci config space accessors use find_dev() to find a PCI device. However find_dev() only searched on a primary bus and did not do recursive search through secondary buses so config space access was not possible for devices other that on a primary bus. This fixed find_dev() by using the PCI API pci_find_device() function. This effectively enabled pci bridges on spapr. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-09-02target-ppc: fix bit extraction for FPBF and FPLAurelien Jarno1-2/+2
Bit extraction for the FP BF and L field of the MTFSFI and MTFSF instructions is wrong and doesn't match the reference manual (which explain the bit number in big endian format). It has been broken in commit 7d08d85645def18eac2a9d672c1868a35e0bcf79. This patch fixes this, which in turn fixes the problem reported by Khem Raj about the floor() function of libm. Reported-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> CC: qemu-stable@nongnu.org (1.6) Signed-off-by: Alexander Graf <agraf@suse.de>
2013-09-02ppc405_boards: Don't enforce presence of firmware for qtestAndreas Färber1-15/+20
Adopt error_report() while at it. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-09-02ppc405_uc: Disable debug outputAndreas Färber1-8/+8
Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-09-02ppc405_boards: Disable debug outputAndreas Färber1-2/+2
Also move one stray debug output into an #ifdef. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-09-02ppc: virtex_ml507: QEMU_OPTION_dtb support for this machine.Efimov Vasily1-10/+19
QEMU has 'dtb' option for specifing the device tree file for the kernel. The patch adds support for this option to the 'virtex_ml507' machine implementation. Signed-off-by: Efimov Vasily <real@ispras.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-09-02disas/ppc.c: Fix little endian disassemblyAnton Blanchard1-1/+2
Use info->endian to select the endian of the instruction to be disassembled. Signed-off-by: Anton Blanchard <anton@samba.org> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-09-02target-ppc: POWER7 supports the MSR_LE bitAnton Blanchard1-1/+1
Add MSR_LE to the msr_mask for POWER7. Signed-off-by: Anton Blanchard <anton@samba.org> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-09-02target-ppc: USE LPCR_ILE to control exception endian on POWER7Anton Blanchard2-0/+12
On POWER7, LPCR_ILE is used to control what endian guests take their exceptions in so use it instead of MSR_ILE. Signed-off-by: Anton Blanchard <anton@samba.org> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-09-02pseries: Fix stalls on hypervisor virtual consoleAnton Blanchard1-0/+2
A number of users are reporting stalls when using the pseries hypervisor virtual console. A simple test case is to paste 15 or 17 characters at a time into the console. Pasting 15 characters at a time works fine but pasting 17 characters hangs for a random amount of time. Other activity (network, qemu monitor etc) unblocks it. If qemu-char tries to send more than 16 characters at once, vty_can_receive returns false. At this point we have to wait for the guest to consume that output. Everything is good so far. The problem occurs when the the guest does consume the output. We need to signal back to the qemu-char layer that we are ready for more input. Without this we block until something else kicks us (eg network activity). Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-09-02PPC: E500: Generate device tree on resetAlexander Graf1-9/+43
Today we generate the device tree once on machine initialization and then store the finalized blob in memory to reload it on reset. This is bad for 2 reasons. First we potentially waste a bunch of RAM for no good reason, as we have all information required to regenerate the device tree available anyways. The second reason is even more important. On machine init when we generate the device tree for the first time, we don't have all of the devices fully initialized yet. But the device tree needs to potentially walk devices to put information about them into the device tree. Move the generation into a reset function. That way we just generate it new every time we reset, solving both of the above issues. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-09-01aio / timers: use g_usleep() not sleep()Alex Bligh1-3/+3
sleep() apparently doesn't exist under mingw. Use g_usleep for portability. Signed-off-by: Alex Bligh <alex@alex.org.uk> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-09-01adlib: sort offsets in portio registrationHervé Poussineau1-1/+1
This fixes the following assert when -device adlib is used: ioport.c:240: portio_list_add: Assertion `pio->offset >= off_last' failed. Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-09-01qmp: fix integer usage in examplesEric Blake1-13/+13
Per the qapi schema, block_set_io_throttle takes most arguments as ints, not strings. * qmp-commands.hx (block_set_io_throttle): Use correct type. Fix whitespace and a copy-paste bug in the process. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-09-01tci: Remove function tcg_out64 (fix broken build)Stefan Weil1-7/+0
Commit ac26eb69a311396668809eadbf7ff4e623447d4c added tcg_out64 to tcg/tcg.c. tcg/tci/tcg-target.c already had a nearly identical implementation which is now removed to fix a compiler error. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-09-01target-arm: Report unimplemented opcodes (LOG_UNIMP)Stefan Weil1-0/+4
These unimplemented opcodes are handled like illegal opcodes, but they are used in existing code. We should at least report when they are executed. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-09-01pflash_cfi02.c: fix debug macroAntony Pavlov1-1/+1
If PFLASH_DEBUG is enabled then we have some build errors: hw/block/pflash_cfi02.c: In function ‘pflash_timer’: hw/block/pflash_cfi02.c:128:5: error: expected ‘)’ before string constant hw/block/pflash_cfi02.c:128:5: error: too few arguments to function ‘fprintf’ This patch fixes the problem. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-09-01configure: Remove unneeded redirections of stderr (pkg-config --exists)Stefan Weil1-16/+14
Predicate options (--exists, --atleast-version, ...) of pkg-config dont't print error messages to stderr, so redirecting stderr is not necessary. Combining a predicate option with --modversion is not necessary for tests. Instead of testing with --modversion, --exists can be used. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-09-01configure: Remove unneeded redirections of stderr (pkg-config --cflags, --libs)Stefan Weil1-18/+18
For existing libraries, pkg-config --cflags and pkg-config --libs won't print error messages to stderr, so redirecting stderr is not necessary. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-09-01configure: Don't write .pyc files by default (python -B)Stefan Weil1-2/+2
When a Python script is run, Python normally writes bytecode into a .pyc file. QEMU's build process uses several Python scripts which are called from configure or make. The generated .pyc files take disk space without being of much use, because those scripts are short, not time critical and only called a few times. Python's option -B disables writing of .pyc files. QEMU now uses "python -B" as default, but it is still possible to choose a different call by passing --python=PYTHON to configure. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-09-01curl: qemu_bh_new() can never return NULLStefan Hajnoczi1-6/+0
Drop error code path which cannot be taken since qemu_bh_new() does not return NULL. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-09-01slirp/arp_table.c: Avoid shifting into sign bit of signed integersPeter Maydell1-2/+2
"0xf << 28" shifts right into the sign bit, since 0xf is a signed integer. Use the 'U' suffix to force an unsigned shift to avoid this undefined behaviour and a clang sanitizer warning. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Acked-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-09-01configure: disable clang -Wstring-plus-int warningPeter Maydell1-0/+1
Some versions of clang will warn about adding integers to strings: disas/i386.c:4753:23: error: adding 'char' to a string does not append to the string [-Werror,-Wstring-plus-int] oappend ("%es:" + intel_syntax); ~~~~~~~^~~~~~~~~~~~~~ disas/i386.c:4753:23: note: use array indexing to silence this warning oappend ("%es:" + intel_syntax); ^ & [ ] disas/i386.c uses this idiom to to skip a "%" prefix if using intel rather than AT&T syntax. This seems like a reasonable thing to do, and I don't think anybody contributing to QEMU is likely to believe that '+' is a string concatenation operator in C, so just disable -Wstring-plus-int. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-09-01rdma: silly ipv6 bugfixMichael R. Hines1-3/+5
My bad - but it's very important for us to warn the user that IPv6 is broken on RoCE in linux right now, until linux releases a fixed version. Signed-off-by: Michael R. Hines <mrhines@us.ibm.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>