aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-01-15Merge remote-tracking branch 'afaerber-or/prep-up' into stagingAnthony Liguori2-25/+41
* afaerber-or/prep-up: pc87312: Avoid define conflict on mingw32 pc87312: Replace register_ioport_*() with MemoryRegion Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-15Merge remote-tracking branch 'mdroth/qga-pull-1-14-2013-2' into stagingAnthony Liguori1-2/+2
* mdroth/qga-pull-1-14-2013-2: qga: add missing commas in json docs Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-15Merge remote-tracking branch 'mdroth/qga-pull-1-14-2013' into stagingAnthony Liguori2-8/+29
* mdroth/qga-pull-1-14-2013: qemu-ga: Handle errors uniformely in ga_channel_open() qemu-ga: Plug fd leak on ga_channel_open() error paths qemu-ga: Plug fd leak on ga_channel_listen_accept() error path qemu-ga: Plug file descriptor leak on ga_open_pidfile() error path qemu-ga: Drop pointless lseek() from ga_open_pidfile() qemu-ga: Document intentional fall through in channel_event_cb() qemu-ga: add ga_open_logfile() qemu-ga: ga_open_pidfile(): use qemu_open() Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-15Merge remote-tracking branch 'sstabellini/xen-2013-01-14' into stagingAnthony Liguori1-24/+184
* sstabellini/xen-2013-01-14: xen_disk: implement BLKIF_OP_FLUSH_DISKCACHE, remove BLKIF_OP_WRITE_BARRIER xen_disk: add persistent grant support to xen_disk backend xen_disk: fix memory leak Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-15pc87312: Avoid define conflict on mingw32Blue Swirl1-21/+17
Mingw32 headers define FAR, causing this warning: /src/qemu/hw/pc87312.c:38:0: warning: "FAR" redefined [enabled by default] In file included from /usr/local/lib/gcc/i686-mingw32msvc/4.7.0/../../../../i686-mingw32msvc/include/windows.h:48:0, from /src/qemu/include/sysemu/os-win32.h:29, from /src/qemu/include/qemu-common.h:46, from /src/qemu/include/exec/ioport.h:27, from /src/qemu/hw/isa.h:6, from /src/qemu/hw/pc87312.h:28, from /src/qemu/hw/pc87312.c:26: /usr/local/lib/gcc/i686-mingw32msvc/4.7.0/../../../../i686-mingw32msvc/include/windef.h:34:0: note: this is the location of the previous definition Avoid the warning by expanding the macros. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Acked-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2013-01-15pc87312: Replace register_ioport_*() with MemoryRegionAndreas Färber2-4/+24
Prepare an instance_init function for the MemoryRegion init. Signed-off-by: Andreas Färber <andreas.faerber@web.de> Tested-by: Hervé Poussineau <hpoussin@reactos.org>
2013-01-14virtio-9p: fix compilation error.KONRAD Frederic1-0/+1
Fix the compilation error introduced by msg new field. CC hw/9pfs/virtio-9p.o In file included from /home/konradf/Documents/safe/greensocs/virtio-project/x86-qemu/qemu/hw/9pfs/virtio-9p.c:17:0: /home/konradf/Documents/safe/greensocs/virtio-project/x86-qemu/qemu/hw/virtio-pci.h:30:16: erreur: field ‘msg’ has incomplete type make: *** [hw/9pfs/virtio-9p.o] Erreur 1 Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
2013-01-14qga: add missing commas in json docsEric Blake1-2/+2
* qga/qapi-schema.json: Use valid JSON. Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-14dataplane: fix build breakage on set_guest_notifiers()Michael Roth1-2/+2
virtio_pci_set_guest_notifiers() now takes an additional argument to specify the number of virtqueues to assign a guest notifier for. This causes a build breakage for CONFIG_VIRTIO_BLK_DATA_PLANE builds: /home/mdroth/w/qemu2.git/hw/dataplane/virtio-blk.c: In function ‘virtio_blk_data_plane_start’: /home/mdroth/w/qemu2.git/hw/dataplane/virtio-blk.c:451:47: error: too few arguments to function ‘s->vdev->binding->set_guest_notifiers’ /home/mdroth/w/qemu2.git/hw/dataplane/virtio-blk.c: In function ‘virtio_blk_data_plane_stop’: /home/mdroth/w/qemu2.git/hw/dataplane/virtio-blk.c:511:5: error: too few arguments to function ‘s->vdev->binding->set_guest_notifiers’ make[1]: *** [hw/dataplane/virtio-blk.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [subdir-x86_64-softmmu] Error 2 Fix this by passing 1 as the number of virtqueues to assign notifiers for. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-14virtio-pci: build for uninitialized return value in vq_vector_unmaskMichael Roth1-1/+1
Fixes the following: /home/mdroth/w/qemu2.git/hw/virtio-pci.c: In function ‘kvm_virtio_pci_vector_unmask’: /home/mdroth/w/qemu2.git/hw/virtio-pci.c:673:12: error: ‘ret’ may be used uninitialized in this function [-Werror=uninitialized] cc1: all warnings being treated as errors make: *** [hw/virtio-pci.o] Error 1 make: *** Waiting for unfinished jobs.... Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-14Add GE IP-Octal 232 IndustryPack emulationAlberto Garcia2-1/+620
The GE IP-Octal 232 is an IndustryPack module that implements eight RS-232 serial ports, each one of which can be redirected to a character device in the host. Signed-off-by: Alberto Garcia <agarcia@igalia.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-14Add TEWS TPCI200 IndustryPack emulationAlberto Garcia6-0/+872
The TPCI200 is a PCI board that supports up to 4 IndustryPack modules. A new bus type called 'IndustryPack' has been created so any compatible module can be attached to this board. Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alberto Garcia <agarcia@igalia.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-14xen_disk: implement BLKIF_OP_FLUSH_DISKCACHE, remove BLKIF_OP_WRITE_BARRIERStefano Stabellini1-5/+4
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2013-01-14xen_disk: add persistent grant support to xen_disk backendRoger Pau Monne1-17/+154
This protocol extension reuses the same set of grant pages for all transactions between the front/back drivers, avoiding expensive tlb flushes, grant table lock contention and switches between userspace and kernel space. The full description of the protocol can be found in the public blkif.h header. http://xenbits.xen.org/gitweb/?p=xen.git;a=blob_plain;f=xen/include/public/io/blkif.h Speed improvement with 15 guests performing I/O is ~450%. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2013-01-14xen_disk: fix memory leakRoger Pau Monne1-2/+26
On ioreq_release the full ioreq was memset to 0, loosing all the data and memory allocations inside the QEMUIOVector, which leads to a memory leak. Create a new function to specifically reset ioreq. Reported-by: Maik Wessler <maik.wessler@yahoo.com> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2013-01-14qemu-ga: Handle errors uniformely in ga_channel_open()Markus Armbruster1-4/+7
We detect errors in several places. One reports with g_error(), which calls abort(), the others report with g_critical(). Three of them exit(), three return false. Always report with g_critical(), and return false. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> *minor fix-up of commit msg Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-14qemu-ga: Plug fd leak on ga_channel_open() error pathsMarkus Armbruster1-0/+1
Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-14qemu-ga: Plug fd leak on ga_channel_listen_accept() error pathMarkus Armbruster1-0/+1
Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-14qemu-ga: Plug file descriptor leak on ga_open_pidfile() error pathMarkus Armbruster1-0/+2
Spotted by Coverity. Also document why we keep it open on success. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-14qemu-ga: Drop pointless lseek() from ga_open_pidfile()Markus Armbruster1-1/+1
After open(), the file offset is already zero, and neither lockf() nor ftruncate() change it. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-14qemu-ga: Document intentional fall through in channel_event_cb()Markus Armbruster1-0/+1
For clarity, and to hush up Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-14qemu-ga: add ga_open_logfile()Luiz Capitulino1-2/+15
This function sets O_CLOEXEC on the log file fd so that it isn't leaked to executed processes. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Acked-by: Amos Kong <akong@redhat.com> Tested-by: Amos Kong <akong@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-14qemu-ga: ga_open_pidfile(): use qemu_open()Luiz Capitulino1-1/+1
This ensures that O_CLOEXEC is passed to open(), this way the pid file fd is not leaked to executed processes. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Acked-by: Amos Kong <akong@redhat.com> Tested-by: Amos Kong <akong@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-14Merge remote-tracking branch 'kraxel/pixman.v6' into stagingAnthony Liguori2-1/+5
* kraxel/pixman.v6: pixman: pass extra cflags and ldflags Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-14Merge remote-tracking branch 'kraxel/usb.76' into stagingAnthony Liguori3-8/+31
* kraxel/usb.76: usb-host: Initialize dev->port the obviously safe way usb-host: Drop superfluous null test from usb_host_auto_scan() ehci: Assert state machine is sane w.r.t. EHCIQueue xhci: nuke transfe5rs on detach xhci: call xhci_detach_slot on root port detach too xhci: create xhci_detach_slot helper function Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-14Merge remote-tracking branch 'spice/spice.v67' into stagingAnthony Liguori1-16/+10
* spice/spice.v67: qxl: Don't drop client capability bits qxl: Fix SPICE_RING_PROD_ITEM(), SPICE_RING_CONS_ITEM() sanity check Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-14Merge remote-tracking branch 'kraxel/testdev.2' into stagingAnthony Liguori1-9/+9
* kraxel/testdev.2: pc-testdev: use typedefs Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-14Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori5-68/+120
* kwolf/for-anthony: dataplane: handle misaligned virtio-blk requests dataplane: extract virtio-blk read/write processing into do_rdwr_cmd() block: make qiov_is_aligned() public raw-posix: fix bdrv_aio_ioctl sheepdog: implement direct write semantics block: do not probe zero-sized disks Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-14Merge remote-tracking branch 'mst/tags/for_anthony' into stagingAnthony Liguori19-100/+437
pci,virtio This further optimizes MSIX handling in virtio-pci. Also included is pci cleanup by Paolo, and pci device assignment fix by Alex. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> * mst/tags/for_anthony: pci-assign: Enable MSIX on device to match guest pci: use constants for devices under the 1B36 device ID, document them ivshmem: use symbolic constant for PCI ID, add to pci-ids.txt virtio-9p: use symbolic constant, add to pci-ids.txt reorganize pci-ids.txt docs: move pci-ids.txt to docs/specs/ vhost: backend masking support vhost: set started flag while start is in progress virtio-net: set/clear vhost_started in reverse order virtio: backend virtqueue notifier masking virtio-pci: cache msix messages kvm: add stub for update msi route msix: add api to access msix message virtio: don't waste irqfds on control vqs
2013-01-14Merge remote-tracking branch 'bonzini/stub' into stagingAnthony Liguori87-1375/+1310
* bonzini/stub: (27 commits) build: improve quiet output for .stp rules build: fold trace-obj-y into libqemuutil.a build: some simplifications for "trace/Makefile.objs" build: remove coroutine-obj-y build: move version-obj-y to the generic LINK rule build: move base QAPI files to libqemuutil.a build: move QAPI definitions for QEMU out of qapi-obj-y build: consolidate multiple variables into universal-obj-y build: move qobject files to qobject/ and libqemuutil.a build: move libqemuutil.a components to util/ build: move files away from tools-obj-y, common-obj-y, user-obj-y build: move util-obj-y to libqemuutil.a build: rename oslib-obj-y to util-obj-y libcacard: list oslib-obj-y file explicitly libcacard: link vscclient to dynamic library libcacard: rewrite Makefile in non-recursive style libcacard: add list of exported symbols libcacard: use per-target variable definitions libcacard: prepare to use -y trick in the Makefile libcacard: require libtool to build it ... Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-14Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori2-3/+9
* qmp/queue/qmp: monitor: assert monitor_puts()'s loop invariant target-i386: fix bits 39:32 of the final physical address when using 4M page Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-01-14pixman: pass extra cflags and ldflagsGerd Hoffmann2-1/+5
Store --extra-cflags and --extra-ldflags in config-host.mak, then pass them on to the pixman configure script. Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-14usb-host: Initialize dev->port the obviously safe wayMarkus Armbruster1-1/+1
Coverity worries the strcpy() could overrun the destination. It can't, because the source always points to usb_host_scan()'s auto port[], which has the same size. Use pstrcpy() anyway, to hush the checker. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-14usb-host: Drop superfluous null test from usb_host_auto_scan()Markus Armbruster1-1/+1
Coverity points out that port is later passed to usb_host_open(), which dereferences it. It actually can't be null: it always points to usb_host_scan()'s auto port[]. Drop the superfluous port == NULL test. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-14ehci: Assert state machine is sane w.r.t. EHCIQueueMarkus Armbruster1-0/+4
Coverity worries the EHCIQueue pointer could be null when we pass it to functions that reference it. The state machine ensures it can't be null then. Assert that, to hush the checker. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-14dataplane: handle misaligned virtio-blk requestsStefan Hajnoczi1-0/+40
O_DIRECT on Linux has alignment requirements on I/O buffers and misaligned requests result in -EINVAL. The Linux virtio_blk guest driver usually submits aligned requests so I forgot to handle misaligned requests. It turns out that virtio-win guest drivers submit misaligned requests. Handle them using a bounce buffer that meets alignment requirements. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-01-14dataplane: extract virtio-blk read/write processing into do_rdwr_cmd()Stefan Hajnoczi1-11/+20
Extract code for read/write command processing into do_rdwr_cmd(). This brings together pieces that are spread across process_request(). The real motivation is to set the stage for handling misaligned requests, which the next patch tackles. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-01-14block: make qiov_is_aligned() publicStefan Hajnoczi3-17/+18
The qiov_is_aligned() function checks whether a QEMUIOVector meets a BlockDriverState's alignment requirements. This is needed by virtio-blk-data-plane so: 1. Move the function from block/raw-posix.c to block/block.c. 2. Make it public in block/block.h. 3. Rename to bdrv_qiov_is_aligned(). 4. Change return type from int to bool. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-01-14raw-posix: fix bdrv_aio_ioctlPaolo Bonzini1-9/+1
When the raw-posix aio=thread code was moved from posix-aio-compat.c to block/raw-posix.c, there was an unintended change to the ioctl code. The code used to return the ioctl command, which posix_aio_read() would later morph into a zero. This hack is not necessary anymore, and in fact breaks scsi-generic (which expects a zero return code). Remove it. Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-01-14sheepdog: implement direct write semanticsLiu Yuan1-30/+40
Sheepdog supports both writeback/writethrough write but has not yet supported DIRECTIO semantics which bypass the cache completely even if Sheepdog daemon is set up with cache enabled. Suppose cache is enabled on Sheepdog daemon size, the new cache control is cache=writeback # enable the writeback semantics for write cache=writethrough # enable the emulated writethrough semantics for write cache=directsync # disable cache competely Guest WCE toggling on the run time to toggle writeback/writethrough is also supported. Cc: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Liu Yuan <tailai.ly@taobao.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-01-14block: do not probe zero-sized disksPaolo Bonzini1-1/+1
A blank CD or DVD is visible as a zero-sized disks. Probing such disks will lead to an EIO and a failure to start the VM. Treating them as raw is a better solution. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-01-14xhci: nuke transfe5rs on detachGerd Hoffmann1-1/+7
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-14xhci: call xhci_detach_slot on root port detach tooGerd Hoffmann1-0/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-14xhci: create xhci_detach_slot helper functionGerd Hoffmann1-6/+18
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-14pc-testdev: use typedefsGerd Hoffmann1-9/+9
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-14qxl: Don't drop client capability bitsMarkus Armbruster1-2/+4
interface_set_client_capabilities() copies only the first few bits, because it falls into a Classic C trap: you can declare a parameter uint8_t caps[58], but the resulting parameter type is uint8_t *, not uint8_t[58]. In particular, sizeof(caps) is sizeof(uint8_t *), not the intended sizeof(uint8_t[58]). Harmless, because the bits aren't used, yet. Broken in commit c10018d6. Spotted by Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-14qxl: Fix SPICE_RING_PROD_ITEM(), SPICE_RING_CONS_ITEM() sanity checkMarkus Armbruster1-14/+6
The pointer arithmetic there is safe, but ugly. Coverity grouses about it. However, the actual comparison is off by one: <= end instead of < end. Fix by rewriting the check in a cleaner way. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-01-12build: improve quiet output for .stp rulesPaolo Bonzini1-1/+1
Mention the directory in which the .stp file is being generated. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12build: fold trace-obj-y into libqemuutil.aPaolo Bonzini5-26/+20
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-01-12build: some simplifications for "trace/Makefile.objs"Paolo Bonzini2-13/+13
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>