Statistics
| Branch: | Revision:

root / linux-user @ 396d2cfc

# Date Author Comment
314992b1 01/08/2013 12:48 pm Alexander Graf

linux-user: fix mips 32-on-64 prealloc case

MIPS only supports 31 bits of virtual address space for user space, so let's
make sure we stay within that limit with our preallocated memory block.

This fixes the MIPS user space targets when executed without command line...

586b0bef 01/04/2013 03:38 pm John Spencer

linux-user/syscall.c: remove forward declarations

instead use the correct headers that define these functions.

Requested-by: Stefan Weil <>
Signed-off-by: John Spencer <>
Reviewed-by: Amos Kong <>...

27dd7730 12/20/2012 01:15 am Anthony Liguori

Merge remote-tracking branch 'bonzini/header-dirs' into staging

  • bonzini/header-dirs: (45 commits)
    janitor: move remaining public headers to include/
    hw: move executable format header files to hw/
    fpu: move public header file to include/fpu
    softmmu: move remaining include files to include/ subdirectories...
6b4c305c 12/19/2012 09:32 am Paolo Bonzini

fpu: move public header file to include/fpu

Signed-off-by: Paolo Bonzini <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

cb9c377f 12/19/2012 09:31 am Paolo Bonzini

janitor: add guards to headers

Signed-off-by: Paolo Bonzini <>

022c62cb 12/19/2012 09:31 am Paolo Bonzini

exec: move include files to include/exec/

Signed-off-by: Paolo Bonzini <>

76cad711 12/19/2012 09:29 am Paolo Bonzini

build: kill libdis, move disassemblers to disas/

Signed-off-by: Paolo Bonzini <>

c56dc774 12/18/2012 06:22 pm John Spencer

linux-user/syscall.c: remove wrong forward decl of setgroups()

this declaration is wrong:
the correct prototype on linux is:
int setgroups(size_t size, const gid_t *list);

since by default musl libc exposes this symbol in unistd.h
additionally to grp.h, the wrong declaration causes a build error....

1c97e303 12/10/2012 04:35 pm Anthony Liguori

Merge remote-tracking branch 'afaerber/qom-cpu' into staging

  • afaerber/qom-cpu:
    target-i386: Postpone cpuid_level update to realize time
    target-i386: Use define for cpuid vendor string size
    target-i386: Separate feature string parsing from CPU model lookup...
24c35a50 12/08/2012 08:49 pm Peter Maydell

linux-user: Merge pread/pwrite into pread64/pwrite64

The Linux syscalls underlying pread() and pwrite() take a 64 bit
offset on all architectures, even if some of them name the syscall
"pread/pwrite" rather than "pread64/pwrite64" for historical reasons....

89e0e9c7 12/06/2012 10:17 am Eduardo Habkost

user: Move *-user/qemu-types.h to main directory

The bsd-user/qemu-types.h and linux-user/qemu-types.h files are almost
the same, but linux-user has the additional definitions of tswapal().

This moves the linux-user file to the main directory, so the same file...

ee9baa00 12/06/2012 10:17 am Eduardo Habkost

user: Rename qemu-types.h to qemu-user-types.h

The header file is specific for *-user, but I plan to introduce a more
generic qemu-types.h file, so I'm renaming it.

Signed-off-by: Eduardo Habkost <>
Signed-off-by: Andreas Färber <>

853c3240 10/31/2012 09:24 pm Jia Liu

target-mips: Add ASE DSP resources access check

Add MIPS ASE DSP resources access check.

Signed-off-by: Jia Liu <>
Signed-off-by: Aurelien Jarno <>

41a05a45 10/19/2012 09:28 pm Aurelien Jarno

Merge branch 'linux-user-for-upstream' of git://git.linaro.org/people/rikuvoipio/qemu

  • 'linux-user-for-upstream' of git://git.linaro.org/people/rikuvoipio/qemu:
    linux-user: register align p{read, write}64
    linux-user: ppc: mark as long long aligned
    tcg: Remove TCG_TARGET_HAS_GUEST_BASE define...
a5b3bdcb 10/19/2012 02:24 pm Edgar E. Iglesias

microblaze: Support setting of TLS ptr

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

d7dce494 10/19/2012 02:24 pm Edgar E. Iglesias

microblaze: Update PC before simulating syscall

Fixes a clone() emulation bug were the new thread starts
at the point of the syscall and thus clones in a loop.

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

20132b96 10/13/2012 01:17 pm Richard Henderson

target-sparc: Don't compute full flags value so often

Avoid speculatively computing flags before every potentially trapping
operation and instead do the flags computation when a trap actually
occurs. This gives approximately 30% speedup in emulation.

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

ae017a5b 10/12/2012 02:42 pm Alexander Graf

linux-user: register align p{read, write}64

pread64 and pwrite64 pass 64bit parameters which for some architectures need
to be aligned to special argument pairs, creating a gap argument.

Handle this special case the same way we handle it in other places of the code....

4a1def4e 10/12/2012 02:38 pm Alexander Graf

linux-user: ppc: mark as long long aligned

The SysV PPC32 ABI dictates that long long (64bit) parameters are pass in odd/even
register pairs. Because unlike ARM and MIPS we start at an odd register number,
we can reuse the same aligning code that ARM and MIPS use....

885c1d10 10/12/2012 02:25 pm Peter Maydell

linux-user: If loading fails, print error as string, not number

If the attempt to load the guest executable fails, print the
error message as a string, not a number. This requires us to
fix a couple of places in loader_exec() where we were returning
-1 instead of a valid negative errno....

a05c6409 10/12/2012 02:01 pm Richard Henderson

linux-user: Fix siginfo handling

Compare signal numbers in the proper domain.
Convert all of the fields for SIGIO and SIGCHLD.

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

b7fb2310 10/12/2012 02:01 pm Richard Henderson

alpha-linux-user: Fix sigaltstack structure definition

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

3d21d29c 10/12/2012 01:59 pm Richard Henderson

linux-user: Implement gethostname

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

f287b2c2 10/12/2012 01:59 pm Richard Henderson

linux-user: Perform more checks on iovec lists

Validate count between 0 and IOV_MAX. Limit total length of
operation in the same way the kernel does.

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

229d3376 10/12/2012 01:58 pm Alexander Graf

linux-user: fix statfs

The statfs syscall should always memset(0) its full struct extent before
writing to it. Newer versions of the syscall use one of the reserved fields
for flags, which would otherwise get stale values from uncleaned memory.

This fixes libarchive for me, which got confused about the return value of...

1bdd7c7e 10/12/2012 01:58 pm Alexander Graf

linux-user: fix multi-threaded /proc/self/maps

When reading our faked /proc/self/maps from a secondary thread,
we get an invalid stack entry. This is because ts->stack_base is not
initialized in non-primary threads.

However, ts->info is, and the stack layout information we're looking...

048d3612 10/06/2012 07:54 pm Aurelien Jarno

Merge branch 'trivial-patches' of git://github.com/stefanha/qemu

  • 'trivial-patches' of git://github.com/stefanha/qemu:
    versatilepb: Use symbolic indices for ARM PIC
    qdev: kill bogus comment
    qemu-barrier: Fix compiler version check for future gcc versions...
4d5b97da 10/05/2012 04:10 pm Amos Kong

cleanup useless return sentence

This patch cleans up return sentences in the end of void functions.

Reported-by: Paolo Bonzini <>
Signed-off-by: Amos Kong <>
Signed-off-by: Stefan Hajnoczi <>

900cfbca 10/05/2012 03:58 pm Jim Meyering

linux-user: remove two unchecked uses of strdup

Remove two uses of strdup (use g_path_get_basename instead),
and add a comment that this strncpy use is ok.

Reviewed-by: Peter Maydell <>
Signed-off-by: Jim Meyering <>...

97fe81d3 09/26/2012 12:06 am Anthony Liguori

Merge remote-tracking branch 'afaerber/qom-cpu' into staging

  • afaerber/qom-cpu:
    target-alpha: Initialize env->cpu_model_str
    target-i386: Drop unused setscalar() macro
    target-i386: Kill cpudef config section support
    target-i386: x86_cpudef_setup() coding style change...
3988475b 09/26/2012 12:06 am Anthony Liguori

Merge remote-tracking branch 'stefanha/trivial-patches' into staging

  • stefanha/trivial-patches:
    w32: Always use standard instead of native format strings
    net/socket: Fix compiler warning (regression for MinGW)
    linux-user: Remove redundant null check and replace free by g_free...
ad11ad77 09/23/2012 09:35 am Stefan Weil

linux-user: Remove redundant null check and replace free by g_free

Report from smatch:

linux-user/syscall.c:3632 do_ioctl_dm(220) info:
redundant null check on big_buf calling free()

'big_buf' was allocated by g_malloc0, therefore free was also
replaced by g_free....

62724cc5 09/21/2012 11:02 pm Richard Henderson

linux-user: Use memcpy in get_user/put_user.

When host and target have differing alignment rules, using a cast
and direct memory operation can result in SIGBUS. Use memcpy instead,
which the compiler will happily optimize when alignment is satisfied.

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

e916cbf8 09/21/2012 04:12 pm Peter Maydell

Drop cpu_list_id macro

Since the only user of the extended cpu_list_id() format
was the x86 ?model/?dump/?cpuid output, we can drop it
completely.

Signed-off-by: Peter Maydell <>
Reviewed-by: Eduardo Habkost <>...

7b1532ec 09/14/2012 10:21 am Peter Maydell

linux-user: Remove #if 0'd cpu_get_real_ticks() definition

Remove the cpu_get_real_ticks() definition from linux-user/main.c.
This has been disabled via #if 0 and unused since commit 1dce7c3c22
in 2006; the definitions we actually use are in qemu-timer.h....

097b8cb8 08/27/2012 10:18 am Peter Maydell

linux-user: Clarify "Unable to reserve guest address space" error

Now that we default to reserving nearly 4GB of RAM for the guest
address space when running a 32 bit linux-user guest on 64 bit
hosts, users are much more likely to run into it. Reword the...

333858b7 08/27/2012 10:17 am Dmitry V. Levin

linux-user: fix emulation of getdents

In case when TARGET_ABI_BITS 32 && HOST_LONG_BITS 64, the last
byte of the target dirent structure (aka d_type byte) was never copied
from the host dirent structure, thus breaking everything that relies
on valid d_type value, e.g. glob(3)....

42644cee 08/27/2012 10:13 am Jim Meyering

linux-user: arg_table need not have global scope

Declare arg_table to be "static const", and adjust the two users
to also be const.

Signed-off-by: Jim Meyering <>
Signed-off-by: Riku Voipio <>

0d07fe47 08/22/2012 06:47 pm Jim Meyering

linux-user: do_msgrcv: don't leak host_mb upon TARGET_EFAULT failure

Also, use g_malloc to avoid NULL-deref upon OOM.

Signed-off-by: Jim Meyering <>
Signed-off-by: Anthony Liguori <>

3a1363ac 08/14/2012 10:26 pm Alexander Graf

linux-user: ARM: Ignore immediate value for svc in thumb mode

When running in thumb mode, Linux doesn't evaluate the immediate value
of the svc instruction, but instead just always assumes the syscall number
to be in r7.

This fixes executing go_bootstrap while building go for me....

ca619067 08/14/2012 10:26 pm Jing Huang

linux-user: pass sockaddr from host to target

Signed-off-by: Jing Huang <>
Reviewed-by: Peter Maydell <>
Signed-off-by: Peter Maydell <>

920394db 08/14/2012 10:26 pm Jing Huang

linux-user: make do_setsockopt support SOL_RAW ICMP_FILTER socket option

Signed-off-by: Jing Huang <>
Reviewed-by: Peter Maydell <>
Signed-off-by: Peter Maydell <>

aebf5bc7 08/14/2012 10:26 pm Jing Huang

linux-user: make host_to_target_cmsg support SO_TIMESTAMP cmsg_type

Signed-off-by: Jing Huang <>
Reviewed-by: Peter Maydell <>
Signed-off-by: Peter Maydell <>

cd8e407d 08/14/2012 10:26 pm Mike Frysinger

flatload: fix bss clearing

The current bss clear logic assumes the target mmap address and host
address are the same. Use g2h to translate from the target address
space to the host so we can call memset on it.

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

dce10401 08/14/2012 10:26 pm Meador Inge

linux-user: Factor out guest space probing into a function

Signed-off-by: Meador Inge <>
Reviewed-by: Peter Maydell <>
Signed-off-by: Peter Maydell <>

806d1021 08/14/2012 10:26 pm Meador Inge

linux-user: Use init_guest_space when -R and -B are specified

Roll the code used to initialize the guest memory space when -R
or -B is used into 'init_guest_space' and then call 'init_guest_space'
from the driver. This way the reserved guest memory space can...

5f72307d 08/13/2012 02:45 pm Peter Maydell

linux-user: Fix SNDCTL_DSP_MAP{IN, OUT}BUF ioctl definitions

Fix the SNDCTL_DSP_MAP{IN,OUT}BUF ioctl definitions so that they
refer to a suitably defined target struct layout rather than hardcoding
the ioctl number. This fixes complaints from the syscall_init()...

dd6e957a 08/13/2012 02:45 pm Peter Maydell

linux-user: Move target_to_host_errno_table[] setup out of ioctl loop

The code to initialise the target_to_host_errno_table[] array was
accidentally inside the loop through checking and initialising all
the supported ioctls. This was harmless but meant that we reinitialised the...

c8b0bf54 08/13/2012 02:45 pm Peter Maydell

linux-user: Fix incorrect TARGET_BLKBSZGET, TARGET_BLKBSZSET

The definitions for the ioctl numbers TARGET_BLKBSZGET and
TARGET_BLKBSZSET had the wrong size parameters (they are defined
with size_t, not int, even though the ioctl implementations themselves...

d48813dd 08/11/2012 12:36 pm Guan Xuetao

unicore32-softmmu: Make UniCore32 cpuid & exceptions correct and runable

This patch initializes the cpuid to exactly correct value because
linux kernel will check it.
In addition, the exception types are specified in proper situations.
Then it could make exceptions generated correctly and timely....

8954bae3 08/09/2012 09:34 pm Blue Swirl

sparc: fix expression with uninitialized initial value

err was uninitialized, it's not OK to use |=. Spotted by Clang
compiler.

Fix by implementing the earlier statement which initializes the variable.

Signed-off-by: Blue Swirl <>

95c09828 08/04/2012 07:37 pm Richard Henderson

alpha-linux-user: Fix the getpriority syscall

Alpha uses unbiased priority values in the syscall, with the a3
return value signaling error conditions. Therefore, properly
interpret the libc getpriority as needed for the guest rather
than passing the host value through unchanged....

6e06d515 08/04/2012 07:37 pm Richard Henderson

alpha-linux-user: Handle TARGET_SSI_IEEE_RAISE_EXCEPTION properly

We weren't aggregating the exceptions, nor raising signals properly.

Reviewed-by: Peter Maydell <>
Signed-off-by: Richard Henderson <>

4eeea4f3 08/04/2012 07:37 pm Richard Henderson

linux-user: Sync fcntl.h bits with the kernel

For each target, only define the bits that appear in
arch/target/include/asm/fcntl.h. Mirror the kernel's
asm-generic layout by handling anything undefined afterward.

Signed-off-by: Richard Henderson <>

afc8763f 08/04/2012 07:37 pm Richard Henderson

linux-user: Handle O_SYNC, O_NOATIME, O_CLOEXEC, O_PATH

Reviewed-by: Peter Maydell <>
Signed-off-by: Richard Henderson <>

a5e7ee46 08/04/2012 07:37 pm Richard Henderson

linux-user: Allocate the right amount of space for non-fixed file maps

If we let the kernel handle the implementation of mmap_find_vma,
via an anon mmap, we must use the size as indicated by the user
and not the size truncated to the filesize.

This happens often in ld.so, where we initially mmap the file to...

e7ea6cbe 08/04/2012 07:37 pm Richard Henderson

linux-user: Translate pipe2 flags; add to strace

Reviewed-by: Peter Maydell <>
Signed-off-by: Richard Henderson <>

0e141977 08/04/2012 07:37 pm Richard Henderson

alpha-linux-user: Fix a3 error return with v0 error bypass.

We were failing to initialize a3 for syscalls that bypass the
negative return value error check.

Signed-off-by: Richard Henderson <>

0229f5a3 08/04/2012 07:37 pm Richard Henderson

alpha-linux-user: Properly handle the non-rt sigprocmask syscall.

Name the syscall properly for QEMU, kernel source notwithstanding.
Fix syntax errors in the code thus enabled within do_syscall.

Reviewed-by: Peter Maydell <>
Signed-off-by: Richard Henderson <>

d0f20495 08/04/2012 07:37 pm Richard Henderson

alpha-linux-user: Fix signal handling

Proper signal numbers were not defined, and EXCP_INTERRUPT
was unhandled, leading to all sorts of subtle confusion.

Reviewed-by: Peter Maydell <>
Signed-off-by: Richard Henderson <>

c8057f95 08/02/2012 09:16 pm Peter Maydell

Support 'help' as a synonym for '?' in command line options

For command line options which permit '?' meaning 'please list the
permitted values', add support for 'help' as a synonym, by abstracting
the check out into a helper function.

This change means that in some cases where we were being lazy in...

02d2bd5d 08/01/2012 04:54 pm Richard W.M. Jones

Replace 'struct siginfo' with 'siginfo_t'.

glibc 2.16 will remove the undocumented definition of 'struct siginfo'
from <bits/siginfo.h>.

This change is already present in glibc 2.15.90, so qemu compilation
of certain targets (eg. cris-user) breaks.

This struct was always typedef'd to be the same as 'siginfo_t' which...

a8720299 07/28/2012 12:13 am Jia Liu

target-or32: Add linux syscall, signal and termbits

Add OpenRISC linux syscall, signal and termbits.

Signed-off-by: Jia Liu <>
Signed-off-by: Blue Swirl <>

d962783e 07/28/2012 12:13 am Jia Liu

target-or32: Add linux user support

Add QEMU OpenRISC linux user support.

Signed-off-by: Jia Liu <>
Signed-off-by: Blue Swirl <>

959a255d 06/24/2012 01:48 pm Blue Swirl

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: (33 commits)
    target-arm: Remove ARM_CPUID_* macros
    target-arm: Remove remaining old cp15 infrastructure...
eeacee4d 06/21/2012 09:45 pm Blue Swirl

qemu-log: cleanup

Don't use global variables directly but via accessor functions. Rename globals.

Convert macros to functions, add GCC format attributes.

Signed-off-by: Blue Swirl <>

b2d06f96 06/20/2012 03:13 pm Peter Maydell

target-arm: Remove ARM_CPUID_* macros

All the uses of ARM_CPUID() to vary behaviour have now been
removed, so we can delete the ARM_CPUID_* macros now.
The one exception is the TI915T/925T, because of its odd behaviour
where the MIDR value can be changed at runtime....

7fc5152c 06/07/2012 08:17 am Paolo Bonzini

build: move *-user/ objects to nested Makefile.objs

Signed-off-by: Paolo Bonzini <>

ff18b762 06/05/2012 12:00 am Andreas Färber

linux-user: Use cpu_reset() after cpu_init() / cpu_copy()

Eliminates cpu_state_reset() usage.

Signed-off-by: Andreas Färber <>

77a8f1a5 05/19/2012 06:49 pm Alexander Graf

linux-user: Fix stale tbs after mmap

If we execute linux-user code that does the following:

  • A = mmap()
  • execute code in A
  • munmap(A)
  • B = mmap(), but mmap returns the same address as A
  • execute code in B

we end up executing a stale cached tb that contains translated code...

1a49ef2a 05/03/2012 05:31 pm Alexander Graf

linux-user: fix emulation of /proc/self/maps

Improve the emulation of /proc/self/maps by reading the underlying
host maps file and passing lines through with addresses adjusted
to be guest addresses. This is necessary to avoid false triggers
of the glibc check that a format string containing '%n' is not in...

209c4849 05/03/2012 05:31 pm Andreas Färber

linux-user: Clean up interim solution for exit syscall

After all target CPUs have been QOM'ified, we no longer need an #ifdef
to switch between object_delete() and g_free() in NPTL thread exit.

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

11ea4090 04/15/2012 07:54 pm Andreas Färber

linux-user: Fix exit syscall with QOM CPU

For QOM'ified CPUs we cannot g_free() CPUArchState, we must
object_delete() the object it is embedded into.

Fixes LP#982321 (invalid free() while executing pacman with qemu-arm).

Reported-by: Serge Schneider <>...

d8fd2954 04/06/2012 07:25 pm Paul Brook

Userspace ARM BE8 support

Add support for ARM BE8 userspace binaries.
i.e. big-endian data and little-endian code.
In principle LE8 mode is also possible, but AFAIK has never actually
been implemented/used.

System emulation doesn't have any useable big-endian board models,...

adf050b1 04/06/2012 07:06 pm Benoit Canet

arm-linux-user: fix elfload.c's AT_HWCAP to reflect cpu features.

The cpu capabilities passed by the elf loader in AT_HWCAP where
a constant.
Make AT_HWCAP reflect the emulated cpu features in order to give
correct clues to eglibc.

Riku Voipio: fixed to apply to current head...

56e904ec 04/06/2012 06:49 pm Alexander Graf

linux-user: implement device mapper ioctls

This patch implements all ioctls currently implemented by device mapper,
enabling us to run dmsetup and kpartx inside of linux-user.

Signed-off-by: Alexander Graf <>
Signed-off-by: Riku Voipio <>

6083abd9 04/06/2012 06:49 pm Alexander Graf

linux-user: add struct old_dev_t compat

The compat LOOP_SET_STATUS ioctl uses struct old_dev_t in its passed
struct. That variable type is vastly different between different
architectures. Implement wrapping around it so we can use it.

This fixes running arm kpartx on an x86_64 host for me....

edafea13 04/06/2012 06:49 pm Alexander Graf

linux-user: fix BLK ioctl arguments

Some BLK ioctls passed sizeof(x) into a macro that already did sizeof() on
the passed in argument, rendering the size information inside the ioctl be
the size of the host default integer type.

Signed-off-by: Alexander Graf <>...

49e9a077 04/06/2012 06:49 pm Alexander Graf

linux-user: add BLKSSZGET ioctl wrapper

This patch adds an ioctl definition for BLKSSZGET.

Signed-off-by: Alexander Graf <>
Signed-off-by: Riku Voipio <>

354a0008 04/06/2012 06:49 pm Alexander Graf

linux-user: Add ioctl for BLKBSZGET

This patch adds the ioctl wrapper definition for BLKBSZGET.

Signed-off-by: Alexander Graf <>
Signed-off-by: Riku Voipio <>

20249ae1 04/06/2012 06:49 pm Alexander Graf

linux-user: fix fallocate

Fallocate gets off_t parameters passed in, so we should also read them out
accordingly.

Signed-off-by: Alexander Graf <>


v1 -> v2:

- unbreak 64-bit guests

Signed-off-by: Riku Voipio <>

59e9d91c 04/06/2012 06:49 pm Peter Maydell

linux-user: resolve reserved_va vma downwards

After consulting with Paul Brook, we concluded that it's best to search
the VMA space downwards, so that we don't even get the chance to conflict
with the brk range.

This patch resolves a bunch of allocation conflicts when using -R....

288e65b9 04/06/2012 06:49 pm Alexander Graf

linux-user: reserve 4GB of vmem for 32-on-64

When running 32-on-64 bit guests, we should always reserve as much
virtual memory as we possibly can for the guest process, so it can
never overlap with QEMU address space.

Fortunately we already have the infrastructure for that. All that's...

1e6722f8 04/06/2012 06:49 pm Peter Maydell

linux-user/syscall.c: Fix indentation in prctl handling

Clean up the odd indentation of this switch statement before
we double its size by adding new cases to it.

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

db9526b1 04/06/2012 06:49 pm Peter Maydell

linux-user: Add support for prctl PR_GET_NAME and PR_SET_NAME

Add support for the prctl options PR_GET_NAME and PR_SET_NAME,
which take or return a name in a 16 byte buffer pointed to by arg2.

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

d1b02ea0 04/06/2012 06:49 pm Peter Maydell

linux-user/arm/syscall_nr.h: Add syscall number for ppoll

The list of ARM syscall numbers was missing the entry for ppoll,
which meant we were accidentally not providing it. (This wasn't
causing any practical issues beyond warnings about unimplemented
syscalls, because glibc will fall back to another code path if the...

e0e65bee 04/06/2012 06:49 pm Fabio Erculiani

linux-user: improve fake /proc/self/stat making `ps` not segfault.

With the current fake /proc/self/stat implementation `ps` is
segfaulting because it expects to read PID and argv0 as first and
second field respectively, with the latter being enclosed between...

84803b87 04/06/2012 06:49 pm Fabio Erculiani

linux-user: target_argv is placed on ts->bprm->argv and can't be freed()

TaskState contains linux_bprm struct which encapsulates argv among
other things.
argv might be used around the code and is expected to contain valid
data. Before this patch, ts->bprm->argv was NULL due to it being...

32a2003a 03/15/2012 02:12 pm Alex Barcelo

Bad zero comparison for sas_ss_flags on powerpc

All architectures work the same way, and all check for sas_ss_flags ==
0. The powerpc lines are wrong, and do the check the other way round
(it's a qemu internal check, which is done wrong only for this
architecture, it's more a typo than a bug). It's NOT ppc specific,...

9349b4f9 03/14/2012 11:20 pm Andreas Färber

Rename CPUState -> CPUArchState

Scripted conversion:
for file in .[hc] hw/.[hc] hw/kvm/*.[hc] linux-user/*.[hc] linux-user/m68k/*.[hc] bsd-user/*.[hc] darwin-user/*.[hc] tcg/*/*.[hc] target-*/cpu.h; do
sed -i "s/CPUState/CPUArchState/g" $file
done...

1bba0dc9 03/14/2012 11:20 pm Andreas Färber

Rename cpu_reset() to cpu_state_reset()

Frees the identifier cpu_reset for QOM CPUs (manual rename).

Don't hide the parameter type behind explicit casts, use static
functions with strongly typed argument to indirect.

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

05390248 03/14/2012 11:20 pm Andreas Färber

linux-user: Don't overuse CPUState

In target-specific code use CPU*State.

While at it, fix indentation on those lines.

Signed-off-by: Andreas Färber <>

ce008c1f 03/13/2012 08:23 pm Andreas Färber

qom: Add QOM support to user emulators

Link the Object base class and the module infrastructure for class
registration. Introduce $(universal-obj-y) for objects that are more
common than $(common-obj-y), so that those only get built once.

Call QOM module init for type registration....

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

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