Commit Graph

15565 Commits

Author SHA1 Message Date
Alexandre Raymond 793553acb3 Makefile: delete config.log in distclean
Distclean should remove anything created by the configure script.

Signed-off-by: Alexandre Raymond <cerbere@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-08-03 11:17:36 +01:00
Zhi Yong Wu 0f1b583ee7 HMP: Remove the duplicated info "info kvm" in hmp-commands.hx.
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-08-03 11:17:36 +01:00
Brad d41a75a20f configure: display "no" for disabled kvm/vhost-net
Fix configure display for non-Linux OS's and the KVM /
vhost-net features to show "no" output instead of nothing
at the end of the line.

Signed-off-by: Brad Smith <brad@comstyle.com>
Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-08-03 11:17:36 +01:00
Peter A. G. Crosthwaite 927d721777 microblaze: Add missing call to qemu_init_vcpu.
Fixes emulation with io-thread.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-07-31 06:40:13 +02:00
Blue Swirl 2ec00650f6 TCG: fix breakage by previous patch
Fix incorrect logic and typos in previous commit
1bfd07bdfe.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-30 18:54:23 +00:00
Blue Swirl 1bfd07bdfe TCG: fix breakage on some RISC hosts
Fix breakage by a640f03178
and 55c0975c5b.

Some TCG targets don't implement all TCG ops, so make
optimizing those conditional.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-30 12:21:33 +00:00
Kirill Batuzov a640f03178 Do constant folding for unary operations.
Perform constant folding for NOT and EXT{8,16,32}{S,U} operations.

Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-30 10:51:30 +00:00
Kirill Batuzov 55c0975c5b Do constant folding for shift operations.
Perform constant forlding for SHR, SHL, SAR, ROTR, ROTL operations.

Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-30 10:51:29 +00:00
Kirill Batuzov 9a81090b12 Do constant folding for boolean operations.
Perform constant folding for AND, OR, XOR operations.

Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-30 10:51:29 +00:00
Kirill Batuzov 53108fb574 Do constant folding for basic arithmetic operations.
Perform actual constant folding for ADD, SUB and MUL operations.

Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-30 10:51:28 +00:00
Kirill Batuzov 22613af4a6 Add copy and constant propagation.
Make tcg_constant_folding do copy and constant propagation. It is a
preparational work before actual constant folding.

Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-30 10:51:27 +00:00
Kirill Batuzov 8f2e8c07a6 Add TCG optimizations stub
Added file tcg/optimize.c to hold TCG optimizations. Function tcg_optimize
is called from tcg_gen_code_common. It calls other functions performing
specific optimizations. Stub for constant folding was added.

Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-30 10:51:25 +00:00
Blue Swirl 3e4571724f exec.h cleanup
Move softmmu_exec.h include directives from target-*/exec.h to
target-*/op_helper.c. Move also various other stuff only used in
op_helper.c there.

Define global env in dyngen-exec.h.

For i386, move wrappers for segment and FPU helpers from user-exec.c
to op_helper.c. Implement raise_exception_err_env() to handle dynamic
CPUState. Move the function declarations to cpu.h since they can be
used outside of op_helper.c context.

LM32, s390x, UniCore32: remove unused cpu_halted(), regs_to_env() and
env_to_regs().

ARM: make raise_exception() static.

Convert
#include "exec.h"
to
#include "cpu.h"
#include "dyngen-exec.h"
and remove now unused target-*/exec.h.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-30 09:41:14 +00:00
Michael Tokarev 104bf02eb5 revamp acpitable parsing and allow to specify complete (headerful) table
This patch almost rewrites acpi_table_add() function
(but still leaves it using old get_param_value() interface).
The result is that it's now possible to specify whole table
(together with a header) in an external file, instead of just
data portion, with a new file= parameter, but at the same time
it's still possible to specify header fields as before.

Now with the checkpatch.pl formatting fixes, thanks to
Stefan Hajnoczi for suggestions, with changes from
Isaku Yamahata, and with my further refinements.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Cc: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: John Baboval <john.baboval@virtualcomputer.com>
Cc: Blue Swirl <blauwirbel@gmail.com>
[yamahata@valinux.co.jp: fix compile error, comment fallthrough]
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-30 09:33:31 +00:00
Tsuneo Saito 638737ad03 SPARC64: implement %fprs dirty bits
Implement %fprs.DU/DL bits.
The FPU sets %fprs.DL and %fprs.DU when values are assigned to %f0-31
and %f32-63 respectively.

Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-30 08:26:45 +00:00
Tsuneo Saito ccb57e0ea7 SPARC64: fix fnor* and fnand*
Fix the problem that result values are not assigned to the destination
registers.

Signed-off-by: Tsuneo Saito <tsnsaito@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-07-30 08:26:45 +00:00
Vincent Palatin 5e37141bbb sd: do not add one sector to the disk size
This leads to random off-by-one error.
When the size of the SD is exactly 1GB, the emulation was returning a
wrong SDHC CSD descriptor.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-07-30 07:26:40 +02:00
Peter Maydell 4b5dfd8246 user: Restore debug usage message for '-d ?' in user mode emulation
The code which prints the debug usage message on '-d ?' for *-user
has to come before the check for "not enough arguments", so that
"qemu-foo -d ?" prints the list of possible debug log items rather than
the generic usage message. (This was inadvertently broken in commit
c235d73.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-07-30 07:20:18 +02:00
Jan Kiszka 8534b8ba33 usb-hid: Fix 0/0 position for Windows in tablet mode
For unknown reasons, Windows drivers (tested with XP and Win7) ignore
usb-tablet events that move the pointer to 0/0. So always report 0/0 as
1/0.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-07-30 07:18:41 +02:00
Vasily Khoruzhick 3bf11207c0 Add support for Zipit Z2 machine
Zipit Z2 is small PXA270 based handheld.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-07-30 07:08:30 +02:00
Andrzej Zaborowski 63efb1d9c4 onenand: Add missing brace.
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-07-30 06:53:39 +02:00
Juha Riihimäki f1588dd26c hw/onenand: program actions can only clear bits
The program actions onenand_prog_main() and onenand_prog_spare()
can only set bits.

This implies a rewrite of onenand_erase() to not use the program
functions, since erase does need to set bits.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
[Peter Maydell: More fixes and cleanups for upstream submission]
Signed-off-by:  Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-07-30 06:42:31 +02:00
Juha Riihimäki 5923ba424b onenand: Handle various ID fields separately
Handle the manufacturer, device and version IDs separately rather than
smooshing them all together into a single uint32_t. Note that the ID
registers are actually 16 bit, even though typically the top bits are 0
and the Read Identification Data command only returns the bottom 8 bits.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
[Peter Maydell: More fixes and cleanups for upstream submission]
Signed-off-by:  Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-07-30 06:42:16 +02:00
Peter Maydell af5a75f41c onenand: Pass BlockDriverState to init function
Pass the BlockDriverState to the onenand init function so it doesn't
need to look up the drive itself.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-07-30 06:42:03 +02:00
Juha Riihimäki d4220389ff hw/nand: qdevify
Qdevify the NAND device.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
[Peter Maydell: More fixes and cleanups for upstream submission]
Signed-off-by:  Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-07-30 06:21:31 +02:00
Peter Maydell 89f640bc04 hw/nand: Writing to NAND can only clear bits
Writing to a NAND device cannot set bits, it can only clear them;
implement this rather than simply copying the data.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-07-30 06:11:24 +02:00
Juha Riihimäki d72245fbcf hw/nand: Support multiple reads following READ STATUS
After receiving READ STATUS command all subsequent IO reads should return
the status register value until another command is issued.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
[Peter Maydell: More fixes and cleanups for upstream submission]
Signed-off-by:  Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-07-30 06:10:06 +02:00
Juha Riihimäki 48197dfa6a hw/nand: Support devices wider than 8 bits
Support NAND devices which are wider than 8 bits.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
[Peter Maydell: More fixes and cleanups for upstream submission]
Signed-off-by:  Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-07-30 06:09:32 +02:00
Andrzej Zaborowski ac2466cdc6 nand: Bump vmstate version after changing structure.
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-07-30 06:01:37 +02:00
Juha Riihimäki d5f2fd586f hw/nand: Support large NAND devices
Add support for NAND devices of over 1Gb.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
[Peter Maydell: More fixes and cleanups for upstream submission]
Signed-off-by:  Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-07-30 06:00:48 +02:00
Peter Maydell 522f253ca8 hw/nand: Pass block device state to init function
Pass the BlockDeviceState to the nand_init() function rather
than having it look it up via drive_get() itself.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-07-30 06:00:45 +02:00
Peter Maydell c4f05c8cf7 lm832x: Take DeviceState pointer in lm832x_key_event()
Since lm832x has been qdev'ified, its users will generally
have a DeviceState pointer rather than an i2c_slave pointer,
so adjust lm832x_key_event's prototype to suit.

This allows the n810 (its only user) to actually pass a correct
pointer to it rather than NULL. The effect is that we no longer
segfault when a key is pressed.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-07-30 06:00:42 +02:00
Juha Riihimäki 77831c204f hw/omap_gpio.c: Convert to qdev
Convert the OMAP GPIO module to qdev.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
[Peter Maydell: More fixes and cleanups for upstream submission]
Signed-off-by:  Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-07-30 06:00:40 +02:00
Peter Maydell 0a34f96690 hw/omap_clk: Add the clock for the OMAP2430-specific fifth GPIO module
The OMAP2430 has a fifth GPIO module which earlier OMAP2 models lack; add
the clock definition for it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-07-30 06:00:38 +02:00
Juha Riihimäki f9049203d3 hw/omap_l4.c: Add helper function omap_l4_region_base
Add helper function omap_l4_region_base() to return the base address
of a particular region of an L4 target agent.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
[Riku Voipio: Fixes and restructuring patchset]
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
[Peter Maydell: More fixes and cleanups for upstream submission]
Signed-off-by:  Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2011-07-30 06:00:33 +02:00
Anthony Liguori 64de0e46c0 Merge remote-tracking branch 'stefanha/trivial-patches' into staging 2011-07-29 09:46:16 -05:00
Anthony Liguori 23487df884 Merge remote-tracking branch 'alon/pull-libcacard.afe' into staging 2011-07-29 09:43:36 -05:00
Anthony Liguori 3046c98404 Merge remote-tracking branch 'agraf/xen-next' into staging 2011-07-29 09:42:12 -05:00
Anthony Liguori e374560232 Merge remote-tracking branch 'kraxel/migration.2' into staging 2011-07-29 09:39:37 -05:00
TeLeMan c62f6d1d76 monitor: fix build breakage with --disable-vnc
The breakage was introduced by the commit 1366108981

Signed-off-by: TeLeMan <geleman@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-07-29 09:33:56 -05:00
Jan Kiszka 2645c6dcaf Allow to leave type on default in -machine
This allows to specify -machine options without setting an explicit
machine type. We will pick the default machine in this case. Requesting
the list of available machines is still possible via '-machine ?' e.g.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-07-29 09:33:56 -05:00
Avi Kivity 5f070c5fb7 CODING_STYLE: explicitly allow braceless 'else if'
It's already allowed by the example; there are about 1800 instances in the
tree; and disallowing it would lead to

    if (a) {
        ...
    } else {
        if (b) {
            ...
        } else {
            if (c) {
                ...
            } else {
                if (d) {
                    ...
                } else {
                    ...
                }
            }
        }
    }

instead of

    if (a) {
        ...
    } else if (b) {
        ...
    } else if (c) {
        ...
    } else if (d) {
        ...
    } else {
        ...
    }

which is more readable.

Acked-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-07-29 09:33:56 -05:00
Stefan Berger ecf169b7fa Fix a compilation error in xen-mapcache.c
This patch fixes a compilation error in xen-mapcache.c .

/home/stefanb/qemu/qemu-git/xen-mapcache.c: In function ‘xen_ram_addr_from_mapcache’:
/home/stefanb/qemu/qemu-git/xen-mapcache.c:240:42: error: variable ‘pentry’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-07-29 09:33:56 -05:00
Göran Weinholt 6b8273a1b9 multiboot: Fix bss segment support
Multiboot images can specify a bss segment. The boot loader must clear
the memory of the bss and ensure that no modules or structures are
allocated inside it. Several fields are provided in the Multiboot
header that were previously not used properly. The header is now used
to determine how much data should be read from the image and how much
memory should be reserved to the bss segment.

Signed-off-by: Göran Weinholt <goran@weinholt.se>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-07-29 09:33:56 -05:00
Alon Levy 1ece990574 configure: add --disable-zlib-test
This is required for building libcacard which doesn't itself require
zlib without bringing in this requirement to the build environment.

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-07-29 09:33:56 -05:00
Jes Sorensen c7f4111a06 Add missing trace call to oslib-posix.c:qemu_vmalloc()
Acked-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-07-29 09:33:48 -05:00
Dr. David Alan Gilbert 33fa8234c3 Fix last sector write on sd card
When writing the last sector of an SD card using WRITE_MULTIPLE_BLOCK
QEmu throws an error saying that we've run off the end, and leaves
itself in the wrong state.

    Tested on ARM Vexpress model.

Signed-off-by: Dr. David Alan Gilbert <david.gilbert@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-07-29 09:33:48 -05:00
Paolo Bonzini cbbab9226d move unaligned memory access functions to bswap.h
This is just code movement, and moving the fpu/ include path from
target-dependent to target-independent Make variables.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-07-29 08:25:45 -05:00
Paolo Bonzini 789ec7ce20 softfloat: change default nan definitions to variables
Most definitions in softfloat.h are really target-independent, but the
file is not because it includes definitions of the default NaN values.
Change those to variables to allow including softfloat.h from files that
are not compiled per-target.  By making them const, the compiler is
allowed to optimize them into softfloat functions that use them.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-07-29 08:25:45 -05:00
Paolo Bonzini 332ae28dad move WORDS_ALIGNED to qemu-common.h
This is not a CPU interface, and a configure test would not be too
precise.  So just add it to qemu-common.h.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-07-29 08:25:45 -05:00