summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/master' into stagingAnthony Liguori2012-04-231-3/+3
|\ | | | | | | | | * origin/master: fix BCD mask for date (Solaris 2.5 guest hang fix)
| * fix BCD mask for date (Solaris 2.5 guest hang fix)Artyom Tarasenko2012-04-231-3/+3
| | | | | | | | | | | | | | | | Fix BCD mask for date. The most visible effect of this patch is Solaris 2.5.1 doesn't hang at boot if the day of month is >21. Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | Merge remote-tracking branch 'origin/master' into stagingAnthony Liguori2012-04-234-81/+132
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: (27 commits) target-arm: Move reset handling to arm_cpu_reset target-arm: Drop cpu_reset_model_id() target-arm: Move cache ID register setup to cpu specific init fns target-arm: Move OMAP cp15_i_{max,min} reset to cpu_state_reset target-arm: Move feature register setup to per-CPU init fns target-arm: Move iWMMXT wCID reset to cpu_state_reset target-arm: Drop JTAG_ID documentation target-arm: Move SCTLR reset value setup to per cpu init fns target-arm: Move CTR setup to per cpu init fns target-arm: Move MVFR* setup to per cpu init fns target-arm: Move FPSID config to cpu init fns target-arm: Move feature bit settings to CPU init fns target-arm: Add QOM subclasses for each ARM cpu implementation target-arm: remind to keep arm features in sync with linux-user/elfload.c tci: GETPC() macro must return an uintptr_t gdbstub: Synchronize CPU state unconditionally in gdb_set_cpu_pc softfloat: make USE_SOFTFLOAT_STRUCT_TYPES compile target-xtensa: add tests for LOOPNEZ and LOOPGTZ target-xtensa: fix LOOPNEZ/LOOPGTZ translation qtest: add m48t59 tests for Sparc ...
| * versatiblepb: add NOR flash supportEric Benard2012-04-201-0/+16
| | | | | | | | | | | | | | | | | | | | | | - add support for the 64MB NOR CFI01 flash available at 0x34000000 on the versatilepb board http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0225d/BBAJIHEC.html - tested with barebox bootloader Signed-off-by: Eric Bénard <eric@eukrea.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * hw/arm_mptimer: Reset the qemu_timer at resetPeter Maydell2012-04-201-0/+3
| | | | | | | | | | | | | | On reset of the mpcore timer/watchdog block we need to delete the qemu_timer in case it was running. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * versatilepb: add ds1338 rtc deviceOskar Andero2012-04-201-0/+6
| | | | | | | | | | | | | | Add ds1338 rtc attached on i2c. Signed-off-by: Oskar Andero <oskar.andero@gmail.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * realview: break out versatile i2c controller codeOskar Andero2012-04-202-81/+107
| | | | | | | | | | | | | | | | | | The versatile i2c controller implementation was separated to its own file called versatile_i2c.c. This is done as a preparation for adding i2c support to the versatilepb board. Signed-off-by: Oskar Andero <oskar.andero@gmail.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | Merge remote-tracking branch 'sstabellini/build_fix' into stagingAnthony Liguori2012-04-233-1/+26
|\ \ | | | | | | | | | | | | | | | * sstabellini/build_fix: xen: add a dummy xc_hvm_inject_msi for Xen < 4.2 xen,configure: detect Xen 4.2
| * | xen: add a dummy xc_hvm_inject_msi for Xen < 4.2Stefano Stabellini2012-04-173-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xc_hvm_inject_msi is only available on Xen >= 4.2: add a dummy compatibility function for Xen < 4.2. Also enable msi support only on Xen >= 4.2. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Anthony PERARD <anthony.perard@citrix.com>
* | | Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2012-04-234-4/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stefanha/trivial-patches: Add .gitignore for tests/ e1000: Fix spelling (segmentaion -> segmentation) in debug output spice-qemu-char.c: Show what name is unsupported pflash_cfi01: remove redundant line qxl: Add missing GCC_FMT_ATTR and fix format specifier fix block_job_set_speed name in documentation error.c: don't return value for void function
| * | | e1000: Fix spelling (segmentaion -> segmentation) in debug outputStefan Weil2012-04-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was reported by https://bugs.launchpad.net/qemu/+bug/984476. I also changed the case for 'error'. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | | pflash_cfi01: remove redundant lineEric Bénard2012-04-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Eric Bénard <eric@eukrea.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | | qxl: Add missing GCC_FMT_ATTR and fix format specifierStefan Weil2012-04-202-2/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | val is an uint64_t, therefore %d was not correct. Signed-off-by: Stefan Weil <sw@weilnetz.de> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | | Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori2012-04-236-42/+171
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bonzini/scsi-next: scsi: add SANITIZE command SCSI emulation: should tell the guest that we actually support thin provisioning SCSI emulation: Support unmap via WRITE_SAME_10. scsi: advertise DPOFUA scsi: small refactoring of MMC mode-sense scsi: support FUA on reads scsi: add a started field to SCSIDiskReq scsi: force unit access on VERIFY scsi: add support for FUA on writes scsi: move scsi_flush_complete around scsi: make code more homogeneous in AIO callback functions scsi: add missing test for cancelled request virtio-scsi: add multiqueue capability virtio: add virtio_queue_get_id virtio-scsi: prepare migration format for multiqueue scsi: fix memory leak
| * | scsi: add SANITIZE commandPaolo Bonzini2012-04-192-0/+2
| | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | SCSI emulation: should tell the guest that we actually support thin provisioningRonnie Sahlberg2012-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> [Actually, we should report it only if discard_granularity is nonzero. Older SBC drafts assigned 0 to thin provisioning and 1 to thick (resource-provisioned, they call it). Newer drafts assign respectively 1 and 2 - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | SCSI emulation: Support unmap via WRITE_SAME_10.Ronnie Sahlberg2012-04-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was added in SBC r26 in place of the reserved bits that were present up to that version. It is the same as WRITE_SAME_16 as far as QEMU is concerned. Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi: advertise DPOFUAPaolo Bonzini2012-04-191-1/+2
| | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi: small refactoring of MMC mode-sensePaolo Bonzini2012-04-191-7/+12
| | | | | | | | | | | | | | | | | | Make DBD a boolean value, and force device-specific parameter to zero. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi: support FUA on readsPaolo Bonzini2012-04-191-10/+42
| | | | | | | | | | | | | | | | | | To force unit access on reads, flush the cache *before* doing the read. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi: add a started field to SCSIDiskReqPaolo Bonzini2012-04-191-0/+4
| | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi: force unit access on VERIFYPaolo Bonzini2012-04-191-4/+23
| | | | | | | | | | | | | | | | | | | | | Also DMA data from the host, to avoid that the host reports an underrun. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi: add support for FUA on writesPaolo Bonzini2012-04-191-2/+47
| | | | | | | | | | | | | | | | | | | | | | | | To force unit access, add a flush operation after the actual write. WRITE AND VERIFY commands always flush according to SBC, so do it even though we do not perform the reread. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi: move scsi_flush_complete aroundPaolo Bonzini2012-04-191-18/+18
| | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi: make code more homogeneous in AIO callback functionsPaolo Bonzini2012-04-191-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | First scsi_flush_complete, like scsi_dma_complete, is always called with an active AIOCB. Second, always test for "ret < 0" to check for errors. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi: add missing test for cancelled requestPaolo Bonzini2012-04-191-1/+3
| | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | virtio-scsi: add multiqueue capabilityPaolo Bonzini2012-04-191-10/+15
| | | | | | | | | | | | | | | | | | | | | Adding multiqueue is as simple as creating more than one virtqueues, and saving the queue number for each request. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | virtio: add virtio_queue_get_idPaolo Bonzini2012-04-192-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Serializing virtio-scsi requests needs a simple way to get from a VirtQueue to the number of the queue. The virtio_queue_get_id provides this. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | virtio-scsi: prepare migration format for multiqueuePaolo Bonzini2012-04-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to restore requests correctly from a multitude of virtqueues, we need to store the id of the request queue that each request came from. Do this even for single-queue, by storing a hard-coded zero, to simplify future implementation of multiqueue. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi: fix memory leakPaolo Bonzini2012-04-191-2/+5
| | | | | | | | | | | | | | | | | | | | | scsibus_get_dev_path is leaking id if it is not NULL. Fix it. Reported-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | | Merge remote-tracking branch 'origin/master' into stagingAnthony Liguori2012-04-181-90/+49
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: Allow controlling volume with PulseAudio backend configure: pa_simple is not needed anymore Do not use pa_simple PulseAudio API audio/spice: add support for volume control hw/ac97: add support for volume control hw/ac97: the volume mask is not only 0x1f hw/ac97: remove USE_MIXER code audio: don't apply volume effect if backend has VOICE_VOLUME_CAP audio: add VOICE_VOLUME ctl
| * | | hw/ac97: add support for volume controlMarc-André Lureau2012-04-171-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Combine output volume with Master and PCM registers values. Use default values in mixer_reset (). Set volume on post-load to update backend values. v4,v5: - fix some code style Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
| * | | hw/ac97: the volume mask is not only 0x1fMarc-André Lureau2012-04-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a case by case (see Table 66. AC ?97 Baseline Audio Register Map) Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
| * | | hw/ac97: remove USE_MIXER codeMarc-André Lureau2012-04-171-121/+0
| | |/ | |/| | | | | | | | | | | | | | | | | | | That code doesn't compile. The interesting bits for volume control are going to be rewritten in the following patch. Signed-off-by: Marc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: malc <av1474@comtv.ru>
* | | Merge remote-tracking branch 'spice/spice.v52' into stagingAnthony Liguori2012-04-182-2/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * spice/spice.v52: qxl-render: fix broken vnc+spice since commit f934493 qxl: set default values of vram*_size_mb to -1 trace-events: remove unused qxl_vga_ioport_while_not_in_vga_mode
| * | | qxl-render: fix broken vnc+spice since commit f934493Alon Levy2012-04-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notify any listeners such as vnc that the displaysurface has been changed, otherwise they will segfault when first accessing the freed old displaysurface data. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
| * | | qxl: set default values of vram*_size_mb to -1Alon Levy2012-04-181-2/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The addition of those values caused a regression where not specifying any value for the vram bar size would result in a 4096 _byte_ surface area. This is ok for the windows driver but causes the X driver to be unusable. Also, it's a regression. This patch returns the default behavior of having a 64 megabyte vram BAR. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | usb-ehci: drop assert()Gerd Hoffmann2012-04-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not sure what the purpose of the assert() was, in any case it is bogous. We can arrive there if transfer descriptors passed to us from the guest failed to pass sanity checks, i.e. it is guest-triggerable. We deal with that case by resetting the host controller. Everything is ok, no need to throw a core dump here. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | usb-redir: Notify our peer when we reject a device due to a speed mismatchHans de Goede2012-04-171-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | Also cleanup (reset) our device state when we reject a device due to a speed mismatch. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | usb-ehci: Drop unused sofv valueHans de Goede2012-04-171-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | The sofv value only ever gets a value assigned and is never used (read) anywhere, so we can just drop it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | usb-host: rewrite usb_linux_update_endp_tableGerd Hoffmann2012-04-171-93/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch carries a complete rewrite of the usb descriptor parser. Changes / improvements: * We are using the USBDescriptor struct instead of hard-coded offsets now to access descriptor data. * (debug) printfs are all gone, tracepoints have been added instead. * We don't try (and fail) to skip over unneeded descriptors. We parse them all one by one. We keep track of which configuration, interface and altsetting we are looking at and use this information to figure which desciptors are in use and which we can ignore. * On parse errors we clear all endpoint information, which will disallow any communication with the device, except control endpoint messages. This makes sure we don't end up with a silly device state where half of the endpoints got enabled and the other half was left disabled. * Some sanity checks have been added. The new parser is more robust and also leaves complete device information in the trace log if you enable the ush_host_parse_* tracepoints. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | usb: use USBDescriptor for endpoint descriptors.Gerd Hoffmann2012-04-172-9/+20
| | | | | | | | | | | | | | | | | | | | | Add endpoint descriptor substruct to USBDescriptor, use it in the descriptor generator code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | usb: use USBDescriptor for interface descriptors.Gerd Hoffmann2012-04-172-9/+20
| | | | | | | | | | | | | | | | | | | | | Add interface descriptor substruct to USBDescriptor, use it in the descriptor generator code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | usb: use USBDescriptor for config descriptors.Gerd Hoffmann2012-04-172-10/+21
| | | | | | | | | | | | | | | | | | | | | Add config descriptor substruct to USBDescriptor, use it in the descriptor generator code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | usb: use USBDescriptor for device qualifier descriptors.Gerd Hoffmann2012-04-172-11/+22
| | | | | | | | | | | | | | | | | | | | | Add device qualifier substruct to USBDescriptor, use it in the descriptor generator code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | usb: add USBDescriptor, use for device descriptors.Gerd Hoffmann2012-04-172-19/+46
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new type for the binary representation of usb descriptors. It is put into use for the descriptor generator code where the struct replaces the hard-coded offsets. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | usb-ehci: frindex always is a 14 bits counterHans de Goede2012-04-171-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | frindex always is a 14 bits counter, and not a 13 bits one as we were emulating. There are some subtle hints to this in the spec, first of all "Table 2-12. FRINDEX - Frame Index Register" says: "Bit 13:0 Frame Index. The value in this register increments at the end of each time frame (e.g. micro-frame). Bits [N:3] are used for the Frame List current index. This means that each location of the frame list is accessed 8 times (frames or micro-frames) before moving to the next index. The following illustrates values of N based on the value of the Frame List Size field in the USBCMD register. USBCMD[Frame List Size] Number Elements N 00b 1024 12 01b 512 11 10b 256 10 11b Reserved" Notice how the text talks about "Bits [N:3]" are used ..., it does NOT say that when N == 12 (our case) the counter will wrap from 8191 to 0, or in otherwords that it is a 13 bits counter (bits 0 - 12). The other hint is in "Table 2-10. USBSTS USB Status Register Bit Definitions": "Bit 3 Frame List Rollover - R/WC. The Host Controller sets this bit to a one when the Frame List Index (see Section 2.3.4) rolls over from its maximum value to zero. The exact value at which the rollover occurs depends on the frame list size. For example, if the frame list size (as programmed in the Frame List Size field of the USBCMD register) is 1024, the Frame Index Register rolls over every time FRINDEX[13] toggles. Similarly, if the size is 512, the Host Controller sets this bit to a one every time FRINDEX[12] toggles." Notice how this text talks about setting bit 3 when bit 13 of frindex toggles (when there are 1024 entries, so our case), so this indicates that frindex has a bit 13 making it a 14 bit counter. Besides these clear hints the real proof is in the pudding. Before this patch I could not stream data from a USB2 webcam under Windows XP, after this cam using a USB2 webcam under Windows XP works fine, and no regressions with other operating systems were seen. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | usb-ehci: fix ehci_child_detachGerd Hoffmann2012-04-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like a cut+paste bug from ehci_detach. When the device itself is detached from a ehci port (ehci_detach op) we have to clear the device pointer for the companion port too. When a device gets removed from a downstream port of a usb hub (ehci_child_detach op) the ehci port where the usb hub is plugged in is not affected. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | usb-hub: add tracepointsGerd Hoffmann2012-04-171-2/+41
| | | | | | | | | | | | | | | | | | Add tracepoints to the usb hub emulation. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* | | usb_packet_set_state: handle p->ep == NULLGerd Hoffmann2012-04-171-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | usb_packet_set_state can be called with p->ep = NULL. The tracepoint there tries to log endpoint information, which leads to a segfault. This patch makes usb_packet_set_state handle the NULL pointer properly. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
OpenPOWER on IntegriCloud