History | View | Annotate | Download (81 kB)
linux-user: Implement BLKPG ioctl
Signed-off-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user: Support the accept4 socketcall
Cc: Riku Voipio <riku.voipio@iki.fi>Signed-off-by: André Hentschel <nerv@dawncrow.de>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Erik de Castro Lopo <erikd@mega-nerd.com>Reviewed-by: Laurent Vivier <laurent@vivier.eu>...
linux-user: Add target struct defs needed for POSIX timer syscalls.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user: Fix stat64 syscall for SPARC64
Some targets use a stat64 structure for the stat64 syscall while othersuse a stat structure. SPARC64 used the wrong kind.
Instead of extending the conditional compilation in syscall.c, now amacro TARGET_HAS_STRUCT_STAT64 is defined whenever a target has a...
linux-user: Add setsockopt(SO_ATTACH_FILTER)
This is needed to be able to run dhclient.
Signed-off-by: Laurent Vivier <laurent@vivier.eu>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user: Fix up AArch64 syscall handlers
Some syscall handlers have special code for ARM enabled that we don'tneed on AArch64. Exclude AArch64 in those cases. In other places wecan share struct definitions with other targets or have to provide ourown....
linux-user: Fix target_stat and target_stat64 for OpenRISC
OpenRISC uses the asm-generic versions of target_stat andtarget_stat64, but it was incorrectly using the x86/ARM/etc versiondue to a misplaced defined(TARGET_OPENRISC). The previously unusedOpenRISC section of the ifdef ladder also defined an incorrect...
linux-user: Fix epoll on ARM hosts
The epoll emulation uses data structures without packing them, so thecompiler might choose to add padding inside.
This patch makes the most offending one (target_epoll_event) a packedstructure to make sure we don't pad it by accident. ARM would pad it,...
alpha-linux-user: Translate fcntl l_type
The values of F_RDLCK, F_WRLCK, F_UNLCK, F_EXLCK, F_SHLCKdiffer between alpha and other linux architectures.
This patch allows to run "dpkg" (database lock).
Signed-off-by: Laurent Vivier <laurent@vivier.eu>Signed-off-by: Richard Henderson <rth@twiddle.net>
alpha-linux-user: Fix sigaction
Unconditional bswap replaced by _get_user/_put_user.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
janitor: add guards to headers
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
linux-user: fix emulation of getdents
In case when TARGET_ABI_BITS 32 && HOST_LONG_BITS 64, the lastbyte of the target dirent structure (aka d_type byte) was never copiedfrom the host dirent structure, thus breaking everything that relieson valid d_type value, e.g. glob(3)....
linux-user: Fix SNDCTL_DSP_MAP{IN, OUT}BUF ioctl definitions
Fix the SNDCTL_DSP_MAP{IN,OUT}BUF ioctl definitions so that theyrefer to a suitably defined target struct layout rather than hardcodingthe ioctl number. This fixes complaints from the syscall_init()...
linux-user: Fix incorrect TARGET_BLKBSZGET, TARGET_BLKBSZSET
The definitions for the ioctl numbers TARGET_BLKBSZGET andTARGET_BLKBSZSET had the wrong size parameters (they are definedwith size_t, not int, even though the ioctl implementations themselves...
linux-user: Sync fcntl.h bits with the kernel
For each target, only define the bits that appear inarch/target/include/asm/fcntl.h. Mirror the kernel'sasm-generic layout by handling anything undefined afterward.
Signed-off-by: Richard Henderson <rth@twiddle.net>
alpha-linux-user: Fix signal handling
Proper signal numbers were not defined, and EXCP_INTERRUPTwas unhandled, leading to all sorts of subtle confusion.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Richard Henderson <rth@twiddle.net>
target-or32: Add linux user support
Add QEMU OpenRISC linux user support.
Signed-off-by: Jia Liu <proljc@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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 <agraf@suse.de>Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user: fix BLK ioctl arguments
Some BLK ioctls passed sizeof(x) into a macro that already did sizeof() onthe passed in argument, rendering the size information inside the ioctl bethe size of the host default integer type.
Signed-off-by: Alexander Graf <agraf@suse.de>...
linux-user: add SO_PEERCRED support for getsockopt
Signed-off-by: Akos PASZTORY <akos.pasztory@gmail.com>Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
fix spelling in linux-user sub directory
Cc: Riku Voipio <riku.voipio@iki.fi>Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
linux-user: fix TARGET_RLIM_INFINITY declaration
Signed-off-by: Matthias Braun <matze@braunis.de>Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user: fix rlimit syscalls on sparc(64)
Signed-off-by: Matthias Braun <matze@braunis.de>Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
linux-user: fix abi_(u)long, target_ulong mismatch
abi_(u)long might be different from target_ulong, so don't use tswaplbut introduce a new tswapal
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/'...
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 anear infinite loop trying to close all the file descriptors from 0 to...
linux-user: Implement prlimit64 syscall
Implement the prlimit64 syscall.
Slightly modified to apply upstream -Riku
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user: Add support for even more FB ioctls
This patch was validated with programs from DirectFB-1.0 andWebKit/DirectFB.
Signed-off-by: Cédric VINCENT <cedric.vincent@st.com>Cc: Riku Voipio <riku.voipio@iki.fi>Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user: Add support for more VT ioctls
DirectFB-1.0 uses at least two of the four added ioctls, and the twoothers were added for completeness. This patch was validated with theprogram "vlock -all/-new".
Signed-off-by: Cédric VINCENT <cedric.vincent@st.com>...
linux-user: Add support for KD...LED ioctls
DirectFB-1.0 uses at least one of the four added ioctls, and the threeothers were added for completeness. This patch was validated with theprogram "setleds" and the following Makefile:
SETLEDS_INIT = setleds -v -num -caps -scroll...
s390x: s390x-linux-user support
This patch adds support for running s390x binaries in the linux-user emulationcode.
Signed-off-by: Ulrich Hecht <uli@suse.de>Signed-off-by: Alexander Graf <agraf@suse.de>
linux-user: add ioctl(SIOCGIWNAME, ...) support.
Allow to run properly following program from linux-user:
/* cc -o wifi wifi.c */
#include <stdio.h> #include <sys/ioctl.h> #include <sys/types.h> #include <sys/socket.h> #include <linux/wireless.h> #include <netinet/in.h>...
linux-user: untie syscalls from UID16
Quite a number of uid/gid related syscalls are only defined on systemswith USE_UID16 defined. This is apperently based on the idea that thesesystem calls would never be called on non-UID16 systems. Make thesesyscalls available for all architectures that define them....
unicore32: necessary modifications for other files to support unicore32
Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
linux-user: Support the epoll syscalls
Support the epoll family of syscalls: epoll_create(), epoll_create1(),epoll_ctl(), epoll_wait() and epoll_pwait(). Note that epoll_create1()and epoll_pwait() are later additions, so we have to test separatelyin configure for their presence....
linux-user: decode MAP_{UNINITIALIZED,EXECUTABLE} in strace
Signed-off-by: Mike Frysinger <vapier@gentoo.org>Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
linux-user: Implement FS_IOC_FIEMAP ioctl
Implement the FS_IOC_FIEMAP ioctl using the new support forcustom handling of ioctls; this is needed because the structthat is passed includes a variable-length array.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
linux-user: fix mips and ppc to use UID16
Signed-off-by: Martin Mohring <martin.mohring@5edatasoft.com>Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
microblaze: Fix the target version of stat64 struct
MicroBlaze needs TARGET_STAT64_HAS_BROKEN_ST_INO.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
Strace mprotect flags.
Teach strace code about linux specific mprotect flags.
Signed-off-by: Paul Brook <paul@codesourcery.com>
alpha-linux-user: Add correct sigaction constants.
Signed-off-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
linux-user: fix 32-bit host breakage
Fix breakage introduced by commit 81bbe906c89b6b7af58a1eeb96ec5a0bfdc3386f.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
linux-user: rlimit conversion between host and target.
rlim_t conversion between host and target added.Otherwise there are some incorrect case like- RLIM_INFINITY on 32bit target > 64bit host. RLIM_INFINITY on 64bit host > mips and sparc target ? Big value(for 32bit target) on 64bit host -> 32bit target....
alpha-linux-user: Implement signals.
Move userland PALcode handling into linux-user main loop so thatwe can send signals from there. This also makes alpha_palcode.csystem-level only, so don't build it for userland. Add definesfor GENTRAP PALcall mapping to signals....
linux-user: KD/VT/FB ioctls
everything needed to run SDL on a framebuffer device in the userspace emulator
Signed-off-by: Ulrich Hecht <uli@suse.de>Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
linux-user: fix ppc target_stat64 st_blocks layout
Swap __pad1 and st_blocks fields location to maintain proper alignment.This fixes incorrect 'du' and 'stat' report on ppc guest.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list.
The naming convention is goofy and it causes a massive merge problem. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
linux-user: fcntl fixes for LTP
Fixes swaps on l_pid which were pretty much of random size. ImplementsF_SETLEASE, F_GETLEASE. Now passes all LTP fcntl tests.
microblaze: Support the latest mmu-kernel stat64 ABI.
Microblaze recently changed their ABI. The new is not backwards compatibleand there doesn't seem to be a way to distinguish old/new binaries.Let's support the latest ABI for now and hope someone figures out a way to...
linux-user: strace now handles guest stringscorrectly [v2]
On Tue, Jun 16, 2009 at 08:19:23PM -0500, Anthony Liguori wrote:
malc wrote: On my system the above line causes gcc to emit: In file included from /home/malc/x/rcs/git/qemu/linux-user/strace.c:12:...
malc wrote:
On my system the above line causes gcc to emit: In file included from /home/malc/x/rcs/git/qemu/linux-user/strace.c:12:...
On my system the above line causes gcc to emit:
In file included from /home/malc/x/rcs/git/qemu/linux-user/strace.c:12:...
RFC: fix fcntl support in linux-user - new try
Hi,
This is a new try to fix the fcntl support in linux-user. I tried toadress all comments but as the previous version is several weeks old,it's possible that I've missed some.
This patch doesn't handle linux specific fcntl flags. My plan is to get...
linux-user: Added IP_ADD_MEMBERSHIP/IP_DROP_MEMBERSHIP flags to setsockopt
Signed-off-by: Lionel Landwerlin <lionel.landwerlin@openwide.fr>Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
linux-user: Added IP_(UN)BLOCK_SOURCE/IP_(ADD|DROP)_SOURCE_MEMBERSHIP flags to setsockopt
linux-user: strace now handles guest strings correctly [v2]
- to not to break strace with GUEST_BASE is set:- Strace now can load and print guest strings correctly.- Added printing support for commonly used flags in some syscalls (e.g open, creat, mmap etc.)...
microblaze: linux-user support.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Fix target_siginfo ordering for MIPS.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7192 c046a42c-6fe2-441c-8c8c-71466251a162
linux-user: Added posix message queue syscalls except mq_notify
Signed-off-by: Lionel Landwerlin <lionel.landwerlin@openwide.fr>Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>Signed-off-by: Riku Voipio <riku.voipio@iki.fi>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>...
target-ppc: Fix struct target_stat64 for 32-bit host
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6483 c046a42c-6fe2-441c-8c8c-71466251a162
target-sh4: Fix struct target_stat64 for 64-bit host
Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6482 c046a42c-6fe2-441c-8c8c-71466251a162
target-alpha: fix termbits and target IOC macros
This patch fixes the two following problems for Alpha linux-user: - termbits.h is incorrectly using host IOC macros and structures - IOC bitfields sizes are incorrectly set
This patch corrects the ioctl TCGETS done by isatty function call...
target-alpha: add proper fcntl definitions
On Alpha the target to native fcntl definitions were missing. Because ofthis, programs trying to open files with the O_CREAT option were gettingO_APPEND instead, etc.
This was keeping gcc from the spec benchmarks from running, among other...
linux-user: fix getdents* syscalls
glibc's structs dirent and dirent64 is different from in-kernel direntand dirent64. Kernel headers doesn't provide structs dirent(64) anymore. So we should add it to qemu headers.
To avoid conflict with glibc it called struct linux_dirent(64)....
TARGET_MAP_xx macros: clean and alpha specific values
- Clean TARGET_MAP_xx macros to avoid nested #if #endif- Add alpha specific values
Based on a patch by Tristan Gingold
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5356 c046a42c-6fe2-441c-8c8c-71466251a162
Add MTIOCTOP, MTIOCGET and MTIOCPOS ioctls (Kirill Shutemov).
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5271 c046a42c-6fe2-441c-8c8c-71466251a162
linux-user: Fix target_statfs64 on 64-bit hosts
Testing qemu-x86_64, I happen to run df and came across these mistakesin the target_statfs/target_statfs64 structure definitions (reference:linux/include/asm-x86/statfs.h).
Signed-off-by: Jan Kiszka <jan.kiszka@web.de>...
Add loop device ioctls (Gary Thomas).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4257 c046a42c-6fe2-441c-8c8c-71466251a162
Fix flock64 structure on a few target (noticed by Gary Thomas)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4125 c046a42c-6fe2-441c-8c8c-71466251a162
Various linux-user structures and definitions fixes for PowerPC targets.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3800 c046a42c-6fe2-441c-8c8c-71466251a162
Fix PowerPC 64 stat and statfs structures definitions.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3712 c046a42c-6fe2-441c-8c8c-71466251a162
x86_64 linux user emulation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3646 c046a42c-6fe2-441c-8c8c-71466251a162
suppressed invalid TARGET_CMSG_FIRSTHDR macro
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3601 c046a42c-6fe2-441c-8c8c-71466251a162
Clean out the N32 macros from target-mips, and introduce MIPS ABI specificdefines for linux-user.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3556 c046a42c-6fe2-441c-8c8c-71466251a162
Support for 32 bit ABI on 64 bit targets (only enabled Sparc64)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3396 c046a42c-6fe2-441c-8c8c-71466251a162
CRIS Linux userland emulation, part 2. By Edgar E. Iglesias.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3367 c046a42c-6fe2-441c-8c8c-71466251a162
Code provision for n32/n64 mips userland emulation. Not functional yet.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3284 c046a42c-6fe2-441c-8c8c-71466251a162
Fix invalid MAP_xxx flags for PowerPC targets.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3184 c046a42c-6fe2-441c-8c8c-71466251a162
find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162
find -type f | xargs sed -i 's/[\t ]$//g' # on most files
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
Fix statfs(64) syscall wrapper, by Andreas Schwab.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3082 c046a42c-6fe2-441c-8c8c-71466251a162
Fix Sparc64 stat system call
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3053 c046a42c-6fe2-441c-8c8c-71466251a162
Use correct data structures for stat syscalls, by Magnus Damm.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3001 c046a42c-6fe2-441c-8c8c-71466251a162
linux-user errno mapping, by Stuart Anderson.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2908 c046a42c-6fe2-441c-8c8c-71466251a162
Sync __target_cmsg_nxthdr implementation with kernel header.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2894 c046a42c-6fe2-441c-8c8c-71466251a162
Suppress pointer from integer of different size warning.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2862 c046a42c-6fe2-441c-8c8c-71466251a162
Preliminary patch for Alpha Linux user mode emulation support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2600 c046a42c-6fe2-441c-8c8c-71466251a162
ColdFire target.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2196 c046a42c-6fe2-441c-8c8c-71466251a162
ARM 64-bit host fix.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2155 c046a42c-6fe2-441c-8c8c-71466251a162
initial MIPS signal handling (initial patch by Raphael Rigo)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2031 c046a42c-6fe2-441c-8c8c-71466251a162
mips socket calls (initial patch by Raphael Rigo)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2006 c046a42c-6fe2-441c-8c8c-71466251a162
sh4 target (Samuel Tardieu)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1861 c046a42c-6fe2-441c-8c8c-71466251a162
Arm Linux EABI syscall support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1756 c046a42c-6fe2-441c-8c8c-71466251a162
statfs fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1680 c046a42c-6fe2-441c-8c8c-71466251a162
mips user emulation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1668 c046a42c-6fe2-441c-8c8c-71466251a162
SPARC fixes (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1084 c046a42c-6fe2-441c-8c8c-71466251a162
sysinfo syscall (Francois Guimond)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@930 c046a42c-6fe2-441c-8c8c-71466251a162
shm support, more setsockopt and getsockopt calls, fds fix (initial patch by Paul McKerras)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@638 c046a42c-6fe2-441c-8c8c-71466251a162
ARM fcntl flag fixes (Lennert Buytenhek)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@564 c046a42c-6fe2-441c-8c8c-71466251a162
fcntl flags convertion (Jocelyn Mayer)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@538 c046a42c-6fe2-441c-8c8c-71466251a162
termios support for SPARC and PPC
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@496 c046a42c-6fe2-441c-8c8c-71466251a162