aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-01-17usb/debug: add usb_ep_dumpGerd Hoffmann3-0/+44
Add function to dump endpoint data, for debugging purposes. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-01-17usb-desc: USBEndpoint supportGerd Hoffmann1-0/+22
Initialize USBEndpoint structs from USBDesc* data. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-01-17usb: add ifnum to USBEndpointGerd Hoffmann3-0/+18
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-01-17usb: add USBEndpointGerd Hoffmann4-34/+74
Start maintaining endpoint state at USBDevice level. Add USBEndpoint struct and some helper functions to deal with it. For now it contains the endpoint type only. Moved over some bits from usb-linux.c Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-01-17xhci: Initial xHCI implementationHector Martin4-0/+2754
Based on the implementation from Hector Martin <hector@marcansoft.com> Hectors's implementation completely sidestepped the qemu usb system and used libusb directly for usb device pass through. So I've ripped out the libusb bits (or left them in disabled, as reference for further coding) and hooked up the qemu subsystem instead. That work is not complete yet though, partly due to limitations of the qemu usb subsystem. Nevertheless I think it is better to continue development in-tree, especially as the qemu usb bits need a bunch of improvements too for decent usb 3.0 support. Current state: - usb-storage emulation should work ok. - Devices which need constant polling (HID emulation like usb-tablet) are known to not work. - ISO xfers are not implemented yet. - superspeed ports are not implemented yet. - usb pass-through is completely untested so far. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-01-13usb: add audio device modelH. Peter Anvin4-4/+712
This brings a usb audio device to qemu. Output only, fixed at 16bit stereo @ 480000 Hz. Based on a patch from H. Peter Anvin <hpa@linux.intel.com> Usage: add '-device usb-audio' to your qemu command line. Works sorta ok on a idle machine. Known issues: * Is *very* sensitive to latencies. * Burns quite some CPU due to usb polling. In short: It brings the qemu usb emulation to its limits. Enjoy! Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-01-13usb-desc: audio endpoint supportGerd Hoffmann2-3/+16
Add support for audio endpoints which have two more fields in the descriptor. Also add support for extra class specific endpoint descriptors. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-01-13usb: track altsetting in USBDeviceGerd Hoffmann12-79/+90
Also handle {GET,SET}_INTERFACE in common code (usb-desc.c). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-01-13usb: track configuration and interface count in USBDevice.Gerd Hoffmann3-20/+38
Move fields from USBHostDevice to USBDevice. Add bits to usb-desc.c to fill them for emulated devices too. Also allow to set configuration 0 (== None) for emulated devices. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-01-13usb-host: rip out legacy procfs supportGerd Hoffmann1-285/+42
This patch removes support for parsing /proc/bus/usb/devices for device discovery. The code lacks a few features compared to the sysfs code and is also bitrotting as everybody has sysfs these days. This implies having sysfs mounted is mandatory now to use the usb-host driver. udev isn't required though. qemu will prefer the udev-managed device nodes below /dev/bus/usb, but in case this directory isn't preset qemu will use the device nodes below /proc/bus/usb (default usbfs mount point). Bottom line: make sure you have both sysfs and usbfs mounted properly, and everything should continue to work as it did before. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-01-12check-qstring: remove check.h includeAnthony Liguori1-1/+1
Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12MAINTAINERS: update tracing repo git URLStefan Hajnoczi1-1/+1
I have moved git hosting services. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12Support for UDP unicast network backendBenjamin3-3/+82
Signed-off-by: Benjamin MARSILI <mlspirat42@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12cleanup, save a syscallLai Jiangshan1-3/+1
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12cleanup, Remove duplicated codeLai Jiangshan1-8/+0
These two blocks of code are exactly the same, remove one. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12test: eliminate libcheck tests and have make check use gtesterAnthony Liguori3-40/+8
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12check-qjson: enable disabled testsAnthony Liguori1-5/+0
gtest does the right thing here so there's no need to comment these tests out. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12check-qjson: convert to gtestAnthony Liguori2-198/+136
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12check-qlist: convert to gtestAnthony Liguori2-52/+25
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12check-qstring: convert to gtestAnthony Liguori2-53/+26
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12check-qint: convert to gtestAnthony Liguori2-49/+23
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12check-qfloat: convert to gtestAnthony Liguori2-37/+14
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12check-qdict: convert to gtestAnthony Liguori2-137/+113
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12build: split unit test builds to a separate makefile fragmentAnthony Liguori2-35/+39
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12tests: mv tests/* -> tests/tcgAnthony Liguori227-5/+5
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12vga: optimize ppm_save() divisionsAvi Kivity1-6/+4
ppm_save() spends upwards of 50% of its time doing divisions. Replace them with shifts. Reviewed-by: Alon Levy <alevy@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12Fix qapi code generation fixAvi Kivity4-23/+15
The fixes to qapi code generation had multiple bugs: - the Null class used to drop output was missing some methods - in some scripts it was never instantiated, leading to a None return, which is missing even more methods - the --source and --header options were swapped Luckily, all those bugs were hidden by a makefile bug which caused the old behaviour (with the race) to be invoked. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12etraxfs-dma: Model metadata and eopLars Persson3-10/+33
- Send EOP flags to the out channels. - Send data descriptor metadata to the out channels. Signed-off-by: Lars Persson <larper@axis.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2012-01-12microblaze: Break the tb at memory barriersEdgar E. Iglesias1-1/+11
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2012-01-12microblaze: Emulate the hw stackprotectorEdgar E. Iglesias4-0/+48
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2012-01-12microblaze: Add support for the clz insnEdgar E. Iglesias3-0/+17
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2012-01-11target-i386: fix SSE rounding and flush to zeroAurelien Jarno3-11/+56
SSE rounding and flush to zero control has never been implemented. However given that softfloat-native was using a single state for FPU and SSE and given that glibc is setting both FPU and SSE state in fesetround(), this was working correctly up to the switch to softfloat. Fix that by adding an update_sse_status() function similar to update_fpu_status(), and callin git on write to mxcsr. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-01-11target-i386: fix dpps and dppd SSE2 instructionsAurelien Jarno1-14/+14
The helpers implemented dpps and dppd SSE instructions are not passing the correct argument types to the softfloat functions. While they do work anyway providing a correct behaviour, this patch fixes that. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-01-11target-i386: fix round{pd,ps,sd,ss} SSE2 instructionsAurelien Jarno1-8/+8
roundps and roundss SSE2 instructions have been broken when switching target-i386 to softfloat. They use float64_round_to_int to convert a float32, and while the implicit conversion from float32 to float64 was correct for softfloat-native, it is not for pure softfloat. Fix that by using the correct registers and correct functions. Also fix roundpd and roundsd implementation at the same time, even if these functions are behaving correctly. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-01-11target-i386: fix {min,max}{pd,ps,sd,ss} SSE2 instructionsAurelien Jarno2-3/+7
minpd, minps, minsd, minss and maxpd, maxps, maxsd, maxss SSE2 instructions have been broken when switching target-i386 to softfloat. It's not possible to use comparison instructions on float types anymore to softfloat, so use the floatXX_lt function instead, as the float_XX_min and float_XX_max functions can't be used due to the Intel specific behaviour. As it implements the correct NaNs behaviour, let's remove the corresponding entry from the TODO. It fixes GDM screen display on Debian Lenny. Thanks to Peter Maydell and Jason Wessel for their analysis of the problem. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-01-10wm8750: Fix calculation of number of array elementsStefan Weil1-1/+1
Coverity says that the division by sizeof(*s->rate) might be wrong. I think that coverity is right. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2012-01-10elf: Improve symbol lookup (optimize, fix for bsd-user)Stefan Weil3-21/+13
Coverity complained about local variable key which was only partially initiated. Only key.st_value was set. As this was also the only part of key which was used in function symfind, the code could be optimized by directly passing a pointer to orig_addr. In bsd-user/elfload.c, fix ec822001a2f26eef8701194714f6482b6d852de2 was missing. This was a simple replacement of > by >= in symfind, so I fixed it here without creating an additional patch. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2012-01-10hw/integratorcp: Simplify flash remap codePeter Maydell1-19/+7
Use the new memory mutator API to simplify the flash remap code; this allows us to drop the flash_mapped flag. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2012-01-10hw/integratorcp: Fix sense of REMAP bitPeter Maydell1-1/+1
Fix the sense of the REMAP bit: 0 should mean "map flash", 1 should mean "map RAM". Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2012-01-10Merge branch 's390-next' of git://repo.or.cz/qemu/agrafAurelien Jarno9-32/+87
* 's390-next' of git://repo.or.cz/qemu/agraf: s390: fix cpu hotplug / cpu activity on interrupts s390x: add TR function for EXECUTE Expose drive_add on all architectures Add generic drive hotplugging Compile device-hotplug on all targets [S390] Add hotplug support
2012-01-10PPC: Fix linker scripts on ppc hostsAlexander Graf2-4/+28
When compiling qemu statically with multilib on PPC, we hit the same issue that commit 845f2c2812d9ed24b36c02a3d06ee83aeafe8b49 is fixing. Do the same here. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-01-10target-sh4: ignore ocbp and ocbwb instructionsAurelien Jarno1-11/+3
ocbp and ocbwb controls the writeback of a cache line to memory. They are supposed to do nothing in case of a cache miss. Given QEMU only partially emulate caches, it is safe to ignore these instructions. This fixes a kernel oops when trying to access an rtl8139 NIC with recent versions. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-01-10tcg/arm: Use r6 as TCG_AREG0 to avoid clash with Thumb framepointerPeter Maydell2-2/+2
On ARM, in Thumb mode r7 is used for the framepointer; this meant that we would fail to compile in debug mode because we were using r7 for TCG_AREG0. Shift to r6 instead to avoid this clash. (Bug reported as LP:870990.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2012-01-10cris-dis: Clean memory allocationStefan Weil1-28/+6
The old code used sizeof(const struct cris_opcode **) where it should have used sizeof(const struct cris_opcode *). As both sizes give the same value, the resulting binary was ok, but static code analyzers like coverity and clang complained. This is fixed here, and the code is also simplified by using g_new0. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2012-01-09Merge remote-tracking branch 'qemu-kvm/fix-vhost-after-memory-listener' into ↵Anthony Liguori1-6/+17
staging * qemu-kvm/fix-vhost-after-memory-listener: vhost: improve region filtering vhost: fix mem_sections memory corruption vhost: fix incorrect userspace address
2012-01-09vhost: improve region filteringAvi Kivity1-4/+15
vhost memory management doesn't care about non-memory (e.g. PIO) or non-RAM regions. Adjust the filtering to reflect that, and move it earlier so it applies to mem_sections too. Signed-off-by: Avi Kivity <avi@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com>
2012-01-09vhost: fix mem_sections memory corruptionAvi Kivity1-1/+1
A memset() used to delete an entry in an array did not take into account the array element's size. Signed-off-by: Avi Kivity <avi@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com>
2012-01-09vhost: fix incorrect userspace addressAvi Kivity1-1/+1
MemoryListener::region_add() gives us a slice of a MemoryRegion, not a region. Adjust the userspace address to reflect that. Signed-off-by: Avi Kivity <avi@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com>
2012-01-08Fix vmstate_register_ram() for rom/device regionsAvi Kivity1-1/+1
rom/device regions have a ram_addr that is composed of both an I/O handler (low bits) and RAM region (high bits); but qemu_ram_set_idstr() expects just a RAM region. Mask the I/O handler to make it happy. Tested-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Avi Kivity <avi@redhat.com>
2012-01-08memory: Fix adjust_endianness()Andreas Färber1-0/+1
Commit a621f38de85598a13d8d8524d1a94fc6a1818215 (Direct dispatch through MemoryRegion) moved byte swaps to a central function. Add a missing break, so that long-sized byte swaps don't abort. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Avi Kivity <avi@redhat.com>