summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* TCG: Use gen_opc_ptr from context instead of global variable.Evgeny Voevodin2012-11-1717-106/+109
| | | | | | Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* tcg/tcg.h: Duplicate global TCG variables in TCGContextEvgeny Voevodin2012-11-171-0/+6
| | | | | | Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-cris/translate.c: Code style clean-upEvgeny Voevodin2012-11-171-2500/+2540
| | | | | | Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* rng-egd: don't use gslist_free_fullAnthony Liguori2012-11-161-5/+14
| | | | | | This function was only introduced in glib 2.28.0. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-rng-pci: create a default backend if none existsAnthony Liguori2012-11-162-0/+15
| | | | | | | | | | This allows you to specify: $ qemu -device virtio-rng-pci And things will Just Work with a reasonable default. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-rng: add rate limiting supportAnthony Liguori2012-11-163-8/+64
| | | | | | | | | | | This adds parameters to virtio-rng-pci to allow rate limiting the entropy a guest receives. An example command line: $ qemu -device virtio-rng-pci,max-bytes=1024,period=1000 Would limit entropy collection to 1Kb/s. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* virtio-rng: hardware random number generator deviceAmit Shah2012-11-169-0/+341
| | | | | | | | | | | | | | | | The Linux kernel already has a virtio-rng driver, this is the device implementation. When the guest asks for entropy from the virtio hwrng, it puts a buffer in the vq. We then put entropy into that buffer, and push it back to the guest. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- aliguori: converted to new RngBackend interface aliguori: remove entropy needed event aliguori: fix migration
* rng-egd: introduce EGD compliant RNG backendAnthony Liguori2012-11-162-1/+216
| | | | | | | | | | | This backend talks EGD to a CharDriverState. A typical way to invoke this would be: qemu -chardev socket,host=localhost,port=1024,id=chr0 \ -object rng-egd,chardev=chr0,id=egd0 \ -device virtio-rng-pci,rng=egd0 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* rng-random: add an RNG backend that uses /dev/random (v3)Anthony Liguori2012-11-163-1/+184
| | | | | | | | | | | | | | | | | | | The filename can be overridden but it expects a non-blocking source of entropy. A typical invocation would be: qemu -object rng-random,id=rng0 -device virtio-rng-pci,rng=rng0 This can also be used with /dev/urandom by using the command line: qemu -object rng-random,filename=/dev/urandom,id=rng0 \ -device virtio-rng-pci,rng=rng0 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- v1 -> v2 - merged header split patch into this one v2 -> v3 - bug fix in rng-random (Paolo)
* rng: add RndBackend abstract object classAnthony Liguori2012-11-164-0/+189
| | | | | | This is the backend used by devices that need to request entropy. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* object: add object_property_add_bool (v2)Anthony Liguori2012-11-162-0/+72
| | | | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> --- v1 -> v2 - Fix whitespace (Andreas Faerber)
* vl: add -object option to create QOM objects from the command lineAnthony Liguori2012-11-163-0/+74
| | | | | | | | | | | This will create a new QOM object in the '/objects' path. Note that properties are set in order which allows for simple objects to be initialized entirely with this option and then realized. This option is roughly equivalent to -device but for things that are not devices. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* target-mips: fix wrong microMIPS opcode encoding陳韋任 (Wei-Ren Chen)2012-11-151-1/+1
| | | | | | | | | | | | While reading microMIPS decoding, I found a possible wrong opcode encoding. According to [1] page 166, the bits 13..12 for MULTU is 0x01 rather than 0x00. Please review, thanks. [1] MIPS Architecture for Programmers VolumeIV-e: The MIPS DSP Application-Specific Extension to the microMIPS32 Architecture Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* mips/malta: fix CBUS UART interrupt pinAurelien Jarno2012-11-151-1/+2
| | | | | | | | | | | | | | | According to the MIPS Malta Developement Platform User's Manual, the i8259 interrupt controller is supposed to be connected to the hardware IRQ0, and the CBUS UART to the hardware interrupt 2. In QEMU they are both connected to hardware interrupt 0, the CBUS UART interrupt being wrong. This patch fixes that. It should be noted that the irq array in QEMU includes the software interrupts, hence env->irq[2] is the first hardware interrupt. Cc: Ralf Baechle <ralf@linux-mips.org> Reviewed-by: Eric Johnson <ericj@mips.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Merge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-1.3.0-rc0' ↵Anthony Liguori2012-11-149-49/+241
|\ | | | | | | | | | | | | | | | | | | | | | | | | into staging vfio-pci: KVM INTx accel & common msi_get_message * awilliam/tags/vfio-pci-for-qemu-1.3.0-rc0: vfio-pci: Use common msi_get_message vfio-pci: Add KVM INTx acceleration linux-headers: Update to 3.7-rc5 Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * vfio-pci: Use common msi_get_messageAlex Williamson2012-11-131-23/+1
| | | | | | | | | | | | We can get rid of our local version now that a helper exists. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
| * vfio-pci: Add KVM INTx accelerationAlex Williamson2012-11-131-0/+186
| | | | | | | | | | | | | | | | | | | | | | | | This makes use of the new level irqfd support enabling bypass of qemu userspace both on INTx injection and unmask. This significantly boosts the performance of devices making use of legacy interrupts (ex. ~60% better netperf TCP_RR scores for an e1000e assigned to a Linux guest and booted with pci=nomsi). This also avoids flipping mmaps on and off to simulate EOIs, so greatly improves performance of device access in addition to interrupt latency. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
| * linux-headers: Update to 3.7-rc5Alex Williamson2012-11-138-26/+54
| | | | | | | | | | | | update-linux-headers.sh script run against Linux tag v3.7-rc5 Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
* | Merge remote-tracking branch 'kraxel/pixman.v5' into stagingAnthony Liguori2012-11-144-9/+28
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kraxel/pixman.v5: pixman: cleanup properly on make distclean pixman: add licensing info pixman: build internal version early pixman: pass cflags, add -fPIC pixman: disable gtk pixman: set --host for cross builds pixman: add output dir to include path Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * | pixman: cleanup properly on make distcleanGerd Hoffmann2012-11-141-0/+1
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | pixman: add licensing infoGerd Hoffmann2012-11-142-0/+10
| | | | | | | | | | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | pixman: build internal version earlyGerd Hoffmann2012-11-141-3/+4
| | | | | | | | | | | | | | | Signed-off-by: Eric Johnson <ericj@mips.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | pixman: pass cflags, add -fPICGerd Hoffmann2012-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | Pass on CFLAGS to the pixman configure script. Add -fPIC to the cflags, needed to make the final link succeed. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | pixman: disable gtkGerd Hoffmann2012-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | gtk is only needed to build test cases. Disable it to simplify the build. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | pixman: set --host for cross buildsGerd Hoffmann2012-11-142-1/+6
| | | | | | | | | | | | | | | | | | | | | Set --host when calling pixman configure while doing cross builds so pixman's autoconf picks up the cross build tools correctly. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | pixman: add output dir to include pathGerd Hoffmann2012-11-141-5/+7
| |/ | | | | | | | | | | | | Needed to make sure the (generated) pixman-version.h file is found. Based on a patch from Blue Swirl. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | Merge remote-tracking branch 'bonzini/nbd-next' into stagingAnthony Liguori2012-11-148-36/+275
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bonzini/nbd-next: nbd: fixes to read-only handling hmp: add NBD server commands nbd: disallow nbd-server-add before nbd-server-start nbd: force read-only export for read-only devices nbd: fix nbd_server_stop crash when no server was running nbd: accept URIs nbd: accept relative path to Unix socket qemu-nbd: initialize main loop before block layer Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * | nbd: fixes to read-only handlingPaolo Bonzini2012-11-131-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | We do not need BLKROSET if the kernel supports setting flags. Also, always do BLKROSET even for a read-write export, otherwise the read-only state remains "sticky" after the invocation of "qemu-nbd -r". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | hmp: add NBD server commandsPaolo Bonzini2012-11-123-0/+124
| | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | nbd: disallow nbd-server-add before nbd-server-startPaolo Bonzini2012-11-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It works nicely with the QMP commands, but it adds useless complication with HMP. In particular, see the following: (qemu) nbd_server_add -w scsi0-hd0 (qemu) nbd_server_start -a localhost:10809 NBD server already exporting device scsi0-hd0 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | nbd: force read-only export for read-only devicesPaolo Bonzini2012-11-121-0/+7
| | | | | | | | | | | | | | | | | | This is the desired behavior for HMP, but it is a better choice for QMP as well. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | nbd: fix nbd_server_stop crash when no server was runningPaolo Bonzini2012-11-121-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | This failed on the new assertion of qemu_set_fd_handler2: qemu-system-x86_64: /home/pbonzini/work/upstream/qemu/iohandler.c:60: qemu_set_fd_handler2: Assertion `fd >= 0' failed. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | nbd: accept URIsPaolo Bonzini2012-11-122-9/+114
| | | | | | | | | | | | | | | | | | | | | | | | The URI syntax is consistent with the Gluster syntax. Export names are specified in the path, preceded by one or more (otherwise unused) slashes. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | nbd: accept relative path to Unix socketPaolo Bonzini2012-11-121-10/+7
| | | | | | | | | | | | | | | | | | Adding the "is_unix" member now will simplify the parsing of NBD URIs. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | qemu-nbd: initialize main loop before block layerPaolo Bonzini2012-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | | qemu-nbd was broken because they initialized the block layer while qemu_aio_context was still NULL. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | | Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori2012-11-147-24/+46
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bonzini/scsi-next: virtio-scsi: use dma_context_memory dma: Define dma_context_memory and use in sysbus-ohci megasas: Correct target/lun mapping scsi-disk: flush cache after disabling it megasas: do not include block_int.h scsi: remove superfluous call to scsi_device_set_ua virtio-scsi: factor checks for VIRTIO_SCSI_S_DRIVER_OK when reporting events scsi: do not return short responses for emulated commands Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * | | virtio-scsi: use dma_context_memoryPaolo Bonzini2012-11-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until address_space_rw was introduced, NULL was accepted as a placeholder for DMA with no IOMMU (to address_space_memory). This does not work anymore, and dma_context_memory needs to be specified explicitly. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | | dma: Define dma_context_memory and use in sysbus-ohciPeter Maydell2012-11-123-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define a new global dma_context_memory which is a DMAContext corresponding to the global address_space_memory AddressSpace. This can be used by sysbus peripherals like sysbus-ohci which need to do DMA. In particular, use it in the sysbus-ohci device, which fixes a segfault when attempting to use that device. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
| * | | megasas: Correct target/lun mappingHannes Reinecke2012-11-122-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The structure to reference a logical drive has an unused field, which can be used to carry the lun ID. This enabled seabios to establish the proper target/LUN mapping. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | | scsi-disk: flush cache after disabling itPaolo Bonzini2012-11-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SBC says that "if an application client changes the WCE bit from one to zero via a MODE SELECT command, then the device server shall write any data in volatile cache to non-volatile medium before completing the command". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | | megasas: do not include block_int.hPaolo Bonzini2012-11-121-1/+0
| | | | | | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | | scsi: remove superfluous call to scsi_device_set_uaPaolo Bonzini2012-11-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Suggested by Laszlo Ersek. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | | virtio-scsi: factor checks for VIRTIO_SCSI_S_DRIVER_OK when reporting eventsPaolo Bonzini2012-11-121-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | Suggested by Laszlo Ersek. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | | scsi: do not return short responses for emulated commandsPaolo Bonzini2012-11-121-16/+18
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The inquiry command, for the case of VPD=1, was returning short responses; the number of returned bytes was just the number of bytes in the request, without padding to the specified allocation length with zero bytes. This is usually harmless, but it is a violation of the SCSI specification. To fix this, always pad with zero bytes to r->cmd.xfer in scsi_disk_emulate_command, and return at most r->buflen bytes (the size of the buffer for command data) rather than at most buflen bytes (the number of bytes that was filled in). Before this patch, "strace sg_inq -p0x83 /dev/sda" would report a non-zero resid value. After this patch, it reports resid=0. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | | Merge remote-tracking branch 'kraxel/usb.70' into stagingAnthony Liguori2012-11-1426-797/+775
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kraxel/usb.70: ehci: fix migration xhci: Fix some DMA host endian bugs usb/combined-packet: Move freeing of combined to usb_combined_packet_remove() xhci: Add support for packets with both data and an error status ehci: Add support for packets with both data and an error status ehci: Get rid of the magical PROC_ERR status usb-redir: Allow packets to have both data and an error-status usb: split packet result into actual_length + status Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * | | ehci: fix migrationGerd Hoffmann2012-11-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 5010d4dc618b6b8e7c21129c487c06f6493f71fc reorganized vmstate to split core + pci, but got two little details wrong. Fix them. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | xhci: Fix some DMA host endian bugsDavid Gibson2012-11-091-27/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The xhci device does correct endian switches on the results of some DMAs but not all. In particular, there are many DMAs of what are essentially arrays of 32-bit integers which never get byteswapped. This causes them to be interpreted incorrectly on big-endian hosts, since (as per the xhci spec) these arrays are always little-endian in guest memory. This patch adds some helper functions to fix these bugs. This may not be all the endian bugs in the xhci code, but it's certainly some of them and the Linux guest xhci driver certainly gets further with these fixes. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | usb/combined-packet: Move freeing of combined to usb_combined_packet_remove()Hans de Goede2012-11-081-18/+15
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | xhci: Add support for packets with both data and an error statusHans de Goede2012-11-081-2/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | ehci: Add support for packets with both data and an error statusHans de Goede2012-11-082-85/+77
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
OpenPOWER on IntegriCloud