Statistics
| Branch: | Revision:

root @ 640e5404

# Date Author Comment
43c20a43 07/21/2011 10:48 pm Michael Roth

qapi: add QMP command registration/lookup functions

Registration/lookup functions for that provide a lookup table for
dispatching QMP commands.

Signed-off-by: Michael Roth <>
Signed-off-by: Luiz Capitulino <>

ab02ab2a 07/21/2011 10:48 pm Michael Roth

qapi: add QMP dispatch functions

Given an object recieved via QMP, this code uses the dispatch table
provided by qmp_registry.c to call the corresponding marshalling/dispatch
function and format return values/errors for delivery to the QMP.
Currently only synchronous QMP functions are supported, but this will...

e89ac222 07/21/2011 10:48 pm Michael Roth

qapi: add ordereddict.py helper library

We need this to parse dictionaries with schema ordering intact so that C
prototypes can be generated deterministically.

Signed-off-by: Michael Roth <>
Signed-off-by: Luiz Capitulino <>

0f923be2 07/21/2011 10:48 pm Michael Roth

qapi: add qapi.py helper libraries

Signed-off-by: Michael Roth <>
Signed-off-by: Luiz Capitulino <>

fb3182ce 07/21/2011 10:48 pm Michael Roth

qapi: add qapi-types.py code generator

This is the code generator for qapi types. It will generation the
following files:

$(prefix)qapi-types.h - C types corresponding to types defined in
the schema you pass in
$(prefix)qapi-types.c - Cleanup functions for the above C types...
06d64c62 07/21/2011 10:48 pm Michael Roth

qapi: add qapi-visit.py code generator

This is the code generator for qapi visiter functions used to
marshal/unmarshal/dealloc qapi types. It generates the following 2
files:

$(prefix)qapi-visit.c: visiter function for a particular c type, used
to automagically convert qobjects into the...
c17d9908 07/21/2011 10:48 pm Michael Roth

qapi: add qapi-commands.py code generator

This is the code generator for qapi command marshaling/dispatch.
Currently only generators for synchronous qapi/qmp functions are
supported. This script generates the following files:

$(prefix)qmp-marshal.c: command marshal/dispatch functions for each...
501e5104 07/21/2011 10:48 pm Michael Roth

qapi: test schema used for unit tests

This is how QMP commands/parameters/types would be defined. We use a
subset of that functionality here to implement functions/types for unit
testing.

Signed-off-by: Michael Roth <>
Signed-off-by: Luiz Capitulino <>

640e5404 07/21/2011 10:48 pm Michael Roth

qapi: add test-visitor, tests for gen. visitor code

Signed-off-by: Michael Roth <>
Signed-off-by: Luiz Capitulino <>

5c026320 07/21/2011 10:48 pm Luiz Capitulino

Introduce compiler.h header file

This moves compiler related macros from qemu-common.h to compiler.h.

The reason for this change is that there are simple header files that
depend only on the compiler macros, so including qemu-common.h is overkill.

Besides, qemu-common.h is bloated and will benefit from some splitting....

d3608b7c 07/21/2011 10:48 pm Luiz Capitulino

Error: Fix build when qemu-common.h is not included

Commit e4ea5e2d0e0e4c5188ab45b66f3195062ae059dc added the use of
the macro GCC_FMT_ATTR to error.h, however compiler.h is not
included by error.h

This will cause a build error when files including error.h...

e18df141 07/21/2011 10:48 pm Anthony Liguori

Add hard build dependency on glib

GLib is an extremely common library that has a portable thread implementation
along with tons of other goodies.

GLib and GObject have a fantastic amount of infrastructure we can leverage in
QEMU including an object oriented programming infrastructure....

54d83804 07/21/2011 10:48 pm Michael Roth

qlist: add qlist_first()/qlist_next()

Signed-off-by: Michael Roth <>
Signed-off-by: Luiz Capitulino <>

c7aa841e 07/21/2011 10:48 pm Michael Roth

qapi: add module init types for qapi

Signed-off-by: Michael Roth <>
Signed-off-by: Luiz Capitulino <>

2345c77c 07/21/2011 10:48 pm Michael Roth

qapi: add QAPI visitor core

Base definitions/includes for Visiter interface used by generated
visiter/marshalling code.

Includes a GenericList type. Our lists require an embedded element.
Since these types are generated, if you want to use them in a different...

c40cc0a0 07/21/2011 10:48 pm Michael Roth

qapi: add QMP input visitor

A type of Visiter class that is used to walk a qobject's
structure and assign each entry to the corresponding native C type.
Command marshaling function will use this to pull out QMP command
parameters recieved over the wire and pass them as native arguments...

e4e6aa14 07/21/2011 10:48 pm Michael Roth

qapi: add QMP output visitor

Type of Visiter class that serves as the inverse of the input visitor:
it takes a series of native C types and uses their values to construct a
corresponding QObject. The command marshaling/dispatcher functions will
use this to convert the output of QMP functions into a QObject that can...

d5f3c29c 07/21/2011 10:48 pm Michael Roth

qapi: add QAPI dealloc visitor

Type of Visitor class that can be passed into a qapi-generated C
type's visitor function to free() any heap-allocated data types.

Signed-off-by: Michael Roth <>
Signed-off-by: Luiz Capitulino <>

d967b2f1 07/21/2011 10:48 pm Jes Sorensen

QMP: add snapshot-blkdev-sync command

Add QMP bits for snapshot_blkdev command. This is the same as
snapshot_blkdev in the human monitor. The command is synchronous.

In the future async commands and or a break down of the functionality
into multiple commands might be added....

6c916eda 07/21/2011 01:06 am Blue Swirl

Update OpenBIOS images for Sparc32 and Sparc64

Update Sparc32 and Sparc64 OpenBIOS images to SVN revision 1045.

Signed-off-by: Blue Swirl <>

b14ef7c9 07/21/2011 12:28 am Blue Swirl

Fix unassigned memory access handling

cea5f9a28faa528b6b1b117c9ab2d8828f473fef exposed bugs in unassigned memory
access handling. Fix them by always passing CPUState to the handlers.

Reported-by: Hervé Poussineau <>
Signed-off-by: Blue Swirl <>

21673cde 07/21/2011 12:22 am Blue Swirl

Avoid CPU endian memory accesses in devices

Don't compile virtio.c in hwlib, it depends on memory accesses
performed in CPU endianness.

Make loads and stores in CPU endianness unavailable to devices
and poison them to avoid further bugs.

Acked-by: Alexander Graf <>...

b5176d27 07/21/2011 12:11 am Tsuneo Saito

SPARC64: treat UA2007 ASI_BLK_* as translating ASIs.

UA2007 ASI_BLK_* should be added in is_translating_asi().

Signed-off-by: Tsuneo Saito <>
Acked-by: Artyom Tarasenko <>
Signed-off-by: Blue Swirl <>

d0510af2 07/21/2011 12:07 am Blue Swirl

checkpatch: Fix bracing false positives on #if

789f88d0b21fedfd4251d56bb7a9fbfbda7a4ac7 only fixed #else,
fix also #if.

Reviewed-by: Stefan Hajnoczi <>
Signed-off-by: Blue Swirl <>

ea15fb06 07/21/2011 12:03 am Stefan Weil

tcg/mips: Fix regression caused by typo (copy + paste bug)

cppcheck reports an error:
qemu/tcg/mips/tcg-target.c:1487: error: Invalid number of character (()

The unpatched code won't compile on mips hosts starting with commit
cea5f9a28faa528b6b1b117c9ab2d8828f473fef....

cd3e2409 07/20/2011 11:54 pm Hervé Poussineau

ds1225y: convert to qdev device, and use it in MIPS Jazz emulation

Signed-off-by: Hervé Poussineau <>
Signed-off-by: Blue Swirl <>

d43ed9ec 07/20/2011 11:54 pm Hervé Poussineau

ds1225y: use trace framework

Signed-off-by: Hervé Poussineau <>
Signed-off-by: Blue Swirl <>

86f25c7c 07/20/2011 11:54 pm Hervé Poussineau

ds1225y: Remove protection stuff, which doesn't belong to this device

Signed-off-by: Hervé Poussineau <>
Signed-off-by: Blue Swirl <>

b7d69dc2 07/20/2011 11:44 pm Tsuneo Saito

SPARC64: add missing break on fmovdcc

"break" is missing on V9 fmovdcc (%icc).

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

afcb7375 07/20/2011 11:44 pm Tsuneo Saito

SPARC64: fix VIS1 SIMD signed compare instructions

The destination registers of SIMD signed compare instructions
(fcmp*<16|32>) are not FP registers but general purpose r registers.
Comparisons should be freg_rs1 CMP freg_rs2, that were reversed.

Signed-off-by: Tsuneo Saito <>...

a3ce3668 07/20/2011 11:23 pm Blue Swirl

Merge branch 'for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm

  • 'for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm:
    target-arm: Fix BASEPRI, BASEPRI_MAX, and FAULTMASK access
    target-arm: Minimal implementation of performance counters...
03ff0958 07/19/2011 04:04 pm Anthony Liguori

Merge remote-tracking branch 'agraf/xen-next' into staging

b4dabf95 07/19/2011 04:03 pm Anthony Liguori

Merge remote-tracking branch 'kraxel/usb.19' into staging

de20fbca 07/19/2011 04:02 pm Anthony Liguori

Merge remote-tracking branch 'spice/spice.v38' into staging

67345294 07/19/2011 03:43 pm Anthony Liguori

Merge remote-tracking branch 'mst/for_anthony' into staging

81773a50 07/19/2011 03:43 pm Anthony Liguori

Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging

95c9cde2 07/18/2011 01:00 pm Amit Shah

virtio-serial-bus: Fix trailing \n in error_report string

Markus fixed offenders in the file but one instance sneaked in via
another patch. Fix it.

Signed-off-by: Amit Shah <>

0219d732 07/18/2011 01:00 pm Amit Shah

virtio-console: Prevent abort()s in case of host chardev close

A host chardev could close just before the guest sends some data to be
written. This will cause an -EPIPE error. This shouldn't be propagated
to virtio-serial-bus.

Ideally we should close the port once -EPIPE is received, but since the...

49e3fdd7 07/18/2011 01:00 pm Amit Shah

virtio-serial-bus: Add trace events

Add some trace events for messages passed between the guest and host.

Signed-off-by: Amit Shah <>

d02e4fa4 07/18/2011 01:00 pm Amit Shah

virtio-console: Add some trace events

Add some trace events for messages passed between the char layer and the
virtio-serial bus.

Signed-off-by: Amit Shah <>

33d5ad53 07/17/2011 06:47 pm Michael S. Tsirkin

pci_ids: tweak names to match linux/pci_ids.h

Sync xen names to ones used by linux. Add
xen platform device id as well.

Signed-off-by: Michael S. Tsirkin <>

ce4fd422 07/17/2011 06:47 pm Anthony PERARD

hw/piix_pci.c: Fix PIIX3-xen to initialize ids

Signed-off-by: Anthony PERARD <>
Signed-off-by: Michael S. Tsirkin <>

0d2b962d 07/17/2011 06:47 pm Michael S. Tsirkin

xen: move to new pci initializers

move ids to pci info structure

Signed-off-by: Michael S. Tsirkin <>

c8eac1cf 07/17/2011 06:47 pm Michael S. Tsirkin

virtio: fix indirect descriptor buffer overflow

We were previously allowing arbitrarily-long indirect descriptors, which
could lead to a buffer overflow in qemu-kvm process.

CVE-2011-2212

Signed-off-by: Michael S. Tsirkin <>

c1be973a 07/17/2011 06:47 pm Michael S. Tsirkin

vhost: fix double free on device stop

vhost dev stop failed to clear the log field.
Typically not an issue as dev start overwrites this field,
but if logging gets disabled before the following start,
it doesn't so this causes a double free.

Signed-off-by: Michael S. Tsirkin <>

5e6b701a 07/17/2011 02:54 am Stefano Stabellini

xen_console: fix memory leak

con_init leaks the string "type", fix it.

Signed-off-by: Stefano Stabellini <>
Signed-off-by: Alexander Graf <>

37cdfcf1 07/17/2011 02:54 am Stefano Stabellini

xen: add vkbd support for PV on HVM guests

Register the vkbd backend even when running as device emulator for HVM
guests: it is useful because it doesn't need a frequent timer like usb.

Check whether the XenInput DisplayState has been set in the initialise...

5ea3c2b4 07/17/2011 02:54 am Stefano Stabellini

xen_disk: cope with missing xenstore "params" node

When disk is a cdrom and the drive is empty the "params" node in
xenstore might be missing completely: cope with it instead of
segfaulting.

Updated in v2:

- actually removed the strchr(blkdev->params, ':') that caused the...

8ab934f9 07/17/2011 02:54 am Stefano Stabellini

qemu_ram_ptr_length: take ram_addr_t as arguments

qemu_ram_ptr_length should take ram_addr_t as argument rather than
target_phys_addr_t because is doing comparisons with RAMBlock addresses.

cpu_physical_memory_map should create a ram_addr_t address to pass to...

7cef3f4f 07/17/2011 02:54 am Stefano Stabellini

xen_disk: treat "aio" as "raw"

Sometimes the toolstack uses "aio" without an additional format
identifier, in such cases use "raw".

Updated in v2:

- fix code style.

Signed-off-by: Stefano Stabellini <>
Signed-off-by: Alexander Graf <>

9fbe4784 07/17/2011 02:54 am Alexander Graf

checkpatch: don't error out on },{ lines

When having code like this:

static PCIDeviceInfo piix_ide_info[] = {
    {
.qdev.name = "piix3-ide",
.qdev.size = sizeof(PCIIDEState),
.qdev.no_user = 1,
.no_hotplug = 1,...
0f51726a 07/17/2011 02:54 am Stefano Stabellini

xen_console: support the new extended xenstore protocol

Since CS 21994 on xen-unstable.hg and CS
466608f3a32e1f9808acdf832a5843af37e5fcec on qemu-xen-unstable.git, few
changes have been introduced to the PV console xenstore protocol, as
described by the document docs/misc/console.txt under xen-unstable.hg....

25a11813 07/17/2011 02:54 am Alexander Graf

xen_console: fall back to qemu serial device

The new xen_console protocol changed the default xen_console output device
from whatever Qemu chose to whatever xenstore choses and "pty" as fallback.

This is not how Qemu works. It has its own serial redirection semantics. So...

6dbd588a 07/17/2011 02:54 am Jan Kiszka

xen: Clean up build system

Introduce CONFIG_XEN_BACKEND so that this new config solely controls the
target-independent backend build and CONFIG_XEN can focus on per-target
building.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Alexander Graf <>

e41d7c69 07/17/2011 02:54 am Jan Kiszka

xen: Clean up map cache API naming

The map cache is a Xen thing, so its API should make this clear.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Alexander Graf <>

868bb33f 07/17/2011 02:54 am Jan Kiszka

xen: Fold CONFIG_XEN_MAPCACHE into CONFIG_XEN

Xen won't be enabled if there is no backend support available for the
host. And that also means the map cache will work. So drop the separate
config switch and move the required stubs over to xen-stub.c.

Signed-off-by: Jan Kiszka <>...

ad35a7da 07/17/2011 02:54 am Stefano Stabellini

xen: enable console and disk backend in HVM mode

Initialize the Xen console backend and the Xen disk backend even when
running in HVM mode so that PV on HVM drivers can connect to them.

Signed-off-by: Stefano Stabellini <>...

89b9ba66 07/16/2011 10:43 pm Alexandre Raymond

Fix signal handling of SIG_IPI when io-thread is enabled

Both the signal thread (via sigwait()) and the cpu thread (via
a normal signal handler) were attempting to catch SIG_IPI.

This resulted in random freezes under Darwin.

This patch separates SIG_IPI from the rest of the signals handled...

5664aed9 07/16/2011 10:41 pm Alexandre Raymond

Fix signal handling when io-thread is disabled

Changes since v1:
- take pthread_sigmask() out of the ifdef as it is now common
to both parts.

This fix effectively blocks, in the main thread, the signals handled
by signalfd or the compatibility signal thread....

107a47cc 07/16/2011 04:17 pm Peter Maydell

tcg/README: Expand advice on number of TCG ops per target insn

Expand the note on the number of TCG ops generated per target insn,
to be clearer about the range of applicability of the 20 op rule
of thumb. Also add a note about the hard MAX_OP_PER_INSTR limit....

cf973e46 07/14/2011 08:41 pm Artyom Tarasenko

set ELF_HWCAP for SPARC and SPARC64

setting ELF_HWCAP fixes dynamic library loading for Linux/sparc64
This patch allows loading busybox from Debian 6 initrd

Signed-off-by: Artyom Tarasenko <>
Signed-off-by: Blue Swirl <>

f838e2c5 07/14/2011 08:30 pm Blue Swirl

Sparc: fix FPU and AM enable checks for translation

Translation used incorrectly CPUState fields directly to check
for FPU enable state and 32 bit address masking on Sparc64.

Fix by using TB flags instead.

Signed-off-by: Blue Swirl <>

d8e586ff 07/14/2011 06:36 pm Tsuneo Saito

SPARC64: C99 comment fix for block-transfer ASIs

Fixed C99 comments on block-tranfer ASIs.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

d920bde9 07/14/2011 06:36 pm Tsuneo Saito

SPARC64: Add JPS1 ASI_BLK_AIU[PS]L ASIs for ldfa and stfa

Support JPS1 little endian block transfer ASIs.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

073a0444 07/14/2011 06:36 pm Tsuneo Saito

SPARC64: Add UA2007 ASI_BLK_AIU[PS]L? ASIs for stfa

Support UA2007 block store ASIs for stfa instructions.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

41317e2e 07/14/2011 06:36 pm Tsuneo Saito

SPARC64: Add UA2007 ASI_BLK_AIU[PS]L? ASIs for ldfa

Support UA2007 block load ASIs for ldfa instructions.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

5f06b547 07/14/2011 06:36 pm Tsuneo Saito

SPARC64: fp_disabled checks on stfa/stdfa/stqfa

stfa/stdfa/stqfa instructions should raise fp_disabled exceptions
if %pstate.PEF==0 or %fprs.FEF==0.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

e1ef36c4 07/14/2011 06:36 pm Tsuneo Saito

SPARC64: Implement stfa/stdfa/stqfa instrcutions properly

This patch implements sparcv9 stfa/stdfa/stqfa instructions
with non block-store ASIs.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

8872eb4f 07/14/2011 06:35 pm Tsuneo Saito

SPARC64: fp_disabled checks on ldfa/lddfa/ldqfa

ldfa/lddfa/ldqfa instructions should raise fp_disabled exceptions
if %pstate.PEF==0 or %fprs.FEF==0.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

4183f36d 07/14/2011 06:34 pm Tsuneo Saito

SPARC64: Implement ldfa/lddfa/ldqfa instructions properly

This patch implements sparcv9 ldfa/lddfa/ldqfa instructions
with non block-load ASIs.

Signed-off-by: Tsuneo Saito <>
Signed-off-by: Blue Swirl <>

6fea2ea4 07/13/2011 05:39 pm Peter Maydell

linux-user/signal.c: Rename s390 target_ucontext fields to fix ia64

The ia64 sys/ucontext.h defines macros 'uc_link', 'uc_sigmask' and
'uc_stack'. Rename the s390 target_ucontext struct members to tuc_*,
bringing them into line with the other targets and fixing a compile...

48e515d4 07/13/2011 05:38 pm Riku Voipio

linux-user: make MIPS and ARM eabi use same argument reordering

MIPS uses similar calling convention than ARM eabi, where when using
64-bit values some registers are skipped. This patch makes MIPS and ARM
eabi share the argument reordering code.

This affects ftruncate64, creating insane sized fails (or just failing)....

c3edf347 07/13/2011 05:11 pm Riku Voipio

linux-user: correct syscall 123 on sh4

As reported by Cédric VINCENT:

The syscall #123 on SH4 should be "TARGET_NR_cacheflush" instead of
"TARGET_NR_modify_ldt" [1]. The only consequence of this misnaming is
that many "Unsupported syscall" warnings are issued when emulating JIT...

cc4662f9 07/13/2011 12:41 am Stefan Hajnoczi

os-posix: set groups properly for -runas

Andrew Griffiths reports that -runas does not set supplementary group
IDs. This means that gid 0 (root) is not dropped when switching to an
unprivileged user.

Add an initgroups(3) call to use the -runas user's /etc/groups...

429bef69 07/13/2011 12:29 am Hervé Poussineau

esp: cancel current request only if some request is in flight

This bug was introduced in 94d3f98a3f3caddd7875f9a11776daeb84962a7b:
scsi_cancel_io was checking if some request was pending before trying
to cancel it, while scsi_req_cancel always cancels the request....

f5fc40bb 07/13/2011 12:01 am Peter Maydell

target-alpha, target-ppc: Remove unnecessary setjmp.h include

Remove the include of setjmp.h from the cpu.h of target-alpha
and target-ppc. This is unnecessary because cpu-defs.h already
includes this header; this change brings these two targets
into line with all the rest....

462df288 07/12/2011 11:57 pm Stefan Weil

Remove unneeded setjmp.h (fix compilation on Debian "lenny")

Some versions of png.h cannot be included after setjmp.h,
even when PNG_SKIP_SETJMP_CHECK was defined.

setjmp.h was included from qemu-common.h and is not needed there.
Removing the include statement fixes compilation of ui/vnc-enc-tight.c...

0d101938 07/12/2011 11:53 pm Jan Kiszka

tcg: Reload local variables after return from longjmp

Recent compilers look deep into cpu_exec, find longjmp as a noreturn
function and decide to smash some stack variables as they won't be used
again. This may lead to env becoming invalid after return from setjmp,...

5b620fb6 07/12/2011 11:29 pm Peter Maydell

exec-all.h: Make MAX_OP_PER_INSTR large enough for target-arm's uses

The target-arm frontend's worst-case TCG ops per instr is 194 (and in
general many of the "load multiple registers" ARM instructions generate
more than 100 TCG ops). Raise MAX_OP_PER_INSTR accordingly to avoid...

a884da8a 07/12/2011 11:29 pm Peter Maydell

exec.c: Fix calculation of code_gen_buffer_max_size

When calculating the point at which we should not try to put another
TB into the code gen buffer, we have to allow not just for OPC_MAX_SIZE
but OPC_BUF_SIZE. This is because the target translate.c will only...

06c46bba 07/12/2011 11:00 pm Alexander Graf

spapr: use specific endian ld/st_phys

Signed-off-by: Alexander Graf <>
Signed-off-by: Blue Swirl <>

04bc74ed 07/12/2011 11:00 pm Alexander Graf

s390-virtio: use specific endian ld/st_phys

Signed-off-by: Alexander Graf <>
Signed-off-by: Blue Swirl <>

db663d0f 07/12/2011 11:00 pm Alexander Graf

ppc405_uc: use specific endian ld/st_phys

Signed-off-by: Alexander Graf <>
Signed-off-by: Blue Swirl <>

75b0646f 07/12/2011 11:00 pm Alexander Graf

pl080: use specific endian ld/st_phys

Signed-off-by: Alexander Graf <>
Signed-off-by: Blue Swirl <>

ae5d3eb4 07/12/2011 11:00 pm Alexander Graf

msix: use specific endian ld/st_phys

Signed-off-by: Alexander Graf <>
Signed-off-by: Blue Swirl <>

c5d29d2f 07/12/2011 11:00 pm Alexander Graf

msi: use specific endian ld/st_phys

Signed-off-by: Alexander Graf <>
Signed-off-by: Blue Swirl <>

6c7796e5 07/12/2011 11:00 pm Alexander Graf

intel-hda: use specific endian ld/st_phys

Signed-off-by: Alexander Graf <>
Signed-off-by: Blue Swirl <>

8517263f 07/12/2011 11:00 pm Alexander Graf

hpet: use specific endian ld/st_phys

Signed-off-by: Alexander Graf <>
Signed-off-by: Blue Swirl <>

1e78bcc1 07/12/2011 11:00 pm Alexander Graf

exec: add endian specific phys ld/st functions

Device code some times needs to access physical memory and does that
through the ld./st._phys functions. However, these are the exact same
functions that the CPU uses to access memory, which means they will
be endianness swapped depending on the target CPU....

e22b7015 07/12/2011 02:42 pm Wesley W. Terpstra

mips: rlimit codes are not the same

The codes for get/setrlimit differ between linux target platforms.
This patch adds conversion.
This is important else programs (rsyslog, python, ...) can go into a
near infinite loop trying to close all the file descriptors from 0 to...

95b33b2f 07/12/2011 02:38 pm Wesley W. Terpstra

mips: rlimit incorrectly converts values

Byte swap was applied in the wrong order with testing for
RLIM_INFINITY. On mips bigendian from an amd64 system this results in
infinity being misinterpretted as 2^31-1.

This is a serious bug because it causes setrlimit stack size to kill...

e6e5bd2d 07/12/2011 02:34 pm Wesley W. Terpstra

mips: null pointer deref should segfault

Dereferencing a null pointer causes an exception 0xC (EXCP_AdEL)
instead of EXCP_TLBL. This should also trigger a segfault.

Signed-off-by: Wesley W. Terpstra <>
Signed-off-by: Riku Voipio <>

7c2f6157 07/12/2011 02:33 pm Wesley W. Terpstra

mips: missing syscall returns wrong errno

Return -TARGET_ENOSYS instead of -ENOSYS from linux-user/main.c * Caused strange 'Level 2 synchronization messages' instead of
correctly reporting the syscall was missing. * Made glibc simply fail instead of using older syscalls...

053ebb27 07/12/2011 02:32 pm Wesley W. Terpstra

mips: sigaltstack args

The syscall sigaltstack takes two parameters, not zero. This patch
should have no impact as only values above 4 influence the runtime
behaviour. Nevertheless, it is wrong.

Signed-off-by: Wesley W. Terpstra <>
Signed-off-by: Riku Voipio <>

8f04eeb3 07/11/2011 04:35 pm Peter Maydell

linux-user/syscall.c: Enforce pselect6 sigset size restrictions

Enforce the same restriction on the size of the sigset passed to
pselect6 as the Linux kernel does. This is both correct and silences
a gcc 4.6 warning about a write-only variable.

Signed-off-by: Peter Maydell <>...

163a05a8 07/11/2011 04:34 pm Peter Maydell

linux-user: Implement prlimit64 syscall

Implement the prlimit64 syscall.

Slightly modified to apply upstream -Riku

Signed-off-by: Peter Maydell <>
Signed-off-by: Riku Voipio <>

d979e8eb 07/11/2011 04:12 pm Peter Maydell

linux-user: Add syscall numbers from kernel 2.6.39.2

Add syscall numbers for new syscall numbers; this brings us
into line with Linux 2.6.39.2.

Signed-off-by: Peter Maydell <>
Signed-off-by: Riku Voipio <>

12b81b71 07/11/2011 04:12 pm Cédric VINCENT

linux-user: Add support for even more FB ioctls

This patch was validated with programs from DirectFB-1.0 and
WebKit/DirectFB.

Signed-off-by: Cédric VINCENT <>
Cc: Riku Voipio <>
Signed-off-by: Riku Voipio <>

774750c0 07/11/2011 04:10 pm Cédric VINCENT

linux-user: Add support for more VT ioctls

DirectFB-1.0 uses at least two of the four added ioctls, and the two
others were added for completeness. This patch was validated with the
program "vlock -all/-new".

Signed-off-by: Cédric VINCENT <>...

e6fe18fb 07/11/2011 04:06 pm Cédric VINCENT

linux-user: Add support for KD...LED ioctls

DirectFB-1.0 uses at least one of the four added ioctls, and the three
others were added for completeness. This patch was validated with the
program "setleds" and the following Makefile:

SETLEDS_INIT  = setleds -v -num -caps -scroll...