Statistics
| Branch: | Revision:

root / linux-user @ c3268cc1

# Date Author Comment
0514ef2f 05/02/2013 01:27 am Eduardo Habkost

target-i386: Replace cpuid_*features fields with a feature word array

This replaces the feature-bit fields on both X86CPU and x86_def_t
structs with an array.

With this, we will be able to simplify code that simply does the same
operation on all feature words (e.g. kvm_check_features_against_host(),...

7edd2cf1 04/26/2013 12:52 pm Peter Maydell

linux-user: fix compile error due to stray colon at end of #ifdef line

Remove a stray colon from the end of a #ifdef line. Some versions
of gcc complain about this:
linux-user/syscall.c: In function ‘do_syscall’:
linux-user/syscall.c:7606:28: error: extra tokens at end of #ifdef directive [-Werror]...

c7128c9f 04/19/2013 10:48 am Petar Jovanovic

linux-user: change do_semop to return target errno when unsuccessful

do_semop() is called from two places, and one of these fails to convert
return error to target errno when semop fails. This patch changes the
function to always return target errno in case of an unsuccessful call....

9ab709be 04/19/2013 10:48 am Andreas Schwab

linux-user: fix undefined shift in copy_to_user_fdset

If TARGET_ABI_BITS is bigger than 32 we shift by more than the size of int.

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

03903ffc 04/19/2013 10:48 am Andreas Schwab

linux-user: fix setgroups/getgroups for non-UID16 archs

Don't assume target_id is a short.

Signed-off-by: Andreas Schwab <>
Signed-off-by: Riku Voipio <>

ca98ac83 04/18/2013 03:12 pm Paolo Bonzini

elfload: fix size of ABI-dependent fields in core dumps

Some fields in core dumps are 32-bit in 32-or-64 environments (ppc64abi32,
sparc32plus). Use abi_long/ulong for those.

Also, the fields of target_elf_siginfo are ints. Use tswap32 to convert them....

a29f998d 04/18/2013 03:12 pm Paolo Bonzini

elfload: fix size of registers for N32

Registers are 64-bit in size for the MIPS n32 ABI. Define
target_elf_greg_t accordingly, and use the correct function
to do endian swaps.

Reviewed-by: Peter Maydell <>
Signed-off-by: Paolo Bonzini <>...

86cd7b2d 04/18/2013 03:12 pm Paolo Bonzini

elfload: use tswapreg consistently in elf_core_copy_regs

Reviewed-by: Peter Maydell <>
Signed-off-by: Paolo Bonzini <>
Signed-off-by: Edgar E. Iglesias <>

1ddd592f 04/18/2013 03:12 pm Paolo Bonzini

elfload: use abi_short/ushort instead of target_short/ushort

The alignment is a characteristic of the ABI, not the CPU.

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

f8fd4fc4 04/18/2013 03:12 pm Paolo Bonzini

elfload: use abi_int/uint instead of target_int/uint

The alignment is a characteristic of the ABI, not the CPU.

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

918fc54c 04/18/2013 03:12 pm Paolo Bonzini

elfload: use abi_llong/ullong instead of target_llong/ullong

The alignment is a characteristic of the ABI, not the CPU.

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

5947c697 04/12/2013 03:33 pm Petar Jovanovic

linux-user: pass correct host flags to eventfd2 call

This change makes conversion of TARGET_O_NONBLOCK and TARGET_O_CLOEXEC flags
to host flags before calling eventfd for TARGET_NR_eventfd2.

Signed-off-by: Petar Jovanovic <>
Reviewed-by: Peter Maydell <>...

abe20840 04/05/2013 03:40 pm Peter Maydell

linux-user: Don't omit comma for strace of rt_sigaction()

Pass the 'last' parameter of print_signal() through to
print_raw_param(); this fixes a problem where we weren't printing
the comma separator for strace of rt_sigaction() when the signal
was an unnamed (ie realtime) one:...

e9a970a8 03/11/2013 02:35 pm Peter Maydell

linux-user/syscall.c: Don't warn about unimplemented get_robust_list

The nature of the kernel ABI for the get_robust_list and set_robust_list
syscalls means we cannot implement them in QEMU. Make get_robust_list
silently return ENOSYS rather than using the default "print message and...

a94b4987 03/11/2013 02:34 pm Peter Maydell

linux-user: Implement accept4

Implement the accept4 syscall (which is identical to accept
but has an additional flags argument).

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

a8fd1aba 03/11/2013 02:34 pm Peter Maydell

linux-user: Implement sendfile and sendfile64

Implement the sendfile and sendfile64 syscalls. This implementation
passes all the LTP test cases for these syscalls.

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

dfae8e00 03/11/2013 02:34 pm Peter Maydell

linux-user: make bogus negative iovec lengths fail EINVAL

If the guest passes us a bogus negative length for an iovec, fail
EINVAL rather than proceeding blindly forward. This fixes some of
the error cases tests for readv and writev in the LTP.

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

63ec54d7 03/11/2013 02:33 pm Peter Maydell

linux-user: Fix layout of usage table to account for option text

The linux-user usage message attempts to line up the columns in
its table by calculating the maximum width of any item in them.
However for the 'Argument' column it was only accounting for the...

0d95fda8 03/11/2013 01:05 pm Dillon Amburgey

linux-user: Add more sparc syscall numbers

Signed-off-by: Dillon Amburgey <>
Signed-off-by: Riku Voipio <>

f2b79ce9 03/11/2013 01:05 pm Dillon Amburgey

linux-user: Support setgroups syscall with no groups

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

bfb669f3 03/11/2013 01:05 pm John Rigby

linux-user: fix futex strace of FUTEX_CLOCK_REALTIME

Handle same as existing FUTEX_PRIVATE_FLAG.

Signed-off-by: John Rigby <>
Signed-off-by: Riku Voipio <>

cce246e0 03/11/2013 01:04 pm John Rigby

linux-user/syscall.c: handle FUTEX_WAIT_BITSET in do_futex

Upstream libc has recently changed to start using
FUTEX_WAIT_BITSET instead of FUTEX_WAIT and this
is causing do_futex to return -TARGET_ENOSYS.

Pass bitset in val3 to sys_futex which will be
ignored by kernel for the FUTEX_WAIT case....

d95ec14f 03/11/2013 01:04 pm Laurent Vivier

linux-user: improve print_fcntl()

Signed-off-by: Laurent Vivier <>
Signed-off-by: Riku Voipio <>

ec00b51a 03/11/2013 01:04 pm Dillon Amburgey

linux-user: Add Alpha socket constants

Without these, some networking programs will not work

Signed-off-by: Dillon Amburgey <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Riku Voipio <>

597e2cec 03/05/2013 04:04 pm Richard Henderson

mipsn32-linux-user: Configure the architecture properly

N32 is a 64-bit cpu with a 32-bit address space. We have
existing cpp defines for this situation, but weren't using them.

This does mean that the linux-user/mipsn32 directory must be
merged with the linux-user/mips64 directory, and differences...

084d0497 03/05/2013 12:58 pm Richard Henderson

mips-linux-user: Save and restore fpu and dsp from sigcontext

Signed-off-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

ff4f7382 03/05/2013 12:58 pm Richard Henderson

mips-linux-user: Fix n32 and n64 syscalls

Signed-off-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

ff970904 03/05/2013 02:56 am Richard Henderson

mips-linux-user: Share o32 code for n32 and n64 signals

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

2c3c6689 03/05/2013 02:55 am Richard Henderson

mips-linux-user: Delete n32 and n64 signal stubs

Deleting these first makes the next patch much easier to read.
This doesn't cause any sort of compilation failure because we
have not yet enabled n32/n64 compilation. This is dead code.

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

54b2f42c 03/04/2013 08:03 pm Meador Inge

target-mips: Translate breaks and traps into the appropriate signal

GCC and GAS are capable of generating traps or breaks to check for
division by zero. Additionally, GAS is capable of generating traps
or breaks to check for overflow on certain division and multiplication...

989b697d 02/26/2013 09:31 pm Peter Maydell

qemu-log: default to stderr for logging output

Switch the default for qemu_log logging output from "/tmp/qemu.log"
to stderr. This is an incompatible change in some sense, but logging
is mostly used for debugging purposes so it shouldn't affect production...

0315c31c 02/16/2013 03:51 pm Andreas Färber

cpu: Move running field to CPUState

Pass CPUState to cpu_exec_{start,end}() functions.

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

0d34282f 02/16/2013 03:50 pm Andreas Färber

cpu: Move host_tid field to CPUState

Change gdbstub's cpu_index() argument to CPUState now that CPUArchState
is no longer used.

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

24537a01 02/16/2013 12:44 pm Peter Maydell

qemu-log: Rename the public-facing cpu_set_log function to qemu_set_log

Rename the public-facing function cpu_set_log to qemu_set_log. This
requires us to rename the internal-only qemu_set_log() to
do_qemu_set_log().

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

4fde1eba 02/16/2013 12:44 pm Peter Maydell

qemu-log: Rename cpu_str_to_log_mask to qemu_str_to_log_mask

Rename cpu_str_to_log_mask() to qemu_str_to_log_mask(), since
the qemu_log functionality is no longer restricted to TCG CPU
debug logging.

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

59a6fa6e 02/16/2013 12:44 pm Peter Maydell

qemu-log: Abstract out "print usage message about valid log categories"

Abstract out the "print a human readable list of all the
valid log categories" functionality which is currently duplicated
in three separate places. (We leave the monitor.c help_cmd()...

9a7e5424 02/16/2013 12:43 pm Peter Maydell

qemu-log: Unify {cpu_set,set_cpu}_log_filename as qemu_set_log_filename

The qemu_log() functionality is no longer specific to TCG CPU debug logs.
Rename cpu_set_log_filename() to qemu_set_log_filename() and drop the
pointless wrapper set_cpu_log_filename()....

5e5f07e0 02/16/2013 12:41 pm Evgeny Voevodin

TCG: Move translation block variables to new context inside tcg_ctx: tb_ctx

It's worth to clean-up translation blocks variables and move them
into one context as was suggested by Swirl.
Also if we use this context directly inside tcg_ctx, then it
speeds up code generation a bit....

bd4bd24e 02/07/2013 12:39 am Anthony Liguori

Merge branch 'for-linux-user' of https://git.gitorious.org/qemu-m68k/qemu-m68k into staging

0bc8ce94 02/07/2013 12:37 am Peter Maydell

linux-user: Restore cast to target type in get_user()

Commit 658f2dc97 accidentally dropped the cast to the target type of
the value loaded by get_user(). The most visible effect of this would
be that the sequence "uint64_t v; get_user_u32(v, addr)" would sign...

5c099537 02/01/2013 11:53 pm Paolo Bonzini

cpu: do not use object_delete

CPUs are never added to the composition tree, so delete is achieved
simply by removing the last references to them.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Anthony Liguori <>

77868120 02/01/2013 02:35 am Andreas Färber

linux-user: bsd-user: Don't reset X86CPU twice

Since commit 65dee38052597b6285eb208125369f01b29ba6c1 (target-i386:
move cpu_reset and reset callback to cpu.c) the x86 CPU is reset through
cpu_init() but was still reset immediately after in linux-user and...

79dd77de 01/30/2013 01:13 pm Laurent Vivier

linux-user: correct msgrcv()

All parameters must be swapped before the call of do_msgrcv().

Allow faked (debian fakeroot daemon) to work properly.

WITHOUT this patch:

$ faked-sysv --foreground --debug
using 1723744788 as msg key
msg_key=1723744788
1723744788:431...

910ee4e5 01/30/2013 01:13 pm Laurent Vivier

linux-user: correct print_timeval() swap tv_sec and tv_usec

Signed-off-by: Laurent Vivier <>
Reviewed-by: Peter Maydell <>

1b09aeb9 01/30/2013 01:13 pm Laurent Vivier

linux-user: correct setsockopt()

SO_SNDTIMEO and SO_RCVTIMEO take a struct timeval, not an int

To test this, you can use :

QEMU_STRACE= ping localhost 2>&1 |grep TIMEO
568 setsockopt(3,SOL_SOCKET,SO_SNDTIMEO,{1,0},8) = 0
568 setsockopt(3,SOL_SOCKET,SO_RCVTIMEO,{1,0},8) = 0...

c07ecc68 01/30/2013 01:13 pm Laurent Vivier

linux-user: correct reboot()

According to man reboot(2), the 4th argument is only used with
LINUX_REBOOT_CMD_RESTART2. In other cases, trying to convert
the value can generate EFAULT.

Signed-off-by: Laurent Vivier <>
Reviewed-by: Peter Maydell <>

9468a5d4 01/16/2013 06:15 pm Laurent Vivier

alpha-linux-user: Correct select

Alpha, like s390x, passes all select arguments in registers.

Signed-off-by: Laurent Vivier <>
Signed-off-by: Richard Henderson <>

2ba7f730 01/16/2013 06:13 pm Laurent Vivier

alpha-linux-user: Translate fcntl l_type

The values of F_RDLCK, F_WRLCK, F_UNLCK, F_EXLCK, F_SHLCK
differ between alpha and other linux architectures.

This patch allows to run "dpkg" (database lock).

Signed-off-by: Laurent Vivier <>
Signed-off-by: Richard Henderson <>

02e079c7 01/12/2013 02:47 pm Blue Swirl

Merge branch 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf

  • 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf: (31 commits)
    PPC: linux-user: Calculate context pointer explicitly
    target-ppc: Error out for -cpu host on unknown PVR
    target-ppc: Slim conversion of model definitions to QOM subclasses...
837d1f97 01/12/2013 02:46 pm Blue Swirl

Merge branch 's390-reorg' of git://repo.or.cz/qemu/rth

  • 's390-reorg' of git://repo.or.cz/qemu/rth: (149 commits)
    target-s390: Claim maintainership
    target-s390: Use noreturn for exception and load_psw
    target-s390: Use TCG_CALL_NO_WG for misc helpers...
d2565875 01/12/2013 02:25 pm Richard Henderson

alpha-linux-user: Fix sigaction

Unconditional bswap replaced by _get_user/_put_user.

Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

658f2dc9 01/12/2013 02:24 pm Richard Henderson

linux-user: Rewrite _get_user/_put_user with __builtin_choose_expr

The previous formuation with multiple assignments to __typeof(*hptr) falls
down when hptr is qualified const. E.g. with const struct S *p, p->f is
also qualified const.

With this formulation, there's no assignment to any local variable....

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

61993a67 01/07/2013 06:37 pm Samuel Seay

PPC: linux-user: Calculate context pointer explicitly

Peter Maydell recommended the change to be more proper. The result was tested
and shows coming up with the same proper value.

Signed-off-by: Samuel Seay <>
[agraf: change subject]...

beb526b1 01/07/2013 06:37 pm Samuel Seay

PPC: fix segfault in signal handling code

Removed h2g() macro around the ka->_sa_handler due to the _sa_handler being a
guest memory address.

Changed the __put_user to put_user as it was attempting to put a value at the
stack address but the new address is a guest memory address, __put_user is...

d5a103cd 01/05/2013 10:00 pm Richard Henderson

target-s390: Reorg exception handling

Make the user path more like the system path. Prepare for more kinds
of runtime exceptions. Rename ILC to ILEN to make it clear that we
want to pass around a full instruction length, rather than a "code"
that happens to be stored one bit left in a larger field....

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

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