summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* virtio.c: fix error messageMichael Tokarev2014-06-101-1/+1
| | | | | Suggested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* hw: vmware_vga: don't return cursorx when the driver asks for cursory registerNicolas Owens2014-06-101-1/+1
| | | | | | | | | | | hello qemu-*@nongnu.org, this is my first contribution. apologies if something is incorrect. this patch fixes vmware_vga.c so that it actually returns the cursory register when asked for, instead of cursorx. Signed-off-by: Nicolas Owens <mischief@offblast.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* smbios: use g_free directly on NULL pointersPaolo Bonzini2014-06-101-7/+2
| | | | | | | | No need to wrap it with an if. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* apb: Fix compiler warnings (large constants)Stefan Weil2014-06-101-2/+2
| | | | | | | Both constants need more than 32 bit. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* hw/net/ne2000-isa: Register vmstate structPeter Maydell2014-06-101-0/+1
| | | | | | | | | The ne2000-isa device defines a VMState struct for migration, but we forgot to actually register it. Correct this deficiency by setting dc->vmsd. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* hw/misc/milkymist-softusb: Remove unused softusb_{read, write}_pmem()Peter Maydell2014-06-101-25/+0
| | | | | | | | The functions softusb_read_pmem() and softusb_write_pmem() are unused; remove them. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* hw/isa/pc87312: Remove unused function is_parallel_epp()Peter Maydell2014-06-101-5/+0
| | | | | | | The function is_parallel_epp() is unused; remove it. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* hw/intc/openpic: Remove unused function IRQ_testbit()Peter Maydell2014-06-101-5/+0
| | | | | | | The IRQ_testbit() function is never used; remove it. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* hw/dma/xilinx_axidma: Remove unused stream_halted() functionPeter Maydell2014-06-101-5/+0
| | | | | | | The stream_halted() function is never used; remove it. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* hw/sd/sd.c: Drop unused sd_acmd_type[] arrayPeter Maydell2014-06-101-11/+0
| | | | | | | | | | | | | Drop the sd_acmd_type[] array: it is never used. (The equivalent sd_cmd_type[] array for normal commands is used to identify those commands whose argument includes the card address in the top 16 bits; but for app commands the card address is passed with the APP_CMD prefix, not with the argument to the app command itself.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* hw/i386/pc.c: Remove unused parallel_io and parallel_irq variablesPeter Maydell2014-06-101-3/+0
| | | | | | | The variables parallel_io and parallel_irq are unused; delete them. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* net: cadence_gem: Remove &desc[0] usagesPeter Crosthwaite2014-06-101-2/+2
| | | | | | | Just use desc instead. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* net: cadence_gem: Comment spelling sweepPeter Crosthwaite2014-06-101-6/+6
| | | | | | | Fix some typos in comments. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* net: cadence_gem: Add Tx descriptor fetch printfPeter Crosthwaite2014-06-101-0/+3
| | | | | | | | | Add a debug printf for TX descriptor fetching. This is helpful to anyone needing to debug TX ring buffer traversal. It is also now consistent with the RX code which has a similar printf. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* net: cadence_gem: Fix Tx descriptor updatePeter Crosthwaite2014-06-101-5/+7
| | | | | | | | | | | The local variable "desc" was being used to read-modify-write the first descriptor (of a multi-desc packet) upon packet completion. desc however continues to be used by the code as the current descriptor. Give this first desc RMW it's own local variable to avoid trampling. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* s390x/kvm: inject via flicCornelia Huck2014-06-101-0/+10
| | | | | | | | Try to inject floating interrupts via the flic if it is available. This allows us to inject the full range of floating interrupts. Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* s390x: cleanup interrupt injectionCornelia Huck2014-06-102-15/+6
| | | | | | | Remove the need for a cpu to inject a floating interrupt on kvm. Acked-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* s390x: consolidate floating interruptsCornelia Huck2014-06-101-11/+0
| | | | | | | | | | Move the injection code for all floating interrupts to interrupt.c and add a comment. Also get rid of the #ifdef CONFIG_KVM for the service interrupt. Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* s390/virtio-ccw: migration supportJens Freimann2014-06-103-0/+208
| | | | | | | | | This patch adds live migration support for virtio-ccw devices. It's not done with vmstate because virtio itself is not yet ported to vmstate either. Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* s390x/kvm: make flic play well with old kernelsCornelia Huck2014-06-101-2/+4
| | | | | | | | | | | | | If we run with an old kernel that does not support KVM_CAP_IRQ_ROUTING, we don't have to do anything in the ->register_io_adapter and ->io_adapter_map callbacks and therefore should return 0 instead of -ENOSYS (just as the non-kvm flic does). This fixes using adapter interrupts when running under an older kernel, which broke with "s390x: add I/O adapter registration". Reported-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* s390x/css: handle emw correctly for tschCornelia Huck2014-06-101-4/+20
| | | | | | | | | | | | We should not try to store the emw portion of the irb if extended measurements are not applicable. In particular, we should not surprise the guest by storing a larger irb if it did not enable extended measurements. Cc: qemu-stable@nongnu.org Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Tested-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
* vexpress: Add support for the -bios flag to provide firmwareGrant Likely2014-06-091-0/+13
| | | | | | | | | | | | | | | | | | | | | | Right now to run firmware inside the QEMU VExpress model requires padding out the firmware image to the size of the virtual flash and passing it in via the -pflash argument. If the firmware image is passed without padding, then QEMU will fail. Also, when passed as a -pflash argument, QEMU treats the file as persistent storage and will modify the file. The -bios flag provides the semantics that we want for providing a firmware image. This patch maps the contents of the -bios file into the address space at the boot flash location. Tested with the vexpress-a15 model and the Tianocore port. Signed-off-by: Grant Likely <grant.likely@linaro.org> Tested-by: Roy Franz <roy.franz@linaro.org> [PMM: folded long line, removed stray \n from error message, use correct variable for printing image name, exit(1) rather than 0] Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into ↵Peter Maydell2014-06-094-30/+91
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging Net patches # gpg: Signature made Mon 09 Jun 2014 14:41:34 BST using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/net-pull-request: e1000: remove broken support for 82573L tests: e1000: test additional device IDs e1000: allow command-line selection of card model vmxnet3: fix msix vectors unuse net: xilinx_ethlite: Fix Rx-pong interrupt Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * e1000: remove broken support for 82573LGabriel L. Somlo2014-06-091-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, e1000 support is based on the manual for the 8254xx model series. 82573x models are documented in a separate manual (see http://www.intel.com/content/dam/www/public/us/en/documents/manuals/pcie-gbe-controllers-open-source-manual.pdf) and the 82573L device ID no longer works correctly on either Linux (3.14.*) or Windows 7. This patch removes stale code claiming to support 82573L, cleaning up the code base for the remaining 8254xx model series. Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * e1000: allow command-line selection of card modelGabriel L. Somlo2014-06-092-24/+102
| | | | | | | | | | | | | | | | | | | | | | Allow selection of different card models from the qemu command line, to better accomodate a wider range of guests. Signed-off-by: Romain Dolbeau <romain@dolbeau.org> Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * vmxnet3: fix msix vectors unuseJiri Pirko2014-06-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | In vmxnet3_cleanup_msix(), there is called msix_vector_unuse() with VMXNET3_MAX_INTRS. That is not correct since vector of value VMXNET3_MAX_INTRS was never used. Also all the used vectors are not un-used. So call vmxnet3_unuse_msix_vectors() instead which does the correct job. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Acked-by: Dmitry Fleytman <dmitry@daynix.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * net: xilinx_ethlite: Fix Rx-pong interruptPeter Crosthwaite2014-06-091-1/+2
| | | | | | | | | | | | | | | | | | There is no CTRL_I bit in the pong buffer control register. The CTRL_I bit from the ping buffer masks both ping and pong buffers. Fix. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ↵Peter Maydell2014-06-095-366/+149
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging Block pull request # gpg: Signature made Fri 06 Jun 2014 17:08:50 BST using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/block-pull-request: (42 commits) qapi: Extract qapi/block.json definitions qapi: Extract qapi/block-core.json definitions qapi: create two block related json modules qapi: Extract qapi/common.json definitions sheepdog: reload only header in a case of live snapshot sheepdog: fix vdi object update after live snapshot rbd: Fix leaks in rbd_start_aio() error path qemu-img: Document check exit codes block: fix wrong order in live block migration setup blockdev: acquire AioContext in block_set_io_throttle throttle: add detach/attach test case throttle: add throttle_detach/attach_aio_context() dataplane: Support VIRTIO_BLK_T_SCSI_CMD virtio-blk: Factor out virtio_blk_handle_scsi_req from virtio_blk_handle_scsi virtio-blk: Allow config-wce in dataplane block: Move declaration of bdrv_get_aio_context to block.h raw-posix: drop raw_get_aio_fd() since it is no longer used dataplane: implement async flush dataplane: delete IOQueue since it is no longer used dataplane: use the QEMU block layer for I/O ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * dataplane: Support VIRTIO_BLK_T_SCSI_CMDFam Zheng2014-06-041-8/+10
| | | | | | | | | | Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * virtio-blk: Factor out virtio_blk_handle_scsi_req from virtio_blk_handle_scsiFam Zheng2014-06-041-34/+41
| | | | | | | | | | | | | | | | | | | | The common logic to process a scsi request in a VirtQueueElement is extracted to a function to share with dataplane. This makes VirtIOBlockReq.scsi unused, so drop it. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * virtio-blk: Allow config-wce in dataplaneFam Zheng2014-06-042-7/+7
| | | | | | | | | | | | | | | | | | Dataplane now uses block layer. Protect bdrv_set_enable_write_cache with aio_context_acquire and aio_context_release, so we can enable config-wce to allow guest to modify the write cache online. Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * dataplane: implement async flushStefan Hajnoczi2014-06-041-16/+27
| | | | | | | | | | | | | | | | Stop using the raw-posix file descriptor for synchronous qemu_fdatasync(). Use bdrv_aio_flush() instead and drop the VirtIOBlockDataPlane->fd field. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * dataplane: delete IOQueue since it is no longer usedStefan Hajnoczi2014-06-043-175/+1
| | | | | | | | | | | | | | This custom Linux AIO request queue is no longer used by virtio-blk data-plane. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * dataplane: use the QEMU block layer for I/OStefan Hajnoczi2014-06-041-128/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop using a custom Linux AIO request queue from ioq.h and instead use the QEMU block layer for I/O. This patch adjusts the VirtIOBlockRequest struct with fields needed for bdrv_aio_readv()/bdrv_aio_writev(). ioq.h used struct iovec and struct iocb, which we don't need directly anymore. Modify dataplane start/stop to set the AioContext on the BlockDriverState. We also no longer need to get the raw-posix file descriptor. This means image formats are now supported with dataplane! Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | intc: xilinx_uartlite: Convert SBD::init -> instance_initPeter Crosthwaite2014-06-091-10/+7
| | | | | | | | | | | | | | | | SysBusDevice::init is depracated. Convert to Object::init as prescribed by QOM conventions. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* | char: xilinx_uartlite: Convert to realize()Peter Crosthwaite2014-06-091-10/+14
| | | | | | | | | | | | | | | | SysBusDevice::init is depracated. Convert to Object::init and Device::realize as prescribed by QOM conventions. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* | char: xilinx_uartlite: Don't reset from initPeter Crosthwaite2014-06-091-1/+7
| | | | | | | | | | | | | | | | | | This refresh of the device state is intended to be a reset side effect. Move it to a proper reset handler rather than do it at init time. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* | net: xilinx_ethlite: Convert to realize()Peter Crosthwaite2014-06-091-11/+14
| | | | | | | | | | | | | | | | SysBusDevice::init is depracated. Convert to Object::init and Device::realize as prescribed by QOM conventions. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* | net: xilinx_ethlite: Don't reset from initPeter Crosthwaite2014-06-091-1/+8
| | | | | | | | | | | | | | | | This zeroing-out of the rxbuf variable (ping pong state) is a reset side effect. Extract into a proper reset. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* | timer: xilinx_timer: Convert to realize()Peter Crosthwaite2014-06-091-8/+12
| | | | | | | | | | | | | | | | SysBusDevice::init is depracated. Convert to Object::init and Device::realize as prescribed by QOM conventions. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* | Merge remote-tracking branch 'remotes/mcayland/qemu-sparc' into stagingPeter Maydell2014-06-054-53/+336
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remotes/mcayland/qemu-sparc: apb: implement IOMMU translation for PCI host bridge apb: handle reading/writing of IOMMU control registers apb: fix IOMMU register sizes apb: Move IOMMU registers into a separate IOMMUState struct tcx: move initialisation from realizefn to initfn tcx: move initialisation from SysBusDevice class to TCX class realizefn cg3: add extra check to prevent CG3 register array overflow cg3: move initialisation from realizefn to initfn Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | apb: implement IOMMU translation for PCI host bridgeMark Cave-Ayland2014-06-051-0/+165
| | | | | | | | | | | | Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
| * | apb: handle reading/writing of IOMMU control registersMark Cave-Ayland2014-06-051-3/+100
| | | | | | | | | | | | | | | | | | | | | | | | While the registers are documented as being 64-bit, Linux seems to access them in two halves as 2 x 32-bit accesses. Make sure that we can correctly handle this case. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
| * | apb: fix IOMMU register sizesMark Cave-Ayland2014-06-051-8/+3
| | | | | | | | | | | | | | | | | | | | | According to the referenced documentation, the IOMMU has 3 64-bit registers consisting of a control register, base register and flush register. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
| * | apb: Move IOMMU registers into a separate IOMMUState structMark Cave-Ayland2014-06-051-3/+14
| | | | | | | | | | | | Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
| * | tcx: move initialisation from realizefn to initfnMark Cave-Ayland2014-06-052-23/+33
| | | | | | | | | | | | | | | | | | | | | Initialisation cleanup as suggested by Andreas. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> CC: Andreas Färber <afaerber@suse.de>
| * | tcx: move initialisation from SysBusDevice class to TCX class realizefnMark Cave-Ayland2014-06-051-14/+12
| | | | | | | | | | | | | | | | | | | | | This is an intermediate step to bring TCX in line with CG3. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> CC: Andreas Färber <afaerber@suse.de>
| * | cg3: add extra check to prevent CG3 register array overflowMark Cave-Ayland2014-06-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The case statements in the CG3 read and write register routines have a maximum value of CG3_REG_SIZE, so if a value were written to this offset then it would overflow the register array. Currently this cannot be exploited since the MemoryRegion restricts accesses to the range 0 ... CG3_REG_SIZE - 1, but it seems worth clarifying this for future review and/or static analysis. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> CC: Paolo Bonzini <pbonzini@redhat.com>
| * | cg3: move initialisation from realizefn to initfnMark Cave-Ayland2014-06-051-8/+15
| | | | | | | | | | | | | | | | | | | | | Initialisation cleanup as suggested by Andreas. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> CC: Andreas Färber <afaerber@suse.de>
* | | Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell2014-06-057-64/+105
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pc,pci,virtio,qdev fixes, tests new tests for SMBIOS SMBIOS fixes pc, pci fixes qdev patches stayed on list for a month with no review, as I told people on KVM forum I'm merging stuch patches if they look fine. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> * remotes/mst/tags/for_upstream: qdev: Add test of qdev_prop_check_global qdev: Display warning about unused -global tests: add smbios testing tests: rename acpi-test to bios-tables-test virtio-balloon: return empty data when no stats are available pcie_host: Turn pcie_host_init() into an instance_init SMBIOS: Fix type 17 field sizes SMBIOS: Update Type 0 struct generator for machines >= 2.1 SMBIOS: Fix endian-ness when populating multi-byte fields serial-pci: Set prog interface field of pci config to 16550 compatible Conflicts: include/hw/i386/pc.h [PMM: fixed trivial conflict in pc.h] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
OpenPOWER on IntegriCloud