summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-09-04Remove #ifdef QXL_COMMAND_FLAG_COMPAT_16BPPsetcapsSøren Sandmann Pedersen1-2/+0
We require spice >= 0.8 now, so this flag is always present. Signed-off-by: Soren Sandmann <ssp@redhat.com>
2012-09-04qxl: Add set_client_capabilities() interface to QXLInterfaceSøren Sandmann Pedersen1-0/+23
This new interface lets spice server inform the guest whether (a) a client is connected (b) what capabilities the client has There is a fixed number (464) of bits reserved for capabilities, and when the capabilities bits change, the QXL_INTERRUPT_CLIENT interrupt is generated. Signed-off-by: Soren Sandmann <ssp@redhat.com>
2012-09-01target-xtensa: return ENOSYS for unimplemented simcallsMax Filippov1-0/+2
This prevents guest from proceeding with uninitialised garbage returned from unimplemented simcalls. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-31Update version to 1.2.0-rc3Anthony Liguori1-1/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-31console: Fix warning from clang (and potential crash)Stefan Weil1-1/+1
ccc-analyzer reports this warning: console.c:1090:29: warning: Dereference of null pointer if (active_console->cursor_timer) { ^ Function console_select allows active_console to be NULL, but would crash when accessing cursor_timer. Fix this. Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-31Merge remote-tracking branch 'kraxel/usb.61' into stagingAnthony Liguori9-60/+138
* kraxel/usb.61: uas: move transfer kickoff ehci: Fix interrupt endpoints no longer working ehci: handle TD deactivation of inflight packets ehci: add ehci_cancel_queue() ehci: simplify ehci_state_executing ehci: Remove unnecessary ehci_flush_qh call ehci: Schedule async-bh when IAAD bit gets set ehci: Fix NULL ptr deref when unplugging an USB dev with an iso stream active usb: unique packet ids usb: Halt ep queue en cancel pending packets on a packet error fix info qtree indention
2012-08-31Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori4-2/+52
* kwolf/for-anthony: qemu-iotests: add backing file smaller than image test case stream: complete early if end of backing file is reached qed: refuse unaligned zero writes with a backing file
2012-08-31uas: move transfer kickoffGerd Hoffmann1-2/+1
Kick next scsi transfer from request release callback instead of command completion callback, otherwise we might get stuck in case scsi_req_unref() doesn't release the request instantly due to someone else holding a reference too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-31ehci: Fix interrupt endpoints no longer workingHans de Goede1-2/+11
One of the recent changes (likely the addition of queuing support) has broken interrupt endpoints, this patch fixes this. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-08-31ehci: handle TD deactivation of inflight packetsGerd Hoffmann1-15/+23
Check the TDs of inflight packets, cancel packets in case the guest clears the active bit. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-31ehci: add ehci_cancel_queue()Gerd Hoffmann1-10/+20
Factor out function to cancel all packets of a queue. No behavior change. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-31ehci: simplify ehci_state_executingHans de Goede1-12/+1
ehci_state_executing does not need to check for p->usb_status == USB_RET_ASYNC or USB_RET_PROCERR, since ehci_execute_complete already does a similar check and will trigger an assert if either value is encountered. USB_RET_ASYNC should never be the packet status when execute_complete runs for obvious reasons, and USB_RET_PROCERR is only used by ehci_state_execute / ehci_execute not by ehci_state_executing / ehci_execute_complete. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-31ehci: Remove unnecessary ehci_flush_qh callHans de Goede1-1/+0
ehci_qh_do_overlay() already calls ehci_flush_qh() before it returns, calling it twice is useless. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-31ehci: Schedule async-bh when IAAD bit gets setHans de Goede1-0/+9
After the "ehci: Print a warning when a queue unexpectedly contains packets on cancel" commit. Under certain reproducable conditions I was getting the following message: "EHCI: Warning queue not empty on queue reset". After aprox. 8 hours of debugging I've finally found the cause. The Linux EHCI driver has an IAAD watchdog, to work around certain EHCI hardware sometimes not acknowledging the doorbell at all. This watchdog has a timeout of 10 ms, which is less then the time between 2 runs through the async schedule when async_stepdown is at its highest value. Thus the watchdog can trigger, after which Linux clears the IAAD bit and re-uses the QH. IOW we were not properly detecting the unlink of the qh, due to us missing (ignoring for more then 10 ms) the IAAD command, which triggered the warning. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-08-31ehci: Fix NULL ptr deref when unplugging an USB dev with an iso stream activeHans de Goede1-1/+1
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-08-31usb: unique packet idsGerd Hoffmann7-12/+16
This patch adds IDs to usb packets. Those IDs are (a) supposed to be unique for the lifecycle of a packet (from packet setup until the packet is either completed or canceled) and (b) stable across migration. uhci, ohci, ehci and xhci use the guest physical address of the transfer descriptor for this. musb needs a different approach because there is no transfer descriptor. But musb also doesn't support pipelining, so we have never more than one packet per endpoint in flight. So we go create an ID based on endpoint and device address. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-31usb: Halt ep queue en cancel pending packets on a packet errorHans de Goede4-7/+58
For controllers which queue up more then 1 packet at a time, we must halt the ep queue, and inside the controller code cancel all pending packets on an error. There are multiple reasons for this: 1) Guests expect the controllers to halt ep queues on error, so that they get the opportunity to cancel transfers which the scheduled after the failing one, before processing continues 2) Not cancelling queued up packets after a failed transfer also messes up the controller state machine, in the case of EHCI causing the following assert to trigger: "assert(p->qtdaddr == q->qtdaddr)" at hcd-ehci.c:2075 3) For bulk endpoints with pipelining enabled (redirection to a real USB device), we must cancel all the transfers after this a failed one so that: a) If they've completed already, they are not processed further causing more stalls to be reported, originating from the same failed transfer b) If still in flight, they are cancelled before the guest does a clear stall, otherwise the guest and device can loose sync! Note this patch only touches the ehci and uhci controller changes, since AFAIK no other controllers actually queue up multiple transfer. If I'm wrong on this other controllers need to be updated too! Also note that this patch was heavily tested with the ehci code, where I had a reproducer for a device causing a transfer to fail. The uhci code is not tested with actually failing transfers and could do with a thorough review! Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-31fix info qtree indentionGerd Hoffmann1-1/+1
Without the patch bus properties are are not in line with the other properties: [ ... ] dev: fw_cfg, id "" ctl_iobase = 0x510 data_iobase = 0x511 irq 0 mmio ffffffffffffffff/0000000000000002 mmio ffffffffffffffff/0000000000000001 [ ... ] With the patch applied everything is lined up properly: [ ... ] dev: fw_cfg, id "" ctl_iobase = 0x510 data_iobase = 0x511 irq 0 mmio ffffffffffffffff/0000000000000002 mmio ffffffffffffffff/0000000000000001 [ ... ] Needed to make the autotest qtree parser happy. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-08-30w32: Fix broken buildStefan Weil1-0/+2
Commit ef8621b1a3b199c348606c0a11a77d8e8bf135f1 added an include file which is not available for MinGW compilations. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-30Update version for 1.2.0-rc2Anthony Liguori1-1/+1
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29scsi-disk: Fix typo (uint32 -> uint32_t)Stefan Weil1-1/+1
Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29msix: make [un]use vectors on reset/load optionalMichael S. Tsirkin2-2/+13
The facility to use/unuse vectors dynamically is helpful for virtio but little else: everyone just seems to use vectors in their init function. Avoid clearing msix vector use info on reset and load. For virtio, clear it explicitly. This should fix regressions reported with ivshmem - though I didn't test this, I verified that virtio keeps working like it did. Tested-by: Cam Macdonell <cam@cs.ualberta.ca> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29kvm: get/set PV EOI MSRMichael S. Tsirkin3-0/+35
Support get/set of new PV EOI MSR, for migration. Add an optional section for MSR value - send it out in case MSR was changed from the default value (0). Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29linux-headers: update to 3.6-rc3Michael S. Tsirkin5-2/+13
Update linux-headers to version present in Linux 3.6-rc3. Header asm-x96_64/kvm_para.h update is needed for the new PV EOI feature. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29target-i386: disable pv eoi to fix migration across QEMU versionsAnthony Liguori1-1/+12
We have a problem with how we handle migration with KVM paravirt features. We unconditionally enable paravirt features regardless of whether we know how to migrate them. We also don't tie paravirt features to specific machine types so an old QEMU on a new kernel would expose features that never existed. The 1.2 cycle is over and as things stand, migration is broken. Michael has another series that adds support for migrating PV EOI and attempts to make it work correctly for different machine types. After speaking with Michael on IRC, we agreed to take this patch plus 1 & 4 from his series. This makes sure QEMU can migrate PV EOI if it's enabled, but does not enable it by default. This also means that we won't unconditionally enable new features for guests future proofing us from this happening again in the future. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29reset PMBA and PMREGMISC PIIX4 registers.Gleb Natapov1-2/+3
The bug causes Windows + OVMF hang after reboot since OVMF checks PMREGMISC to see if IO space is enabled and skip configuration if it is. Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29qemu-ga: Fix null pointer passed to unlink in failure branchStefan Weil1-1/+3
Clang reports this warning: Null pointer passed as an argument to a 'nonnull' parameter Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29memory: Fix copy&paste mistake in memory_region_iorange_writeJan Kiszka1-1/+1
The last argument of find_portio is "write", so this must be true here. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29ivshmem: remove redundant ioeventfd configurationCam Macdonell1-15/+0
setup_ioeventfds() is unnecessary and actually causes a segfault when used ioeventfd=on is used on the command-line. Since ioeventfds are handled within the memory API, it can be removed. Signed-off-by: Cam Macdonell <cam@cs.ualberta.ca> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29hw/arm_gic.c: Define .class_size in arm_gic_info TypeInfoPeter Maydell1-0/+1
Add the missing .class_size definition to the arm_gic_info TypeInfo. This fixes the memory corruption and possible segfault that otherwise results when the class struct is allocated at too small a size and the class init function writes off the end of it. Reported-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-29qemu-iotests: add backing file smaller than image test caseStefan Hajnoczi2-2/+35
This new test case checks that streaming completes successfully when the backing file is smaller than the image file. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-29stream: complete early if end of backing file is reachedStefan Hajnoczi1-0/+6
It is possible to create an image that is larger than its backing file. Reading beyond the end of the backing file produces zeroes if no writes have been made to those sectors in the image file. This patch finishes streaming early when the end of the backing file is reached. Without this patch the block job hangs and continually tries to stream the first sectors beyond the end of the backing file. To reproduce the hung block job bug: $ qemu-img create -f qcow2 backing.qcow2 128M $ qemu-img create -f qcow2 -o backing_file=backing.qcow2 image.qcow2 6G $ qemu -drive if=virtio,cache=none,file=image.qcow2 (qemu) block_stream virtio0 (qemu) info block-jobs The qemu-iotests 030 streaming test still passes. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-29qed: refuse unaligned zero writes with a backing fileStefan Hajnoczi1-0/+11
Zero writes have cluster granularity in QED. Therefore they can only be used to zero entire clusters. If the zero write request leaves sectors untouched, zeroing the entire cluster would obscure the backing file. Instead return -ENOTSUP, which is handled by block.c:bdrv_co_do_write_zeroes() and falls back to a regular write. The qemu-iotests 034 test cases covers this scenario. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-08-29Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori5-9/+27
* bonzini/scsi-next: iscsi: Set number of blocks to 0 for blank CDROM devices scsi: more fixes to properties for passthrough devices esp: support 24-bit DMA megasas: Add 'hba_serial' property
2012-08-29Merge remote-tracking branch 'riku/linux-user-for-upstream' into stagingAnthony Liguori3-14/+16
* riku/linux-user-for-upstream: linux-user: Clarify "Unable to reserve guest address space" error linux-user: fix emulation of getdents linux-user: arg_table need not have global scope
2012-08-28tcg/mips: fix broken CONFIG_TCG_PASS_AREG0 codeAurelien Jarno1-59/+99
The CONFIG_TCG_PASS_AREG0 code for calling ld/st helpers was broken in that it did not respect the ABI requirement that 64 bit values were passed in even-odd register pairs. The simplest way to fix this is to implement some new utility functions for marshalling function arguments into the correct registers and stack, so that the code which sets up the address and data arguments does not need to care whether there has been a preceding env argument. Based on commit 9716ef3b for ARM by Peter Maydell. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2012-08-28Update OpenBIOS PPC imageAurelien Jarno3-1/+1
Update OpenBIOS PPC image to SVN r1063 to fix issues introduced by commit 9e56edcf. The code change in this revision only affects PPC, so OpenBIOS SPARC images are not updated. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-08-28target-ppc: fix altivec instructionsAurelien Jarno1-1/+1
Altivec instructions are not working anymore in PowerPC emulation, following commit d15f74fb, which inverted two registers in the call to helper. Fix that. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Acked-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-08-28audio/winwave: previous audio buffer should be flushedmunkyu.im1-9/+3
Winwave audio backend has problem with pausing and restart audio out. Unlike other backends, Winwave pausing API does not flush audio buffer. As a result, the previous audio data are played in front of user expected sound when user restart audio. So changes it to waveOutReset() Signed-off-by: Munkyu Im <munkyu.im@samsung.com> Signed-off-by: malc <av1474@comtv.ru>
2012-08-28iscsi: Set number of blocks to 0 for blank CDROM devicesRonnie Sahlberg1-1/+6
The number of blocks of the device is used to compute the device size in bdrv_getlength()/iscsi_getlength(). For MMC devices, the ReturnedLogicalBlockAddress in the READCAPACITY10 has a special meaning when it is 0. In this case it does not mean that LBA 0 is the last accessible LBA, and thus the device has 1 readable block, but instead it means that the disc is blank and there are no readable blocks. This change ensures that when the iSCSI LUN is loaded with a blank DVD-R disk or similar that bdrv_getlength() will return the correct size of the device as 0 bytes. Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2012-08-28scsi: more fixes to properties for passthrough devicesPaolo Bonzini2-1/+3
Commit 0384783 (scsi-block: remove properties that are not relevant for passthrough, 2012-07-09) removed one property that should have been left there, "bootindex". It also did not touch scsi-generic, while it should have. Fix both problems. Reported-by: Alexandre DERUMIER <aderumier@odiso.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-28esp: support 24-bit DMAPaolo Bonzini1-5/+11
SeaBIOS will issue requests for more than 64k when loading a CD-ROM image into memory. Support the TCHI register from the AMD PCscsi spec. Acked-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-28megasas: Add 'hba_serial' propertyHannes Reinecke1-2/+7
Add a 'hba_serial' property to the megasas driver. Originally it would be using a pointer value which would break migration. Reported-by: Stefan Weil <sw@weilnetz.de> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-27target-mips: allow microMIPS SWP and SDP to have RD equal to BASEEric Johnson1-1/+9
The microMIPS SWP and SDP instructions do not modify GPRs. So their behavior is well defined when RD equals BASE. The MIPS Architecture Verification Programs (AVPs) check that they work as expected. This is required for AVPs to pass. Signed-off-by: Eric Johnson <ericj@mips.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-08-27target-mips: add privilege level check to several Cop0 instructionsEric Johnson1-0/+9
The MIPS Architecture Verification Programs (AVPs) check privileged instructions for the required privilege level. These changes are needed to pass the AVP suite. Signed-off-by: Eric Johnson <ericj@mips.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-08-27Revert "fix some debug printf format strings"malc4-10/+7
This reverts commit 145c7c880ff520a9348cc2401ba291330b9606fe. Signed-off-by: malc <av1474@comtv.ru>
2012-08-27Revert "vl: fix -hdachs/-hda argument order parsing issues"malc1-18/+21
This reverts commit 7764ae9671f1cd74227cf4404431dd5213799ef0. Signed-off-by: malc <av1474@comtv.ru>
2012-08-27Revert "qemu-options.hx: mention retrace= VGA option"malc1-7/+1
This reverts commit 39dda260628e5f2a3fd2ce2ec8a71f3d5ca309a9. Signed-off-by: malc <av1474@comtv.ru>
2012-08-27Revert "vga: add some optional CGA compatibility hacks"malc4-74/+8
This reverts commit 482f7bf86b43af9f6903c52726fedf82b28bf953. Signed-off-by: malc <av1474@comtv.ru>
2012-08-27Revert "i8259: add -no-spurious-interrupt-hack option"malc5-44/+5
This reverts commit f278d4947fff814dcde2ef2acad36d172ff8be35. Signed-off-by: malc <av1474@comtv.ru>