- 23 7月, 2013 6 次提交
-
-
由 Peter Maydell 提交于
Now all linux-user targets support building with NPTL, we can make it mandatory. This is a good idea because: * NPTL is no longer new and experimental; it is completely standard * in practice, linux-user without NPTL is nearly useless for binaries built against non-ancient glibc * it allows us to delete the rather untested code for handling the non-NPTL configuration Note that this patch leaves the CONFIG_USE_NPTL ifdefs in the bsd-user codebase alone. This makes no change for bsd-user, since our configure test for NPTL had a "#include <linux/futex.h>" which means bsd-user would never have been compiled with CONFIG_USE_NPTL defined, and it still is not. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Peter Maydell 提交于
Add x86-64 implementation of cpu_set_tls() (like the kernel, we just have to call do_arch_prctl() to set FS); this allows us to enable NPTL. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Alexander Graf 提交于
We can easily set the TLS on i386. Add code to do so. Signed-off-by: NAlexander Graf <agraf@suse.de> [PMM: also remove "target_nptl=no" line from configure, for consistency with other patches in this series] Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Peter Maydell 提交于
Linux manages to have three separate orderings of the arguments to the clone() syscall on different architectures. In the kernel these are selected via CONFIG_CLONE_BACKWARDS and CONFIG_CLONE_BACKWARDS2. Clean up our implementation of this to use similar #define names rather than a TARGET_* ifdef ladder. This includes behaviour changes fixing bugs on cris, x86-64, m68k, openrisc and unicore32. cris had explicit but wrong handling; the others were just incorrectly using QEMU's default, which happened to be the equivalent of CONFIG_CLONE_BACKWARDS. (unicore32 appears to be broken in the mainline kernel in that it tries to use arg3 for both parent_tidptr and newtls simultaneously -- we don't attempt to emulate this bug...) Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Peter Maydell 提交于
The i386 code for the get_thread_area syscall was missing a 'break' which meant it would have fallen through into the implementation of the following syscall; add it. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Peter Maydell 提交于
For m68k, per-thread data is a purely kernel construct with no CPU level support. Implement it via a field in the TaskState structure, used by cpu_set_tls() and the set_thread_area/get_thread_area syscalls. This allows us to enable compilation with NPTL. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
- 10 7月, 2013 3 次提交
-
-
由 Andreas Färber 提交于
Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
Move next_cpu from CPU_COMMON to CPUState. Move first_cpu variable to qom/cpu.h. gdbstub needs to use CPUState::env_ptr for now. cpu_copy() no longer needs to save and restore cpu_next. Acked-by: NPaolo Bonzini <pbonzini@redhat.com> [AF: Rebased, simplified cpu_copy()] Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
由 Andreas Färber 提交于
In particular fix 6-/10-char indentation. Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 05 7月, 2013 4 次提交
-
-
由 Petar Jovanovic 提交于
Previous implementation has failed to take into account different value of SOCK_NONBLOCK on target and host, and existence of SOCK_CLOEXEC. The same conversion has to be applied both for do_socket and do_socketpair, so the code has been isolated in a static inline function. enum sock_type in linux-user/socket.h has been extended to include TARGET_SOCK_CLOEXEC and TARGET_SOCK_NONBLOCK, similar to definition in libc. The patch also includes necessary code style changes (tab to spaces) in the header file since most of the file has been touched by this change. Signed-off-by: NPetar Jovanovic <petar.jovanovic@imgtec.com> Message-id: 1372639454-7560-1-git-send-email-petar.jovanovic@rt-rk.com Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Peter Maydell 提交于
Commit c0d472b1 accidentally dropped the definition of __NR_SYS_utimensat even though its use is guarded by CONFIG_UTIMENSAT, not CONFIG_ATFILE. Some older glibc don't have utimensat() (even if they have the other *at() functions). Fix this by correctly cleaning up the sys_utimensat() implementation and #defines, so that we always provide the syscall if needed whether we're doing it via glibc or not. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Tested-by: NLaurent Desnogues <laurent.desnogues@gmail.com> Message-id: 1371743841-26110-1-git-send-email-peter.maydell@linaro.org
-
由 Laurent Vivier 提交于
This allows to pass the device name. You can test this with the "route" command. WITHOUT this patch: $ sudo route add -net default gw 10.0.3.1 eth0 SIOCADDRT: Bad address $ netstat -nr Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Ifa 10.0.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth WITH this patch: $ sudo route add -net default gw 10.0.3.1 eth0 $ netstat -nr Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Ifa 0.0.0.0 10.0.3.1 0.0.0.0 UG 0 0 0 eth 10.0.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth Signed-off-by: NLaurent Vivier <laurent@vivier.eu> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Andreas Schwab 提交于
Some applications use /proc/$$/... (where $$ is the own pid) instead of /proc/self/... to refer to their own proc files. Extend the interception for open and readlink to handle this case. Also, do the same interception in readlinkat. Signed-off-by: NAndreas Schwab <schwab@suse.de> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 12 6月, 2013 2 次提交
-
-
由 Peter Maydell 提交于
The linux-user syscall emulation layer currently supports the openat family of syscalls via two mechanisms: simply calling the corresponding libc functions, and making direct syscalls. Since glibc has supported these functions since at least glibc 2.5, there's no real need to retain the (essentially untested) direct syscall fallback code, so simply delete it. This allows us to remove some ifdeffery that was attempting to disable provision of some of the syscalls if the host didn't seem to support them, which in some cases was actually wrong (eg where there are several flavours of the syscall and we only need one of them, not necessarily the exact one the guest has, as with the fstatat* calls). Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NRichard Henderson <rth@twiddle.net> Tested-by: NClaudio Fontana <claudio.fontana@huawei.com> Message-id: 1370126121-22975-2-git-send-email-peter.maydell@linaro.org
-
由 Peter Maydell 提交于
Newer architectures may only implement the getdents64 syscall, not getdents. Provide an implementation of getdents in terms of getdents64 so that we can run getdents-using targets on a getdents64-only host. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NRichard Henderson <rth@twiddle.net> Tested-by: NClaudio Fontana <claudio.fontana@huawei.com> Message-id: 1370344377-27445-1-git-send-email-peter.maydell@linaro.org Message-id: 1370193044-24535-1-git-send-email-peter.maydell@linaro.org
-
- 01 6月, 2013 1 次提交
-
-
由 Lei Li 提交于
Signed-off-by: NLei Li <lilei@linux.vnet.ibm.com> Reviewed-by: NStefan Weil <sw@weilnetz.de> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 18 5月, 2013 1 次提交
-
-
由 Christophe Lyon 提交于
Add a space at end of line when there is no filename to print, to conform to linux kernel format (see show_map_vma() in fs/proc/task_mmu.c). Signed-off-by: NChristophe Lyon <christophe.lyon@linaro.org> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
-
- 26 4月, 2013 1 次提交
-
-
由 Peter Maydell 提交于
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] Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Acked-By: NRiku Voipio <riku.voipio@linaro.org> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 19 4月, 2013 4 次提交
-
-
由 Petar Jovanovic 提交于
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. Signed-off-by: NPetar Jovanovic <petar.jovanovic@imgtec.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
由 Andreas Schwab 提交于
Don't assume target_id is a short. Signed-off-by: NAndreas Schwab <schwab@suse.de> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Andreas Schwab 提交于
If TARGET_ABI_BITS is bigger than 32 we shift by more than the size of int. Signed-off-by: NAndreas Schwab <schwab@suse.de> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Petar Jovanovic 提交于
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. Signed-off-by: NPetar Jovanovic <petar.jovanovic@imgtec.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
- 12 4月, 2013 1 次提交
-
-
由 Petar Jovanovic 提交于
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: NPetar Jovanovic <petar.jovanovic@imgtec.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 11 3月, 2013 6 次提交
-
-
由 Peter Maydell 提交于
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 then fail ENOSYS" code path, in the same way we already do for set_robust_list, and add a comment documenting why we do this. This silences warnings which were being produced for emulating even trivial programs like 'ls' in x86-64-on-x86-64. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Peter Maydell 提交于
Implement the accept4 syscall (which is identical to accept but has an additional flags argument). Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Peter Maydell 提交于
Implement the sendfile and sendfile64 syscalls. This implementation passes all the LTP test cases for these syscalls. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Peter Maydell 提交于
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: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 Dillon Amburgey 提交于
Signed-off-by: NDillon Amburgey <dillona@dillona.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
由 John Rigby 提交于
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. Signed-off-by: NJohn Rigby <john.rigby@linaro.org> Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
-
- 16 2月, 2013 1 次提交
-
-
由 Andreas Färber 提交于
Change gdbstub's cpu_index() argument to CPUState now that CPUArchState is no longer used. Signed-off-by: NAndreas Färber <afaerber@suse.de>
-
- 02 2月, 2013 1 次提交
-
-
由 Paolo Bonzini 提交于
CPUs are never added to the composition tree, so delete is achieved simply by removing the last references to them. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
- 30 1月, 2013 3 次提交
-
-
由 Laurent Vivier 提交于
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: NLaurent Vivier <laurent@vivier.eu> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Laurent Vivier 提交于
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 Signed-off-by: NLaurent Vivier <laurent@vivier.eu> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Laurent Vivier 提交于
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 FAKEROOT: msg=131072, key=1723744788 FAKEROOT: r=-1, received message type=-150996052, message=-160219330 FAKEROOT, get_msg: Bad address r=14, EINTR=4 fakeroot: clearing up message queues and semaphores, signal=-1 fakeroot: database save FAILED WITH this patch: $ faked-sysv --foreground --debug using 1569385744 as msg key msg_key=1569385744 1569385744:424 FAKEROOT: msg=0, key=1569385744 ^C fakeroot: clearing up message queues and semaphores, signal=2 fakeroot: database save FAILED Signed-off-by: NLaurent Vivier <laurent@vivier.eu> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 17 1月, 2013 2 次提交
-
-
由 Laurent Vivier 提交于
Alpha, like s390x, passes all select arguments in registers. Signed-off-by: NLaurent Vivier <laurent@vivier.eu> Signed-off-by: NRichard Henderson <rth@twiddle.net>
-
由 Laurent Vivier 提交于
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: NLaurent Vivier <laurent@vivier.eu> Signed-off-by: NRichard Henderson <rth@twiddle.net>
-
- 04 1月, 2013 1 次提交
-
-
由 John Spencer 提交于
instead use the correct headers that define these functions. Requested-by: NStefan Weil <sw@weilnetz.de> Signed-off-by: NJohn Spencer <maillist-qemu@barfooze.de> Reviewed-by: Amos Kong <kongjianjun@gmail.com> Reviewed-by: NStefan Weil <sw@weilnetz.de> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 19 12月, 2012 2 次提交
-
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 John Spencer 提交于
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. the proper fix is to simply include the correct header. Signed-off-by: NJohn Spencer <maillist-qemu@barfooze.de> Reviewed-by: NStefan Weil <sw@weilnetz.de> Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
-
- 09 12月, 2012 1 次提交
-
-
由 Peter Maydell 提交于
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. So move the four QEMU target architectures (arm, i386, sparc, unicore32) which were defining TARGET_NR_pread/pwrite to define TARGET_NR_pread64/pwrite64 instead, and drop the TARGET_NR_pread/pwrite implementation code completely. (Based on examination of the kernel sources for the four architectures this patch affects.) Signed-off-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-