summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* cleanup, save a syscallLai Jiangshan2012-01-121-3/+1
| | | | | Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* cleanup, Remove duplicated codeLai Jiangshan2012-01-121-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>
* test: eliminate libcheck tests and have make check use gtesterAnthony Liguori2012-01-123-40/+8
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* check-qjson: enable disabled testsAnthony Liguori2012-01-121-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>
* check-qjson: convert to gtestAnthony Liguori2012-01-122-198/+136
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* check-qlist: convert to gtestAnthony Liguori2012-01-122-52/+25
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* check-qstring: convert to gtestAnthony Liguori2012-01-122-53/+26
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* check-qint: convert to gtestAnthony Liguori2012-01-122-49/+23
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* check-qfloat: convert to gtestAnthony Liguori2012-01-122-37/+14
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* check-qdict: convert to gtestAnthony Liguori2012-01-122-137/+113
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* build: split unit test builds to a separate makefile fragmentAnthony Liguori2012-01-122-35/+39
| | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* tests: mv tests/* -> tests/tcgAnthony Liguori2012-01-12227-5/+5
| | | | | Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga: optimize ppm_save() divisionsAvi Kivity2012-01-121-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>
* Fix qapi code generation fixAvi Kivity2012-01-124-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>
* etraxfs-dma: Model metadata and eopLars Persson2012-01-123-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>
* microblaze: Break the tb at memory barriersEdgar E. Iglesias2012-01-121-1/+11
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Emulate the hw stackprotectorEdgar E. Iglesias2012-01-124-0/+48
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* microblaze: Add support for the clz insnEdgar E. Iglesias2012-01-123-0/+17
| | | | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* target-i386: fix SSE rounding and flush to zeroAurelien Jarno2012-01-113-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>
* target-i386: fix dpps and dppd SSE2 instructionsAurelien Jarno2012-01-111-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>
* target-i386: fix round{pd,ps,sd,ss} SSE2 instructionsAurelien Jarno2012-01-111-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>
* target-i386: fix {min,max}{pd,ps,sd,ss} SSE2 instructionsAurelien Jarno2012-01-112-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>
* wm8750: Fix calculation of number of array elementsStefan Weil2012-01-101-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>
* elf: Improve symbol lookup (optimize, fix for bsd-user)Stefan Weil2012-01-103-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>
* hw/integratorcp: Simplify flash remap codePeter Maydell2012-01-101-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>
* hw/integratorcp: Fix sense of REMAP bitPeter Maydell2012-01-101-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>
* Merge branch 's390-next' of git://repo.or.cz/qemu/agrafAurelien Jarno2012-01-109-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
| * s390: fix cpu hotplug / cpu activity on interruptsChristian Borntraeger2012-01-041-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The add_del/running_cpu code and env->halted are tracking stopped cpus. Sleeping cpus (idle and enabled for interrupts) are waiting inside the kernel. No interrupt besides the restart can move a cpu from stopped to operational. This is already handled over there. So lets just remove the bogus wakup from the common interrupt delivery, otherwise any interrupt will wake up a cpu, even if this cpu is stopped (Thus leading to strange hangs on sigp restart) This fixes echo 0 > /sys/devices/system/cpu/cpu0/online echo 1 > /sys/devices/system/cpu/cpu0/online in the guest Signed-off-by: Christian Borntraeger<borntraeger@de.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * s390x: add TR function for EXECUTEAlexander Graf2012-01-041-0/+3
| | | | | | | | | | | | | | | | Newer gcc versions (or glibc?) also generate code that tries to EXECUTE the TR opcode. Implement it so that we don't break valid guests. Reported-by: Andreas Faerber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * Expose drive_add on all architecturesAlexander Graf2012-01-041-2/+0
| | | | | | | | | | | | | | | | | | All architectures can now use drive_add on the monitor. This of course does not mean that there is hotplug support for the specific platform, so in order to actually make use of the new drives you still need to have a hotplug capable device. Signed-off-by: Alexander Graf <agraf@suse.de>
| * Add generic drive hotpluggingAlexander Graf2012-01-043-21/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The monitor command for hotplugging is in i386 specific code. This is just plain wrong, as S390 just learned how to do hotplugging too and needs to get drives for that. So let's add a generic copy to generic code that handles drive_add in a way that doesn't have pci dependencies. All pci specific code can then be handled in a pci specific function. Signed-off-by: Alexander Graf <agraf@suse.de> --- v1 -> v2: - align generic drive_add to pci specific one - rework to split between generic and pci code v2 -> v3: - remove comment
| * Compile device-hotplug on all targetsAlexander Graf2012-01-041-1/+4
| | | | | | | | | | | | | | | | | | All guest targets could potentially implement hotplugging. With the next patches in this set I will also reflect this in the monitor interface. So let's always compile it in. It shouldn't hurt. Signed-off-by: Alexander Graf <agraf@suse.de>
| * [S390] Add hotplug supportAlexander Graf2012-01-042-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I just submitted a few patches that enable the s390 virtio bus to receive a hotplug add event. This patch implements the qemu side of it, so that new hotplug events can be submitted to the guest. Signed-off-by: Alexander Graf <agraf@suse.de> --- v1 -> v2: - make s390 virtio hoplug code emulate-capable
* | PPC: Fix linker scripts on ppc hostsAlexander Graf2012-01-102-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>
* | target-sh4: ignore ocbp and ocbwb instructionsAurelien Jarno2012-01-101-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>
* | tcg/arm: Use r6 as TCG_AREG0 to avoid clash with Thumb framepointerPeter Maydell2012-01-102-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>
* | cris-dis: Clean memory allocationStefan Weil2012-01-101-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>
* | Merge remote-tracking branch 'qemu-kvm/fix-vhost-after-memory-listener' into ↵Anthony Liguori2012-01-091-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
| * | vhost: improve region filteringAvi Kivity2012-01-091-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>
| * | vhost: fix mem_sections memory corruptionAvi Kivity2012-01-091-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>
| * | vhost: fix incorrect userspace addressAvi Kivity2012-01-091-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>
* | | Fix vmstate_register_ram() for rom/device regionsAvi Kivity2012-01-081-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>
* | | memory: Fix adjust_endianness()Andreas Färber2012-01-081-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>
* | | memory: Fix memory_region_wrong_endianness()Andreas Färber2012-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit be675c972088eba210e18dc125613e9f205a6bfb (memory: move endianness compensation to memory core) it was checking for TARGET_BIG_ENDIAN instead of TARGET_WORDS_BIGENDIAN, thereby not swapping correctly for Big Endian targets. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Avi Kivity <avi@redhat.com>
* | | kvm: fix build error in ppc kvm due to memory_region_init_ram_ptr() changeAvi Kivity2012-01-081-1/+2
|/ / | | | | | | | | | | | | | | Commit c5705a772 ("vmstate, memory: decouple vmstate from memory API") changed the signature of memory_region_init_ram_ptr() but did not update a caller in the ppc kvm module. Fix. Signed-off-by: Avi Kivity <avi@redhat.com>
* | Merge branch 'target-arm.for-upstream' of ↵Aurelien Jarno2012-01-073-8/+94
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | git://git.linaro.org/people/pmaydell/qemu-arm * 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm: arm: add dummy A9-specific cp15 registers target-arm: Ignore attempts to set invalid modes in CPSR target-arm: Don't use cpu_single_env in bank_number()
| * | arm: add dummy A9-specific cp15 registersMark Langsdorf2012-01-053-1/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add dummy register support for the cp15, CRn=c15 registers. config_base_register and power_control_register currently default to 0, but may have improved support after the QOM CPU patches are finished. Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | target-arm: Ignore attempts to set invalid modes in CPSRPeter Maydell2012-01-051-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | Ignore attempts to set the CPSR mode field to an invalid value. This is UNPREDICTABLE, but we should not cpu_abort() for things a malicious guest (or a confused user on the gdbstub interface) can provoke. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | target-arm: Don't use cpu_single_env in bank_number()Peter Maydell2012-01-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Avoid using cpu_single_env in bank_number() -- if we were called via the gdb stub reading or writing the CPSR then it is NULL and we will segfault if we take the cpu_abort(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | | Merge branch 'ppc-next' of git://repo.or.cz/qemu/agrafAurelien Jarno2012-01-0711-65/+347
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'ppc-next' of git://repo.or.cz/qemu/agraf: PPC: Add description for the Freescale e500mc core. pseries: Check for duplicate addresses on the spapr-vio bus pseries: Populate "/chosen/linux,stdout-path" in the FDT pseries: Add a routine to find a stable "default" vty and use it pseries: Emit device tree nodes in reg order pseries: FDT NUMA extensions to support multi-node guests pseries: Remove hcalls callback kvm-ppc: halt secondary cpus when guest reset console: Fix segfault on screendump without VGA adapter PPC: monitor: add ability to dump SLB entries
OpenPOWER on IntegriCloud