summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
...
| * Revert "PPC: e500: Use new MPIC dt format"Alexander Graf2012-08-151-17/+14
| | | | | | | | | | | | | | | | | | | | This reverts commit 518c7fb44f2182cde943dc64f88cb2fd4e4ff6b5. It breaks new Linux guests with SMP, because IPIs get mapped to large vectors which our MPIC emulation does not implement. Conflicts: hw/ppc/e500.c
| * PPC: e500: add generic e500 platformScott Wood2012-08-152-1/+61
| | | | | | | | | | | | | | | | | | | | | | | | This gives the kernel a paravirtualized machine to target, without requiring both sides to pretend to be targeting a specific board that likely has little to do with the host in KVM scenarios. This avoids the need to add new boards to QEMU, just to be able to run KVM on new CPUs. Signed-off-by: Scott Wood <scottwood@freescale.com> [agraf: conditionalize on CONFIG_FDT] Signed-off-by: Alexander Graf <agraf@suse.de>
| * PPC: e500: split mpc8544ds machine from generic e500 codeScott Wood2012-08-154-51/+114
| | | | | | | | | | | | | | | | | | | | Currently the only mpc8544ds-ism that is factored out is toplevel compatible and model. In the future the generic e500 code is expected to become more generic. Signed-off-by: Scott Wood <scottwood@freescale.com> [agraf: conditionalize on CONFIG_FDT] Signed-off-by: Alexander Graf <agraf@suse.de>
| * PPC: e500: change internal references away from mpc8544dsScott Wood2012-08-151-13/+14
| | | | | | | | | | | | | | | | | | | | | | No functional changes -- machine is still outwardly mpc8544ds. The references that are not changed contain mpc8544 hardware details that need to be parameterized if/when a different e500 platform wants to change them. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * PPC: e500: rename mpc8544ds into generic fileScott Wood2012-08-152-9/+11
| | | | | | | | | | | | | | | | | | | | | | Rename the file (with no changes other than fixing up the header paths) in preparation for refactoring into a generic e500 platform. Also move it into the newly created ppc/ directory. Signed-off-by: Scott Wood <scottwood@freescale.com> Reviewed-by: Andreas Färber <afaerber@suse.de> [agraf: conditionalize on CONFIG_FDT] Signed-off-by: Alexander Graf <agraf@suse.de>
| * pseries pci: spapr_populate_pci_devices renamed to spapr_populate_pci_dtAlexey Kardashevskiy2012-08-153-7/+7
| | | | | | | | | | | | | | | | | | | | | | spapr_populate_pci_devices() populates the device tree only with bus properties and has nothing to do with the devices on it as PCI BAR allocation is done by the system firmware (SLOF). New name - spapr_populate_pci_dt() - describes the functionality better. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
| * pseries pci: removed redundant busdevAlexey Kardashevskiy2012-08-152-3/+2
| | | | | | | | | | | | | | | | The PCIHostState struct already contains SysBusDevice so the one in sPAPRPHBState has to go. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
* | Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2012-08-155-5/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stefanha/trivial-patches: ivshmem, qdev-monitor: fix order of qerror parameters iov_send_recv(): Handle zero bytes case even if OS does not framebuffer: Fix spelling in comment (leight -> height) Spelling fix in comment (peripherans -> peripherals) docs: Fix spelling (propery -> property) trace: Fix "Qemu" -> "QEMU" cputlb.c: Fix out of date comment ehci: fix assertion typo Makefile: Avoid explicit list of directories in clean target
| * | ivshmem, qdev-monitor: fix order of qerror parametersAlberto Garcia2012-08-152-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the QERR_ macros no longer contain a json dictionary, the order of some parameters needs to be fixed for them to appear correctly. Signed-off-by: Alberto Garcia <agarcia@igalia.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | framebuffer: Fix spelling in comment (leight -> height)Stefan Weil2012-08-151-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | Spelling fix in comment (peripherans -> peripherals)Stefan Weil2012-08-151-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | ehci: fix assertion typoAlejandro Martinez Ruiz2012-08-151-1/+1
| |/ | | | | | | | | | | Signed-off-by: Alejandro Martinez Ruiz <alex@securiforest.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | kvmvapic: Disable if there is insufficient memoryJan Kiszka2012-08-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | We need at least 1M of RAM to map the option ROM. Otherwise, we will corrupt host memory or even crash: $ qemu-system-x86_64 -nodefaults --enable-kvm -vnc :0 -m 640k Segmentation fault (core dumped) Reported-and-tested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* | kvm: i8254: Finish time conversion fixJan Kiszka2012-08-141-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 0cdd3d1444 fixed reading back the counter load time from the kernel while assuming the kernel would always update its load time on writing the state. That is only true for channel 1, and so pit_get_channel_info returned wrong output pin states for high counter values. Fix this by applying the offset also on kvm_pit_put. Now we also need to update the offset when we write the state while the VM is stopped as it keeps on changing in that state. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* | kvm: i8254: Cache kernel clock offset in KVMPITStateJan Kiszka2012-08-141-14/+24
|/ | | | | | | | | | | To prepare the final fix for clock calibration issues with the in-kernel PIT, we want to cache the offset between vmclock and the clock used by the in-kernel PIT. So far, we only need to update it when the VM state changes between running and stopped because we only read the in-kernel PIT state while the VM is running. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori2012-08-131-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qmp/queue/qmp: (48 commits) target-ppc: add implementation of query-cpu-definitions (v2) target-i386: add implementation of query-cpu-definitions (v2) qapi: add query-cpu-definitions command (v2) compiler: add macro for GCC weak symbols qapi: add query-machines command qapi: mark QOM commands stable qmp: introduce device-list-properties command qmp: add SUSPEND_DISK event qmp: qmp-events.txt: add missing doc for the SUSPEND event qmp: qmp-events.txt: put events in alphabetical order qmp: emit the WAKEUP event when the guest is put to run qmp: don't emit the RESET event on wakeup from S3 scripts: qapi-commands.py: qmp-commands.h: include qdict.h docs: writing-qmp-commands.txt: update error section error, qerror: drop QDict member qerror: drop qerror_table and qerror_format() error, qerror: pass desc string to error calls error: drop error_get_qobject()/error_set_qobject() qemu-ga: switch to the new error format on the wire qmp: switch to the new error format on the wire ...
| * qmp: add SUSPEND_DISK eventLuiz Capitulino2012-08-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Emitted when the guest makes a request to enter S4 state. There are three possible ways of having this event, as described here: http://lists.gnu.org/archive/html/qemu-devel/2012-07/msg02307.html I've decided to add a new event and make it indepedent of SHUTDOWN. This means that the SHUTDOWN event will eventually follow the SUSPEND_DISK event. I've choosen this way because of two reasons: 1. Having an indepedent event makes it possible to query for its existence by using query-events 2. In the future, we may allow the user to change what QEMU should do as a result of the guest entering S4. So it's a good idea to keep both events separated Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | Merge remote-tracking branch 'pmaydell/arm-devs.next' into stagingAnthony Liguori2012-08-137-57/+86
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pmaydell/arm-devs.next: arm: Move some ARM devices into libhw ssd0323: abort() instead of exit(1) on error. hw/sd.c: make sd_wp_addr() return bool hw/sd.c: make sd_dataready() return bool hw/sd.c: convert binary variables to bool hw/sd.c: introduce wrapper for conversion address to wp group hw/sd.c: make sd_wp_addr() accept 64 bit address argument hw/sd.c: convert wp_groups in SDState to bitfield armv7m: Guard against no -kernel argument hw/armv7m_nvic: Fix incorrect default for num-irqs property
| * | arm: Move some ARM devices into libhwAndreas Färber2012-08-132-12/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoids some unnecessary dependencies on cpu.h and prepares for a future armeb-softmmu where most machines would not be built. Defer touching the SoC devices since most have implicit or explicit dependencies on the CPU. Signed-off-by: Andreas Färber <andreas.faerber@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | ssd0323: abort() instead of exit(1) on error.Peter A. G. Crosthwaite2012-08-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | To be more consistent with the newer ways of error signalling. That and SIGABT is easier to debug with than exit(1). Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | hw/sd.c: make sd_wp_addr() return boolMitsyanko Igor2012-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | For the sake of code clarity Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | hw/sd.c: make sd_dataready() return boolMitsyanko Igor2012-08-132-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | For the sake of code clarity Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | hw/sd.c: convert binary variables to boolMitsyanko Igor2012-08-132-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several members of SDState have type int when they actually are binary variables. Change type of these variables to bool to improve code readability. Change SD API to be in consistency with new variables type. Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | hw/sd.c: introduce wrapper for conversion address to wp groupMitsyanko Igor2012-08-131-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | Add wrapper function sd_addr_to_wpnum() to replace long address-->wg_group conversion line. Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | hw/sd.c: make sd_wp_addr() accept 64 bit address argumentMitsyanko Igor2012-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Currently sd_wp_addr() accepts 32 bit address arguments therefore implicitly restricting SD card address range. Change address argument type to uint64_t. Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | hw/sd.c: convert wp_groups in SDState to bitfieldMitsyanko Igor2012-08-131-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | Representing each group write protection flag with only one bit instead of int variable significantly reduces memory consumption. Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | armv7m: Guard against no -kernel argumentPeter A. G. Crosthwaite2012-08-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | A -kernel argument must be specified for this machine. Guard against no -kernel argument. Previously gave an unhelpful "bad address" error message. Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Tested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | hw/armv7m_nvic: Fix incorrect default for num-irqs propertyPeter Maydell2012-08-131-7/+14
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix an incorrect default value for the num-irqs property (we were attempting to override it from the default set by the parent class but not succeeding, which meant that the lm3s6965evb model would assert on startup attempting to wire up nonexistent irq lines). Instead of trying to override the parent's Property array, we define an instance_init function which runs after default setup but before user property setting and can just fix up the default value in the gic_state struct. Reported-by: Peter Crosthwaite <peter.crosthwaite@petalogix.com> Tested-by: Peter Crosthwaite <peter.crosthwaite@petalogix.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | Merge remote-tracking branch 'qemu-kvm/uq/master' into stagingAnthony Liguori2012-08-134-4/+5
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | * qemu-kvm/uq/master: kvm: Add documentation comment for kvm_irqchip_in_kernel() kvm: Decouple 'GSI routing' from 'kernel irqchip' kvm: Decouple 'MSI routing via irqfds' from 'kernel irqchip' kvm: Decouple 'irqfds usable' from 'kernel irqchip' kvm: Move kvm_allows_irq0_override() to target-i386, fix return type kvm: Rename kvm_irqchip_set_irq() to kvm_set_irq() kvm: Decouple 'async interrupt delivery' from 'kernel irqchip' configure: Don't implicitly hardcode list of KVM architectures kvm: Check if smp_cpus exceeds max cpus supported by kvm
| * kvm: Decouple 'MSI routing via irqfds' from 'kernel irqchip'Peter Maydell2012-08-091-2/+2
| | | | | | | | | | | | | | Decouple another x86-specific assumption about what irqchips imply. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
| * kvm: Move kvm_allows_irq0_override() to target-i386, fix return typePeter Maydell2012-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | kvm_allows_irq0_override() is a totally x86 specific concept: move it to the target-specific source file where it belongs. This means we need a new header file for the prototype: kvm_i386.h, in line with the existing kvm_ppc.h. While we are moving it, fix the return type to be 'bool' rather than 'int'. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
| * kvm: Rename kvm_irqchip_set_irq() to kvm_set_irq()Peter Maydell2012-08-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | Rename the function kvm_irqchip_set_irq() to kvm_set_irq(), since it can be used for sending (asynchronous) interrupts whether there is a full irqchip model in the kernel or not. (We don't include 'async' in the function name since asynchronous is the normal case.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi@redhat.com>
* | xilinx_axi*: Re-implemented interconnectPeter A. G. Crosthwaite2012-08-138-107/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Re-implemented the interconnect between the Xilinx AXI ethernet and DMA controllers. A QOM interface "stream" is created, for the two stream interfaces. As per Edgars request, this is designed to be more generic than AXI-stream, so in the future we may see more clients of this interface beyond AXI stream. This is based primarily on Paolos original refactoring of the interconnect. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter A.G. Crosthwaite <peter.crosthwaite@petalogix.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* | Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2012-08-114-10/+70
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kwolf/for-anthony: qemu-iotests: skip 039 with ./check -nocache block: add BLOCK_O_CHECK for qemu-img check qcow2: mark image clean after repair succeeds qed: mark image clean after repair succeeds blockdev: flip default cache mode from writethrough to writeback virtio-blk: disable write cache if not negotiated virtio-blk: support VIRTIO_BLK_F_CONFIG_WCE qemu-iotests: Save some sed processes ahci: Fix sglist memleak in ahci_dma_rw_buf() ahci: Fix ahci cdrom read corruptions for reads > 128k virtio-blk: fix use-after-free while handling scsi commands
| * | virtio-blk: disable write cache if not negotiatedPaolo Bonzini2012-08-101-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the guest does not support flushes, we should run in writethrough mode. The setting is temporary until the next reset, so that for example the BIOS will run in writethrough mode while Linux will run with a writeback cache. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | virtio-blk: support VIRTIO_BLK_F_CONFIG_WCEPaolo Bonzini2012-08-102-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | Also rename VIRTIO_BLK_F_WCACHE to VIRTIO_BLK_F_WCE for consistency with the spec. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | ahci: Fix sglist memleak in ahci_dma_rw_buf()Jason Baron2012-08-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed that in hw/ide/ahci:ahci_dma_rw_buf() we do not free the sglist. Thus, I've added a call to qemu_sglist_destroy() to fix this memory leak. In addition, I've adeed a call in qemu_sglist_destroy() to 0 all of the sglist fields, in case there is some other codepath that tries to free the sglist. Signed-off-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | ahci: Fix ahci cdrom read corruptions for reads > 128kJason Baron2012-08-102-7/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While testing q35, which has its cdrom attached to the ahci controller, I found that the Fedora 17 install would panic on boot. The panic occurs while squashfs is trying to read from the cdrom. The errors are: [ 8.622711] SQUASHFS error: xz_dec_run error, data probably corrupt [ 8.625180] SQUASHFS error: squashfs_read_data failed to read block 0x20be48a I was also able to produce corrupt data reads using an installed piix based qemu machine, using 'dd'. I found that the corruptions were only occuring when then read size was greater than 128k. For example, the following command results in corrupted reads: dd if=/dev/sr0 of=/tmp/blah bs=256k iflag=direct The > 128k size reads exercise a different code path than 128k and below. In ide_atapi_cmd_read_dma_cb() s->io_buffer_size is capped at 128k. Thus, ide_atapi_cmd_read_dma_cb() is called a second time when the read is > 128k. However, ahci_dma_rw_buf() restart the read from offset 0, instead of at 128k. Thus, resulting in a corrupted read. To fix this, I've introduced 'io_buffer_offset' field in IDEState to keep track of the offset. I've also modified ahci_populate_sglist() to take a new 3rd offset argument, so that the sglist is property initialized. I've tested this patch using 'dd' testing, and Fedora 17 now correctly boots and installs on q35 with the cdrom ahci controller. Signed-off-by: Jason Baron <jbaron@redhat.com> Tested-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * | virtio-blk: fix use-after-free while handling scsi commandsAvi Kivity2012-08-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The scsi passthrough handler falls through after completing a request into the failure path, resulting in a use after free. Reproducible by running a guest with aio=native on a block device. Reported-by: Stefan Priebe <s.priebe@profihost.ag> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | | Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori2012-08-112-12/+110
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bonzini/scsi-next: scsi-disk: add support for the UNMAP command scsi-disk: improve out-of-range LBA detection for WRITE SAME scsi-disk: more assertions and resets for aiocb virtio-scsi: do not compare 32-bit QEMU tags against 64-bit virtio-scsi tags iscsi: Pick default initiator-name based on the name of the VM iscsi: reorganize code for parse_initiator_name iscsi: do not leak initiator_name
| * | | scsi-disk: add support for the UNMAP commandPaolo Bonzini2012-08-091-1/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unmap command can reuse the same infrastructure as MODE SELECT for reading the descriptor list into memory. The descriptors are processed sequentially. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | | scsi-disk: improve out-of-range LBA detection for WRITE SAMEPaolo Bonzini2012-08-091-1/+2
| | | | | | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | | scsi-disk: more assertions and resets for aiocbPaolo Bonzini2012-08-091-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Leaving the aiocb to a non-NULL value leads to an assertion failure when rerror/werror are set to stop or enospc, and the operation is retried. scsi-disk checks that the aiocb member is NULL before filling it. This patch correctly resets the aiocb to NULL values everywhere, and adds the dual assertion that the aiocb was non-NULL before calling bdrv_acct_done. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | | virtio-scsi: do not compare 32-bit QEMU tags against 64-bit virtio-scsi tagsPaolo Bonzini2012-08-091-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a problem in handling task management functions in virtio-scsi. The cause of the problem is a mismatch between the size of the tag in QEMU (32-bit) and virtio-scsi (64-bit). Changing the QEMU size is hard because the migration format uses 32 bits to store the tag; so just don't use the QEMU tag (virtio-scsi only uses the tag for task management functions anyway) and look up the full 64-bit tag in the hba_private field. The reproducer is a bit obscure. If you cause an I/O timeout (for example with rerror=stop and doing 'cont' on the monitor continuously without fixing the error), sooner or later the guest will try to abort the command and reissue it. At this point, QEMU will report _two_ errors instead of one when you hit 'c', because the first error has not been canceled correctly. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | | | unicore32-softmmu: Add is_default setting for puv3 machineGuan Xuetao2012-08-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch sets is_default to 1 for puv3 machine, so that find_default_machine() returns puv3 machine. Thanks Dunrong for pointing it out. Cc: Dunrong Huang <riegamaths@gmail.com> Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | | unicore32-softmmu: Add ps2 supportGuan Xuetao2012-08-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds ps2/keyboard support, and enables CONFIG_PCKBD. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | | unicore32-softmmu: Add puv3 dma supportGuan Xuetao2012-08-113-0/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds puv3 dma (Direct Memory Access) support, include dma device simulation for kernel booting. v1->v2: Add initialization to ret in puv3_dma_read. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | | unicore32-softmmu: Add puv3 pm supportGuan Xuetao2012-08-113-0/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds puv3 pm (power management) support, include pm device simulation for kernel booting. Thank Blue Swirl for pointing out the missing "break". v1->v2: Add initialization to ret in puv3_pm_read. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | | unicore32-softmmu: Add puv3 gpio supportGuan Xuetao2012-08-113-0/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds puv3 gpio (General Purpose Input/Output) support, include gpio device simulation and its interrupt support. v1->v2: Add initialization to ret in puv3_gpio_read. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | | | unicore32-softmmu: Add puv3 ostimer supportGuan Xuetao2012-08-113-0/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds puv3 ostimer support, include os timer device simulation and ptimer support in puv3 machine. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
OpenPOWER on IntegriCloud