aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-11-01checkpatch: remove rule on non-indented labelsPaolo Bonzini
There are 508 non-indented (non-default) labels, and 511 that are indented. So the rule is debatable at least. Actually, in the common case of labels at the outermost scope, there is really just one place where to put the label, so the rule is just wrong IMHO. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01savevm: qemu_fille_buffer() used to return one error for reads of size 0.Juan Quintela
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01kvm_init didn't set return value after create vm failedXu He Jie
And kvm_ioctl(s, KVM_CREATE_VM, 0)'s return value can be < -1, so change the check of vmfd at label 'err'. Signed-off-by: Xu He Jie <xuhj@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01spapr: fix buildAnthony Liguori
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01Revert "PPC: Fail configure when libfdt is not available"Blue Swirl
This reverts commit f90a9d02401eeeec18a122b61ccccb91244f321c. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-11-01Merge branch 'ppc-next' of git://repo.or.cz/qemu/agrafBlue Swirl
* 'ppc-next' of git://repo.or.cz/qemu/agraf: (24 commits) pseries: Add partial support for PCI ppc: Alter CPU state to mask out TCG unimplemented instructions as appropriate pseries: Allow writes to KVM accelerated TCE table KVM: PPC: Override host vmx/vsx/dfp only when information known ppc: Fix up usermode only builds pseries: Correct vmx/dfp handling in both KVM and TCG cases PPC: Fail configure when libfdt is not available ppc: Avoid decrementer related kvm exits PPC: Disable non-440 CPUs for ppcemb target PPC: Bump qemu-system-ppc to 64-bit physical address space pseries: Under kvm use guest cpu = host cpu by default ppc: Add cpu defs for POWER7 revisions 2.1 and 2.3 ppc: First cut implementation of -cpu host ppc: Remove broken partial PVR matching pseries: Update SLOF firmware image pseries: Add device tree properties for VMX/VSX and DFP under kvm ppc: Generalize the kvmppc_get_clockfreq() function Set an invalid-bits mask for each SPE instructions pseries: Update SLOF firmware image pseries: Use Book3S-HV TCE acceleration capabilities ...
2011-11-01Merge remote-tracking branch 'kraxel/usb.29' into stagingAnthony Liguori
2011-11-01Merge remote-tracking branch 'stefanha/tracing' into stagingAnthony Liguori
2011-11-01Merge remote-tracking branch 'spice/spice.v46' into stagingAnthony Liguori
2011-11-01Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori
2011-11-01opencores_eth: fix RX path: FCS, padding and TLMax Filippov
OpenCores 10/100 Mbps Ethernet MAC specification doesn't clearly state whether FCS is counted in the RX frame length or not. Looks like it is. Append zero FCS to the received frames. Get rid of big static buffer for RX frame padding, optimize it for the most common MINFL value range. Set RXD_TL for the long frames only when HUGEN bit is set. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01migration: flush migration data to disk.Gerd Hoffmann
This patch increases robustness when migrating to a file with two little changes: (1) Before closing the migration file handle checks if it happens to be a regular file and if so it issues a fsync. This way the data is flushed to disk before qemu sends the migration completed event. (2) It adds error checking. In case either fsync or close syscall fails pass up the error (and fail migration). [ v2: return -errno instead of -1 ] Cc: Juan Quintela <quintela@redhat.com> Cc: Jiri Denemark <jdenemar@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01add test-coroutine to checksGerd Hoffmann
There is a "test-coroutine" which isn't in the list. Add it so "make check" runs it too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01add "make check" targetGerd Hoffmann
Add some Makefile glue so we have a simple "make check" to run the unit tests. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01move checks to separate variableGerd Hoffmann
Create a new CHECKS variable. Put the checks there instead of adding them to the TOOLS variable. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01Probe for libcheck by default.Gerd Hoffmann
Probe for libcheck and build checks (if found) by default. Can be explicitly disabled using --disable-check-utests. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01ia64-dis.c: Undefine ABS to avoid clash with glibPeter Maydell
Undefine ABS to avoid a clash with the macro that glib.h helpfully defines for us (and a resulting build failure on ia64 hosts). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01Fix segfault on migration completionLuiz Capitulino
A simple migration reproduces it: 1. Start the source VM with: # qemu [...] -S 2. Start the destination VM with: # qemu <source VM cmd-line> -incoming tcp:0:4444 3. In the source VM: (qemu) migrate -d tcp:0:4444 4. The source VM will segfault as soon as migration completes (might not happen in the first try) What is happening here is that qemu_file_put_notify() can end up closing 's->file' (in which case it's also set to NULL). The call stack is rather complex, but Eduardo helped tracking it to: select loop -> migrate_fd_put_notify() -> qemu_file_put_notify() -> buffered_put_buffer() -> migrate_fd_put_ready() -> migrate_fd_completed() -> migrate_fd_cleanup(). To be honest, it's not completely clear to me in which cases 's->file' is not closed (on error maybe)? But I doubt this fix will make anything worse. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01Add qapi related generated files to .gitignoreDavid Gibson
.gitignore already lists the qapi-generated subdirectory which includes a number of files generated during build. However, there are some additional files generated by the qapi build which go in the top level directory. This patch adds them to .gitignore, removing the irritating noise from diffs and the like. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01qemu-barrier: Fix build failure on PowerPC Mac OS XEric Sunshine
qemu-barrier.h tests if macro __powerpc__ is defined, however, the preprocessor on PowerPC Mac OS X defines only __POWERPC__, not __powerpc__. Resolve by testing instead for qemu-provided _ARCH_PPC. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01fw_cfg: Use g_file_get_contents instead of multiple fread() callsPavel Borzenkov
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01Simplify cpu_exec_all to tcg_exec_allJan Kiszka
After the removal of the non-threaded mode cpu_exec_all is now only used by TCG. Refactor it accordingly, also dropping its unused return value. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01Make cpu_single_env thread-localPaolo Bonzini
Make cpu_single_env thread-local. This fixes a regression in handling of multi-threaded programs in linux-user mode (bug 823902). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> [Peter Maydell: rename tls_cpu_single_env to cpu_single_env] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01darwin-user/main.c: Drop unused cpu_single_env definitionPaolo Bonzini
Drop the cpu_single_env definition as it is unused. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01qemu-tls.h: Add abstraction layer for TLS variablesPeter Maydell
Add an abstraction layer for defining and using thread-local variables. For the moment this is implemented only for Linux, which means they can only be used in restricted circumstances. The abstraction layer allows us to add POSIX and Win32 support later. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01Error check find_ram_offsetAlex Williamson
Spotted via code review, we initialize offset to 0 to avoid a compiler warning, but in the unlikely case that offset is never set to something else, we should abort instead of return a value that will almost certainly cause problems. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01usb-host: fix host closeGerd Hoffmann
The whole usb_host_close() function is skipped in case the device is not in attached state. This is wrong though, only then usb_device_detach() must be skipped, all other cleanup (especially device reset and closing the file handle) still needs to be done. There are code paths where usb_host_close() is called with the device in detached state already. This fixes usb-host devices not being released and returned to the host after removing them with device_del. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-11-01usb: change VID/PID for usb-hub and usb-msd to prevent conflictRoy Tam
Some USB drivers, for example USBASPI.SYS, will skip different type of device which has same VID/PID. The following patch helps preventing usb-msd being skipped by the driver. Signed-off-by: Roy Tam <roytam@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-11-01Support running QEMU on ValgrindStefan Weil
Valgrind is a tool which can automatically detect many kinds of bugs. Running QEMU on Valgrind with x86_64 hosts was not possible because Valgrind aborts when memalign is called with an alignment larger than 1 MiB. QEMU normally uses 2 MiB on Linux x86_64. Now the alignment is reduced to the page size when QEMU is running on Valgrind. v2: Instead of using the macro RUNNING_ON_VALGRIND from valgrind.h, the patch now uses a hack from libvirt which tests for the pre-loaded vgpreload_*.so shared libraries. This avoids the need for valgrind.h. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01MAINTAINERS: Add PReP maintainerAndreas Färber
Officially take on maintainership for PReP and upgrade to Odd Fixes. Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Andreas Färber <andreas.faerber@web.de> Cc: Alexander Graf <agraf@suse.de> Cc: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-11-01trace: Add wildcard trace event supportMark Wu
A basic wildcard matching is supported in both the monitor command "trace-event" and the events list file. That means you can enable/disable the events having a common prefix in a batch. For example, virtio-blk trace events could be enabled using: trace-event virtio_blk_* on Signed-off-by: Mark Wu <wudxw@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-11-01usb-hub: wakeup on attachGerd Hoffmann
When attaching a new device we must send a wakeup request to the root hub, otherwise the guest will not notice the new device in case the usb hub is suspended. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-11-01qxl: create slots on post_load in vga stateAlon Levy
RHBZ 740547 If we migrate when the device is in vga state the guest still believes the slots are created, and will cause operations that reference the slots, causing a "panic: virtual address out of range" on the first of them. Easy to see by migrating in vga mode with a driver loaded, for instance windows cmd window in full screen mode, and then exiting vga mode back to native mode will cause said panic. Fixed by doing the slot recreation in post_load for vga mode as well. Note that compat does not require any changes because it creates it's only slot by a side effect of QXL_IO_SET_MODE. Signed-off-by: Alon Levy <alevy@redhat.com>
2011-11-01qxl: make sure we continue to run with a shared bufferGerd Hoffmann
The qxl renderer works only with a shared displaysurface. So better make sure we actually have one and restore it when needed. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-11-01qxl: stride fixupGerd Hoffmann
spice uses negative stride value to signal the bitmap is upside down. The qxl renderer (used for scl, vnc and screenshots) wants a positive value because it is easier to work with. The positive value is then stored in the very same variable, which has the drawback that the upside-down test works only once. Fix by using two variables. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2011-11-01acl: Fix use after free in qemu_acl_reset()Markus Armbruster
Reproducer: $ MALLOC_PERTURB_=234 qemu-system-x86_64 -vnc :0,acl,sasl [...] QEMU 0.15.50 monitor - type 'help' for more information (qemu) acl_add vnc.username fred allow acl: added rule at position 1 (qemu) acl_reset vnc.username Segmentation fault (core dumped) Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-11-01qapi: fix typos in documentation JSON examplesStefan Hajnoczi
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-11-01sysbus: Supply missing va_end()Markus Armbruster
C99 7.15.1: Each invocation of the va_start and va_copy macros shall be matched by a corresponding invocation of the va_end macro in the same function. Spotted by Coverity. Harmless on the (common) systems where va_end() does nothing. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-11-01net: tap-linux: Fix unhelpful error messageLuiz Capitulino
I'm getting: could not configure /dev/net/tun (tap%d): Operation not permitted When the ioctl() fails, ifr.ifr_name will most likely not be overwritten. So we better only use it when ifname contains a string. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-10-31Merge remote-tracking branch 'riku/linux-user-for-upstream' into stagingAnthony Liguori
2011-10-31Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori
Conflicts: block/vmdk.c
2011-10-31Merge remote-tracking branch 'aneesh/for-upstream-7' into stagingAnthony Liguori
2011-10-31Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori
Conflicts: ui/spice-core.c
2011-10-31Merge remote-tracking branch 'qemu-kvm-tmp/uq/master' into stagingAnthony Liguori
2011-10-31Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori
2011-10-31Merge remote-tracking branch 'alon/pull-libcacard-assert' into stagingAnthony Liguori
2011-10-31Merge remote-tracking branch 'spice/spice.v45' into stagingAnthony Liguori
2011-10-31hw/9pfs: Replace rwlocks with RCU variants of interfaces.Harsh Prateek Bora
Use QLIST_INSERT_HEAD_RCU and rcu_read_lock/unlock instead of rwlocks. Use v9fs_synth_mutex as a write-only mutex to handle concurrent writers. Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-10-31qemu-queue: Introduce QLIST_INSERT_HEAD_RCU and dummy RCU wrappers.Harsh Prateek Bora
SynthFS needs a QLIST_INSERT_HEAD_RCU to make sure list instructions are not re-ordered and therefore avoiding a crash. There may be parallel readers which should be allowed for lock-free access and this variant allows us to get rid of rwlocks used by readers. SynthFS is a special case where we dont really need full RCU capabilities as it doesnt allow list entry deletion but concurrent readers/writers and instruction re-ordering should not result in a crash. Also, once the real rcu is available, dummy rcu macro definitions will go away and the code will still work as expected. This patchwork is based on inputs from Paolo Bonzini. Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-10-31hw/9pfs: Add synthetic file system support using 9pAneesh Kumar K.V
This patch create a synthetic file system with mount tag v_synth when -virtfs_synth command line option is specified in qemu. The synthetic file system can be mounted in guest using 9p using the below command line mount -t 9p -oversion=9p2000.L,trans=virtio v_synth <mountpint> Synthetic file system enabled different qemu subsystem to register callbacks for read and write events from guest. The subsystem can create directories and files in the synthetic file system as show in ex below qemu_v9fs_synth_mkdir(NULL, 0777, "test2", &node); qemu_v9fs_synth_add_file(node, 0777, "testfile", my_test_read, NULL, NULL); Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>