Statistics
| Branch: | Revision:

root / linux-user @ 93148aa5

# Date Author Comment
93148aa5 03/08/2012 05:22 pm Stefan Weil

Spelling fixes in comments (it's -> its)

  • it's -> its (fixed for all files)
  • dont -> don't (only fixed in a line which was touched by the previous fix)
  • distrub -> disturb (fixed in the same line)

Reviewed-by: Andreas Färber <>
Signed-off-by: Stefan Weil <>...

3a0c6c4a 02/10/2012 12:48 pm Paul Brook

linux-user: brk() debugging

Fix format type mismatches in do_brk debug printfs.

Signed-off-by: Paul Brook <>
Signed-off-by: Stefan Hajnoczi <>

a6f79cc9 02/10/2012 12:44 pm Ulrich Hecht

linux-user: fail execve() if env/args too big

If the host's page size is equal to or smaller than the target's, native
execve() will fail appropriately with E2BIG if called with too big an
environment for the target to handle. It may falsely succeed, however, if...

2aeb36a8 02/02/2012 05:51 pm Andreas Färber

linux-user: Define TARGET_QEMU_ESIGRETURN for mips64

Copied from mips/syscall.h.

Signed-off-by: Khansa Butt <>
Signed-off-by: Andreas Färber <>
Signed-off-by: Riku Voipio <>

f78b0f05 02/02/2012 05:51 pm Andreas Färber

linux-user: Fix sa_flags byte swaps for mips

sa_flags is uint32_t for mips{,n32,64}, so don't use tswapal().

edited by Riku Voipio: likewise on alpha

Reported-by: Khansa Butt <>
Suggested-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>...

36c08d49 02/02/2012 05:51 pm Alexander Graf

linux-user: fake /proc/self/maps

glibc's pthread_attr_getstack tries to find the stack range from
/proc/self/maps. Unfortunately, /proc is usually the host's /proc
which means linux-user guests see qemu's stack there.

Fake the file with a constructed maps entry that exposes the guest's...

480b8e7d 02/02/2012 05:51 pm Alexander Graf

linux-user: fake /proc/self/stat

The boehm gc finds the program's stack starting pointer by
checking /proc/self/stat. Unfortunately, so far it reads
qemu's stack pointer which clearly is wrong.

So let's instead fake the file so the guest program sees the...

257450ee 02/02/2012 05:51 pm Alexander Graf

linux-user: fake /proc/self/auxv

Gtk tries to read /proc/self/auxv to find its auxv table instead of
taking it from its own program memory space.

However, when running with linux-user, we see the host's auxv which
clearly exposes wrong information. so let's instead expose the guest...

50171d42 02/02/2012 05:51 pm 陳韋任

linux-user/main.c: Add option to user-mode emulation so that user can specify log file name

QEMU linux user-mode's default log file name is "/tmp/qemu.log". In order to
change the log file name, user need to modify the source code then recompile
QEMU. This patch allow user use "-D logfile" option to specify the log file...
583359a6 02/02/2012 05:51 pm Akos PASZTORY

linux-user: add SO_PEERCRED support for getsockopt

Signed-off-by: Akos PASZTORY <>
Signed-off-by: Riku Voipio <>

962b289e 02/02/2012 05:51 pm Alexander Graf

linux-user: fix QEMU_STRACE=1 segfault

While debugging some issues with QEMU_STRACE I stumbled over segmentation
faults that were pretty reproducible. Turns out we tried to treat a
normal return value as errno, resulting in an access over array boundaries...

2a7e1245 02/02/2012 05:51 pm Peter Maydell

linux-user/strace.c: Correct errno printing for mmap etc

Correct the printing of errnos for syscalls which are handled
via print_syscall_ret_addr (mmap, mmap2, brk, shmat): errnos
are returned as negative returned values at this level, not
via the host 'errno' variable....

5379557b 02/02/2012 05:51 pm Alexander Graf

linux-user: fix wait* syscall status returns

When calling wait4 or waitpid with a status pointer and WNOHANG, the
syscall can potentially not modify the status pointer input. Now if we
have guest code like:

int status = 0;
waitpid(pid, &status, WNOHANG);...
e3c33ec6 02/02/2012 05:51 pm Peter Maydell

linux-user: Allow NULL value pointer in setxattr and getxattr

It's valid to pass a NULL value pointer to setxattr, so don't
fail this case EFAULT.

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

30297b55 02/02/2012 05:51 pm Peter Maydell

linux-user/syscall.c: Implement f and l versions of set/get/removexattr

Implement the f and l versions (operate on fd, don't follow links)
of the setxattr, getxattr and removexattr syscalls.

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

fb5590f7 02/02/2012 05:51 pm Peter Maydell

linux-user: Implement *listxattr syscalls

Implement listxattr, flistxattr and llistxattr syscalls.

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

63249cb9 02/02/2012 05:51 pm Andreas Färber

linux-user: Define TARGET_QEMU_ESIGRETURN for mipsn32

Copied from mips/syscall.h.

Signed-off-by: Ulrich Hecht <>
Signed-off-by: Andreas Färber <>
Signed-off-by: Riku Voipio <>

125b0f55 02/02/2012 05:51 pm Alexander Graf

linux-user: save auxv length

We create our own AUXV segment on stack and save a pointer to it.
However we don't save the length of it, so any code that wants to
do anything useful with it later on has to walk it again.

Instead, let's remember the length of our AUXV segment. This...

3be14d05 02/02/2012 05:51 pm Alexander Graf

linux-user: add open() hijack infrastructure

There are a number of files in /proc that expose host information
to the guest program. This patch adds infrastructure to override
the open() syscall for guest programs to enable us to on the fly
generate guest sensible files....

d0fd11ff 02/02/2012 05:50 pm Riku Voipio

linux-user: stack_base is now mandatory on all targets

Signed-off-by: Riku Voipio <>

c7c530cd 01/10/2012 07:40 pm Stefan Weil

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...

e7d81004 12/14/2011 01:09 pm Stefan Weil

Fix spelling in comments, documentation and messages

accidently->accidentally
annother->another
choosen->chosen
consideres->considers
decriptor->descriptor
developement->development
paramter->parameter
preceed->precede
preceeding->preceding
priviledge->privilege...

31b63193 12/06/2011 12:08 pm Peter Maydell

linux-user/syscall.c: Don't skip stracing for fcntl64 failure case

In an fcntl64 failure path, we were returning directly rather than
simply breaking out of the switch statement. This skips the strace
code for printing the syscall return value, so don't do that....

75dfbc16 12/06/2011 12:05 pm Peter Maydell

linux-user/arm/nwfpe/fpopcode.h: Fix non-UTF-8 characters

Fix some stray non-UTF-8 characters used in some ASCII art tables
by converting them to plain ASCII '|' instead.

Reviewed-by: Stefan Weil <>
Signed-off-by: Peter Maydell <>...

7ff60e15 12/06/2011 12:04 pm Peter Maydell

linux-user/cpu-uname.c: Convert to UTF-8

Convert comment from ISO-8859-1 encoding to UTF-8 to match the rest
of QEMU's source code.

Reviewed-by: Stefan Weil <>
Signed-off-by: Peter Maydell <>
Signed-off-by: Stefan Hajnoczi <>

3a93113a 12/06/2011 11:56 am Dong Xu Wang

fix typo: delete redundant semicolon

Double semicolons should be single.

Signed-off-by: Dong Xu Wang <>
Signed-off-by: Stefan Hajnoczi <>

b4916d7b 12/02/2011 12:50 pm Dong Xu Wang

fix spelling in linux-user sub directory

Cc: Riku Voipio <>
Signed-off-by: Dong Xu Wang <>
Signed-off-by: Stefan Hajnoczi <>

7dd47667 11/11/2011 08:49 pm Peter Maydell

linux-user/elfload.c: Don't memset(NULL..) if malloc() failed

If a malloc() in copy_elf_strings() failed we would call memset()
before the "did malloc fail?" check. Fix this by moving to the
glib alloc/free routines for this memory so we can use g_try_malloc0...

4f26f2b6 11/09/2011 08:06 pm Avi Kivity

configure: fix detection for xattr.h on modern distributions

Modern distributions place xattr.h in /usr/include/sys, and fold
libattr.so into libc. They also don't have an ENOATTR.

Make configure detect this, and add a qemu-xattr.h file that
directs the #include to the right place....

ff74c5a9 10/31/2011 10:05 pm Anthony Liguori

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

8e78064e 10/27/2011 02:43 pm Richard Henderson

ppc64-linux-user: Properly interpret the entry function descriptor.

Don't confuse the load address with the load bias. They're equal
for ET_DYN objects (i.e. ld.so) but different for ET_EXEC objects
(i.e. statically linked).

Signed-off-by: Richard Henderson <>...

9e0e2f96 10/27/2011 02:43 pm Richard Henderson

ppc64-linux-user: Fix syscall return type.

Use target_ulong instead of hard-coded uint32_t.
Remove the disabled printf's that are redundant with -strace.

Signed-off-by: Richard Henderson <>
Signed-off-by: Riku Voipio <>

75f22e4e 10/27/2011 02:43 pm Richard Henderson

sparc-linux-user: Handle SIGILL.

Signed-off-by: Richard Henderson <>
Signed-off-by: Riku Voipio <>

59f7182f 10/27/2011 02:43 pm Richard Henderson

sparc-linux-user: Fixup sending SIGSEGV

Signed-off-by: Richard Henderson <>
Signed-off-by: Riku Voipio <>

7cd393ac 10/27/2011 02:43 pm Richard Henderson

sparc-linux-user: Add some missing syscall numbers

Signed-off-by: Richard Henderson <>
Signed-off-by: Riku Voipio <>

0f6b4d21 10/27/2011 02:42 pm Alexander Graf

linux-user: implement reboot syscall

For OBS, we're running a full cross-guest inside of a VM. When a build
is done there, we reboot the guest as shutdown mechanism.

Unfortunately, reboot is not implemented in linux-user. So this mechanism
fails, spilling unpretty warnings. This patch implements sys_reboot()...

26b746db 10/27/2011 02:42 pm Matthias Braun

linux-user: fix TARGET_RLIM_INFINITY declaration

Signed-off-by: Matthias Braun <>
Signed-off-by: Riku Voipio <>

6cafd027 10/27/2011 02:42 pm Matthias Braun

linux-user: fix rlimit syscalls on sparc(64)

Signed-off-by: Matthias Braun <>
Signed-off-by: Riku Voipio <>

cbb21eed 10/27/2011 02:42 pm Matthias Braun

linux-user: fix abi_(u)long, target_ulong mismatch

abi_(u)long might be different from target_ulong, so don't use tswapl
but introduce a new tswapal

Signed-off-by: Matthias Braun <>
Signed-off-by: Riku Voipio <>

f4c69010 10/27/2011 02:42 pm Alexander Graf

linux-user: fix openat

When running openat using qemu-arm, we stumbled over invalid permissions
on the created files. The reason for this is that the mode parameter gets
treates as an O_... flag, which it isn't - it's a permission bitmask.

This patch removes the needless translation of the mode parameter,...

30038fd8 10/26/2011 11:55 pm Richard Henderson

target-sparc: Change fpr representation to doubles.

This allows a more efficient representation for 64-bit hosts.
It should be about the same for 32-bit hosts, as we can still
access the individual pieces of the double.

Signed-off-by: Richard Henderson <>

1386d4c0 10/21/2011 06:59 pm Peter Maydell

linux-user: Fix broken "-version" option

Fix the "-version" option, which was accidentally broken in commit
fc9c541: * exit after printing version information rather than proceeding
blithely onward (and likely printing the full usage message) * correct the cut-n-paste error in the usage message for it...

ca8a277c 10/05/2011 11:26 am Stefan Weil

linux-user: Remove unused code

The code is unused since 8 years, so remove it.

Signed-off-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

11ddeea9 09/26/2011 03:59 pm Anthony Liguori

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

b2bedb21 09/16/2011 04:25 pm Stefan Weil

Remove blanks before \n in output strings

Those blanks violate the coding conventions, see
scripts/checkpatch.pl.

Blanks missing after colons in the changed lines were added.

This patch does not try to fix tabs, long lines and other
problems in the changed lines, therefore checkpatch.pl reports...

5a61cb60 09/09/2011 11:56 am Stefan Weil

Fix include statements for qemu-common.h

  • qemu-common.h is not a system include file, so it should be included
    with "" instead of <>. Otherwise incremental builds might fail
    because only local include files are checked for changes.
  • linux-user/syscall.c included the file twice....
fc9c5412 09/09/2011 10:48 am Johannes Schauer

introduce environment variables for all qemu-user options

(Edits by Riku Voipio to apply to current HEAD)

Rework option parsing code for linux-user in a table-driven manner to allow
environment variables for all commandline options.

Also generate usage() output from option table....

a790ae38 09/09/2011 10:48 am An-Cheng Huang

linux-user: Implement setxattr/getxattr/removexattr syscalls

This patch implements the setxattr, getxattr, and removexattr syscalls
if CONFIG_ATTR is enabled.

Note that since libattr uses indirect syscalls for these, this change
depends on the fix for indirect syscall handling on MIPS....

94c19610 09/09/2011 10:47 am An-Cheng Huang

linux-user: Verify MIPS syscall arguments

On MIPS, some syscall arguments are taken from the stack. This patch adds
verification such that do_syscall() is only invoked if all arguments
have been successfully taken from the stack.

Signed-off-by: Riku Voipio <>...

29fb0f25 09/09/2011 10:47 am An-Cheng Huang

linux-user: Fix MIPS indirect syscall handling

Change the number of argument for MIPS sys_syscall from 0 to 8. This
allows arguments for indirect syscalls to be processed correctly.

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

ff7a981a 09/09/2011 10:46 am Peter Maydell

linux-user: Exit with an error if we couldn't set up gdbserver

If gdbserver_start() fails (usually because we couldn't bind to the
requested TCP port) then exit qemu rather than blithely continuing.
This brings the linux-user behaviour in to line with system mode....

97cc7560 09/09/2011 10:46 am Dr. David Alan Gilbert

linux-user: Implement new ARM 64 bit cmpxchg kernel helper

linux-user: Implement new ARM 64 bit cmpxchg kernel helper

Linux 3.1 will have a new kernel-page helper for ARM implementing
64 bit cmpxchg. Implement this helper in QEMU linux-user mode: * Provide kernel helper emulation for 64bit cmpxchg...

70afc343 09/09/2011 10:45 am Cédric VINCENT

linux-user: Fix initialization of the heap contents when allocating new pages

Technically the new mmapped pages are already initialized to zero
since they are anonymous, however we have to take care with the
contents that come from the remaining part of the previous page: it...

541dc0d4 09/03/2011 01:45 pm Stefan Weil

Use new macro QEMU_PACKED for packed structures

Most changes were made using these commands:

git grep -la '__attribute__((packed))'|xargs perl -pi -e 's/__attribute__\(\(packed\)\)/QEMU_PACKED/'
git grep -la '__attribute__ ((packed))'|xargs perl -pi -e 's/__attribute__ \(\(packed\)\)/QEMU_PACKED/'...

cb9c6268 08/26/2011 08:59 am Edgar E. Iglesias

linux-user: Correct a few missuses of host addresses

Fix a few cases where we were passing host pointers to the
guest.

Signed-off-by: Edgar E. Iglesias <>

22a78d64 08/22/2011 07:47 pm Edgar E. Iglesias

microblaze-user: Deliver SIGFPE on div by zero

Signed-off-by: Edgar E. Iglesias <>

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

d5ab9713 08/05/2011 06:57 pm Jan Kiszka

Avoid allocating TCG resources in non-TCG mode

Do not allocate TCG-only resources like the translation buffer when
running over KVM or XEN. Saves a "few" bytes in the qemu address space
and is also conceptually cleaner.

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

4b5dfd82 07/30/2011 08:20 am Peter Maydell

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...

00aa0040 07/25/2011 05:38 pm Blue Swirl

Wrap recv to avoid warnings

Avoid warnings like these by wrapping recv():
CC slirp/ip_icmp.o
/src/qemu/slirp/ip_icmp.c: In function 'icmp_receive':
/src/qemu/slirp/ip_icmp.c:418:5: error: passing argument 2 of 'recv' from incompatible pointer type [-Werror]...

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

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

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 <>

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...

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...
1dfdcaa8 06/28/2011 09:57 pm Edgar E. Iglesias

user: Fix -d debug logging for usermode emulation

Signed-off-by: Edgar E. Iglesias <>

cd59dd87 06/27/2011 07:26 pm Anthony Liguori

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

2b41f10e 06/26/2011 09:25 pm Blue Swirl

Remove exec-all.h include directives

Most exec-all.h include directives are now useless, remove them.

Signed-off-by: Blue Swirl <>

bc088ba1 06/21/2011 08:30 pm Juan Quintela

linux-user: syscall should use sanitized arg1

Looking at the other architectures, we should be using "how" not "arg1".

Signed-off-by: Juan Quintela <>
[: remove unnecessary initialisation of how]
Signed-off-by: Peter Maydell <>...

e7730352 06/21/2011 08:30 pm Juan Quintela

flatload: end_code was only used in a debug message

Just unfold its definition in only use.

Signed-off-by: Juan Quintela <>
[: fixed typo in the debug code,
added parentheses to fix precedence issue]
Signed-off-by: Peter Maydell <>...

3002fa84 06/21/2011 08:30 pm Juan Quintela

flatload: memp was a write-only variable

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

5945cfcb 06/21/2011 08:30 pm Peter Maydell

linux-user: Bump do_syscall() up to 8 syscall arguments

On 32 bit MIPS a few syscalls have 7 arguments, and so to call
them via NR_syscall the guest needs to be able to pass 8 arguments
to do_syscall(). Raise the number of arguments do_syscall() takes
accordingly....

2aec3a27 06/21/2011 08:30 pm Peter Maydell

linux-user/signal.c: Remove only-ever-set variable fpu_save_addr

Move the access of fpu_save into the commented out skeleton code for
restoring FPU registers on SPARC sigreturn, thus silencing a gcc
4.6 "variable set but never used" warning.
(This doesn't affect the calculation of 'err' because in fact...

c7b016ba 06/21/2011 08:30 pm Peter Maydell

linux-user/signal.c: Remove unused fenab

Remove fenab as it is only written, never used. Add a FIXME
comment about the discrepancy between our behaviour and that
of the Linux kernel for this routine.

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

bfcedc57 06/21/2011 08:30 pm Riku Voipio

linux-user: Fix sync_file_range on 32bit mips

As noticed while looking at "Bump do_syscall() up to 8 syscall arguments"
patch, sync_file_range uses a pad argument on 32bit mips. Deal with it
by reading the correct arguments when on mips.

Signed-off-by: Riku Voipio <>

4d1de87c 06/21/2011 08:30 pm vincent

linux-user: Fix the computation of the requested heap size

There were several remaining bugs in the previous implementation of
do_brk():

1. the value of "new_alloc_size" was one page too large when the
requested brk was aligned on a host page boundary....
055e0906 06/21/2011 08:30 pm Mike Frysinger

linux-user: add pselect6 syscall support

Some architectures (like Blackfin) only implement pselect6 (and skip
select/newselect). So add support for it.

Signed-off-by: Mike Frysinger <>
Signed-off-by: Riku Voipio <>

14322bad 06/21/2011 08:30 pm Laurent ALFONSI

linux-user: Define AT_RANDOM to support target stack protection mechanism.

The dynamic linker from the GNU C library v2.10+ uses the ELF
auxiliary vector AT_RANDOM [1] as a pointer to 16 bytes with random
values to initialize the stack protection mechanism. Technically the...

331c23b5 06/21/2011 08:30 pm Juan Quintela

linuxload: id_change was a write only variable

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

1add8698 06/21/2011 08:30 pm Juan Quintela

syscall: really return ret code

We assign ret with the error code, but then return 0 unconditionally.

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

f3ed1f5d 06/21/2011 08:29 pm Peter Maydell

linux-user: Handle images where lowest vaddr is not page aligned

Fix a bug in the linux-user ELF loader code where it was not correctly
handling images where the lowest vaddr to be loaded was not page aligned.
The problem was that the code to probe for a suitable guest base address...

00faf08c 06/21/2011 08:29 pm Peter Maydell

linux-user: Don't use MAP_FIXED in do_brk()

Since mmap() with MAP_FIXED will map over the top of existing mappings,
it's a bad idea to use it to implement brk(), because brk() with a
large size is likely to overwrite important things like qemu itself
or the host libc. So we drop MAP_FIXED and handle "mapped but at...

b9475279 06/21/2011 08:28 pm Cédric VINCENT

linux-user: Fix the load of ELF files that have no "useful" symbol

This patch fixes a "double free()" due to "realloc(syms, 0)" in the
loader when the ELF file has no "useful" symbol, as with the following
example (compiled with "sh4-linux-gcc -nostdlib"):...

9a826d78 06/20/2011 05:00 pm Mike McCormack

Don't translate pointer when in restore_sigcontext

Fixes crash in i386 when user emulation base address is non-zero.

21797 rt_sigreturn(8,1082124603,1,0,1082126048,1082126248)Exit reason and status: signal 11

Signed-off-by: Mike McCormack <>...

c235d738 06/15/2011 07:51 pm Matthew Fernandez

Command line support for altering the log file location

Add command line support for logging to a location other than /tmp/qemu.log.

With logging enabled (command line option -d), the log is written to
the hard-coded path /tmp/qemu.log. This patch adds support for writing...

44829396 06/10/2011 11:21 pm Edgar E. Iglesias

Merge remote branch 'rth/axp-next' into alpha-merge

  • rth/axp-next: (26 commits)
    target-alpha: Implement TLB flush primitives.
    target-alpha: Use a fixed frequency for the RPCC in system mode.
    target-alpha: Trap for unassigned and unaligned addresses....
9bf0960a 06/08/2011 11:04 am Alexandre Raymond

Fix compilation warning due to missing header for sigaction (followup)

This patch removes all references to signal.h when qemu-common.h is included
as they become redundant.

Signed-off-by: Alexandre Raymond <>
Signed-off-by: Stefan Hajnoczi <>

129d8aa5 05/31/2011 08:18 pm Richard Henderson

target-alpha: Rationalize internal processor registers.

Delete all the code that tried to emulate the real IPRs of some
unnamed CPU. Replace those with just 3 slots that we can use to
communicate trap information between the helper functions that
signal exceptions and the OS trap handler....

07b6c13b 05/31/2011 08:18 pm Richard Henderson

target-alpha: Tidy exception constants.

There's no need to attempt to match EXCP_* values with PALcode entry
point offsets. Instead, compress all the values to make for more
efficient switch statements within QEMU.

We will be doing TLB fill within QEMU proper, not within the PALcode,...