Commit Graph

18066 Commits

Author SHA1 Message Date
Aurelien Jarno
5c84bd904b tcg-arm: fix a typo in comments
ARM still doesn't support 16GB buffers in 32-bit modes, replace the
16GB by 16MB in the comment.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-01-13 10:36:59 +00:00
Stefan Weil
bd947d30b6 configure: Modify detection of supported warning options
Reversing the order of the warning options and -Werror is important
when clang is used instead of gcc. It changes nothing for gcc.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-01-13 10:36:59 +00:00
Edgar E. Iglesias
bee5a5fb11 cris: Update paths to match the move of tests/cris
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2012-01-13 11:09:56 +01:00
Anthony Liguori
515aa3c579 check-qstring: remove check.h include
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12 11:33:22 -06:00
Stefan Hajnoczi
92af0bfda0 MAINTAINERS: update tracing repo git URL
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-12 10:34:20 -06:00
Benjamin
0e0e7facc7 Support for UDP unicast network backend
Signed-off-by: Benjamin MARSILI <mlspirat42@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12 10:34:20 -06:00
Lai Jiangshan
4aa7534d22 cleanup, save a syscall
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12 10:34:20 -06:00
Lai Jiangshan
a7d64ddbcc cleanup, Remove duplicated code
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-12 10:34:20 -06:00
Anthony Liguori
ad65aa882c test: eliminate libcheck tests and have make check use gtester
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12 10:34:11 -06:00
Anthony Liguori
38273e1dee check-qjson: enable disabled tests
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-12 10:05:38 -06:00
Anthony Liguori
ef76dc59fa check-qjson: convert to gtest
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12 10:05:38 -06:00
Anthony Liguori
91479dd0b5 check-qlist: convert to gtest
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12 10:05:38 -06:00
Anthony Liguori
0ac7cc2af5 check-qstring: convert to gtest
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12 10:05:38 -06:00
Anthony Liguori
65cdadd2e2 check-qint: convert to gtest
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12 10:05:37 -06:00
Anthony Liguori
a9e1c28dda check-qfloat: convert to gtest
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12 10:05:37 -06:00
Anthony Liguori
ac531cb6e5 check-qdict: convert to gtest
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12 10:05:37 -06:00
Anthony Liguori
dbfe06c62c build: split unit test builds to a separate makefile fragment
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12 10:05:37 -06:00
Anthony Liguori
c09015dd04 tests: mv tests/* -> tests/tcg
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-01-12 10:03:28 -06:00
Avi Kivity
a0f426109e vga: optimize ppm_save() divisions
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-12 10:03:28 -06:00
Avi Kivity
19bf7c8708 Fix qapi code generation fix
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-12 10:03:28 -06:00
Lars Persson
73a511decc etraxfs-dma: Model metadata and eop
- 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-12 13:54:17 +01:00
Edgar E. Iglesias
9f6113c7e6 microblaze: Break the tb at memory barriers
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2012-01-12 13:54:17 +01:00
Edgar E. Iglesias
5818dee572 microblaze: Emulate the hw stackprotector
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2012-01-12 13:54:16 +01:00
Edgar E. Iglesias
48b5e96f0f microblaze: Add support for the clz insn
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2012-01-12 13:54:16 +01:00
Aurelien Jarno
2355c16e74 target-i386: fix SSE rounding and flush to zero
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-11 09:55:28 +01:00
Aurelien Jarno
170d5b4bb9 target-i386: fix dpps and dppd SSE2 instructions
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-11 09:55:28 +01:00
Aurelien Jarno
adc7166611 target-i386: fix round{pd,ps,sd,ss} SSE2 instructions
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-11 09:55:28 +01:00
Aurelien Jarno
a4d1f14254 target-i386: fix {min,max}{pd,ps,sd,ss} SSE2 instructions
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-11 09:55:28 +01:00
Stefan Weil
9841aee16f wm8750: Fix calculation of number of array elements
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-10 18:47:06 +01:00
Stefan Weil
c7c530cd3e elf: Improve symbol lookup (optimize, fix for bsd-user)
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 ec822001a2
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-10 18:40:09 +01:00
Peter Maydell
563c2bf35c hw/integratorcp: Simplify flash remap code
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-10 18:40:01 +01:00
Peter Maydell
4753dea8c1 hw/integratorcp: Fix sense of REMAP bit
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-10 18:39:57 +01:00
Aurelien Jarno
14763ec873 Merge branch 's390-next' of git://repo.or.cz/qemu/agraf
* '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-10 18:24:11 +01:00
Alexander Graf
665a04ae1c PPC: Fix linker scripts on ppc hosts
When compiling qemu statically with multilib on PPC, we hit the
same issue that commit 845f2c2812
is fixing. Do the same here.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-01-10 18:23:58 +01:00
Aurelien Jarno
0cdb95549f target-sh4: ignore ocbp and ocbwb instructions
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-10 18:20:10 +01:00
Peter Maydell
05b922dd0a tcg/arm: Use r6 as TCG_AREG0 to avoid clash with Thumb framepointer
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-10 17:52:49 +01:00
Stefan Weil
520a02f8b8 cris-dis: Clean memory allocation
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-10 09:36:43 +01:00
Anthony Liguori
cd9244e48a Merge remote-tracking branch 'qemu-kvm/fix-vhost-after-memory-listener' into 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-09 08:54:04 -06:00
Avi Kivity
c49450b98f vhost: improve region filtering
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-09 14:01:39 +02:00
Avi Kivity
637f7a6a01 vhost: fix mem_sections memory corruption
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-09 13:59:50 +02:00
Avi Kivity
d743c38286 vhost: fix incorrect userspace address
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-09 13:09:40 +02:00
Avi Kivity
1ddde08780 Fix vmstate_register_ram() for rom/device regions
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-08 18:16:31 +02:00
Andreas Färber
1470a0cdca memory: Fix adjust_endianness()
Commit a621f38de8 (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>
2012-01-08 13:10:16 +02:00
Andreas Färber
2c3579ab07 memory: Fix memory_region_wrong_endianness()
Since commit be675c9720 (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>
2012-01-08 13:10:09 +02:00
Avi Kivity
6148b23d69 kvm: fix build error in ppc kvm due to memory_region_init_ram_ptr() change
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>
2012-01-08 12:59:16 +02:00
Aurelien Jarno
e7f929028c Merge branch 'target-arm.for-upstream' of 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()
2012-01-07 22:19:14 +01:00
Aurelien Jarno
15f43ccda1 Merge branch 'ppc-next' of git://repo.or.cz/qemu/agraf
* '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
2012-01-07 22:01:57 +01:00
Stefan Weil
c27808657b sm501: Fix size of color_reg
color_reg is expected to hold 32 bit values, so it was too small.

This bug was reported by coverity:

hw/sm501.c:624:
result_independent_of_operands:
color_reg >> 16 is 0 regardless of the values of its operands.
This occurs as the bitwise first operand of '&'.

Cc: Shin-ichiro Kawasaki <kawasaki@juno.dti.ne.jp>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-01-07 21:29:26 +01:00
Stefan Weil
f840fa995f target-sh4: Fix operands for fipr, ftrv instructions
Coverity complained about right shifts of opcode (16, 18) which were
larger than the size of opcode (16 bit).

Using the correct shift values fixes this.

Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-01-07 18:16:24 +01:00
Stefan Weil
e9b40fd34c malta: Fix regression (i8259 interrupts did not work)
Commit 5632ae46d5 passes the address
of i8259 to qemu_irq_proxy. i8259 is an auto variable with undefined
value outside of mips_malta_init.

This made the interrupt proxy unusable: either QEMU crashes, or
the interrupt handler was not called.

Ethernet for example no longer worked with MIPS Malta.

v2:
While v1 used a static variable for i8259, this patch introduces
a qdev for the malta machine. i8259 is now part of the device status.
This is a minimal qdev implementation to keep the patch small.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-01-07 18:16:24 +01:00