History | View | Annotate | Download (155.4 kB)
Spelling fixes in comments (it's -> its)
Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Stefan Weil <sw@weilnetz.de>...
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 <khansa@kics.edu.pk>Suggested-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Andreas Färber <afaerber@suse.de>...
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>
Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging
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
Signed-off-by: Matthias Braun <matze@braunis.de>Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
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 stillaccess the individual pieces of the double.
Signed-off-by: Richard Henderson <rth@twiddle.net>
linux-user: Remove unused code
The code is unused since 8 years, so remove it.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
linux-user: Correct a few missuses of host addresses
Fix a few cases where we were passing host pointers to theguest.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
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...
linux-user/signal.c: Remove only-ever-set variable fpu_save_addr
Move the access of fpu_save into the commented out skeleton code forrestoring FPU registers on SPARC sigreturn, thus silencing a gcc4.6 "variable set but never used" warning.(This doesn't affect the calculation of 'err' because in fact...
linux-user/signal.c: Remove unused fenab
Remove fenab as it is only written, never used. Add a FIXMEcomment about the discrepancy between our behaviour and thatof the Linux kernel for this routine.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
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 <mj.mccormack@samsung.com>...
Fix compilation warning due to missing header for sigaction (followup)
This patch removes all references to signal.h when qemu-common.h is includedas they become redundant.
Signed-off-by: Alexandre Raymond <cerbere@gmail.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
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>
Fix typo in comment (dieing -> dying)
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
linux-user/arm: fix compilation failures using softfloat's struct types
Add uses of the float32/float64 boxing and unboxing macros so thatthe ARM linux-user targets will compile with USE_SOFTFLOAT_STRUCT_TYPESenabled.
linux-user: avoid gcc array overrun warning for sparc
Suppress a gcc array bounds overrun warning when filling in the SPARCsignal frame by adjusting our definition of the structure so that thefp and callers_pc membes are part of the ins[] array rather than...
linux-user: ARM: clear the IT bits when invoking a signal handler
When invoking a signal handler for an ARM target, make sure the ITbits in the CPSR are cleared. (This would otherwise cause incorrectexecution if the IT state was non-zero when an exception occured....
ARM: linux-user: Correct size of padding in target_ucontext_v2
The padding in the target_ucontext_v2 is defined by the size ofthe target's sigset_t type, not the host's. (This bug only causesproblems when we start using the uc_regspace[] array to expose...
ARM: linux-user: Expose VFP registers to signal handlers
For ARM linux-user mode signal handlers, fill in the ucontext withVFP register contents in the same way that the kernel does. We onlydo this for v2 format sigframe (2.6.12 and above); this is actually...
ARM: linux-user: Restore VFP state from ucontext on sigreturn
Restore the VFP registers from the ucontext on return from a signalhandler in linux-user mode. This means that signal handlers cannotaccidentally corrupt the interrupted code's VFP state, and allows...
ARM: linux-user: Expose iWMMXT registers to signal handlers
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
ARM: linux-user: Restore iWMMXT state from ucontext on sigreturn
microblaze: target-ify target_ucontext
Rename the members of target_ucontext so that they don't conflictwith possible host macros for ucontext members. This has alreadybeen done for the other targets.
Signed-off-by: Richard Henderson <rth@twiddle.net>...
microblaze: Pass a ucontext * as 3rd sighandler arg
There is disagreement between microblaze glibc and the kernelto what the third arg of signal handlers should point to.
Change QEMU linux-user to match the kernel port. glibc patchesare pending.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
microblaze: Correct signal frame setup.
Pass the context in r7.
sparc: Fix lazy flag calculation on interrupts, refactor
Recalculate Sparc64 CPU flags on interrupts, otherwise some earlierflags could be stored to pstate.
Refactor PSR/CCR/CWP handling: concentrate the actualfunctions to op_helper.c.
Thanks to Igor Kovalenko for reporting....
linux-user/ia64: workaround ia64 strangenesses
ia64 has some strangenesses that need to be workaround:- it has a __clone2() syscall instead of the using clone() one, with different arguments, and which is not declared in the usual headers.- ucontext.uc_sigmask is declared with type long int, while it is...
Replace assert(0) with abort() or cpu_abort()
When building with -DNDEBUG, assert(0) will not stop executionso it must not be used for abnormal termination.
Use cpu_abort() when in CPU context, abort() otherwise.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix build with -DNDEBUG in CFLAGS
linux-user: Save/restore fpu registers to signal context on sh4
As "todo" comment in source code.And modify restore_sigcontext() to have three args as kernel's does.
Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
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: cleanup force_sig() calls
Force_sig should be always called with TARGET_ signals.Not that it really matters with SEGV, so this patch isjust for cleanup and improving consistency.
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
linux-user: remove hardcoded value of _NSIG in signal.c
In a bunch of places, 64 is used as value of _NSIG but it's wrongat least on MIPS were _NSIG is 128.
Based on a patch from Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
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>
m68k, linux-user: add setup_rt_frame
This patch implements setup_rt_frame().
Signed-off-by: Laurent Vivier <laurent@vivier.eu>Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
m68k,linux-user: add setup_frame
This patch adds signals management for linux-user.
It implements setup_frame() which allows to call the user signalhandler.
setup_rt_frame() is always unimplemented.
Fix most warnings (errors with -Werror) when debugging is enabled
I used the following command to enable debugging:perl -p -i -e 's/^\/\/#define DEBUG/#define DEBUG/g' * /* *//*
Avoid name clashes with symbols that leak from system headers
Update to a hopefully more future proof FSF address
MIPS signal handling fix
Add explicit padding to MIPS signal frame structures.
Signed-off-by: Paul Brook <paul@codesourcery.com>
linux-user: implemented ELF coredump support for ARM target
When target process is killed with signal (such signal thatshould dump core) a coredump file is created. This file issimilar than coredump generated by Linux (there are few exceptionsthough)....
microblaze: linux-user support.
linux-user: ppc signal handling
Implement setup_{,rt_}frame and do_{,rt_}sigreturn for PPC 32-bit. Usethe same TARGET_QEMU_ESIGRETURN hack as for MIPS to avoid clobberingregister state on a sigreturn.
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>...
MIPS signal handling fixes.
Also fixes a register corruption bug in do_sigreturn. When "returning" from sigreturn we are actually restoring the virtual cpu state from thesignal frame. This is actually surprisingly hard to observe in practice.
Typically an thread be blocked in a FUTEX_WAIT call when the signal arrives,...
Translate signal values in exit status.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7131 c046a42c-6fe2-441c-8c8c-71466251a162
linux-user: proper exit code for uncaught signals
The proper exit code for dieing from an uncaught signal is -<signal>.The kernel doesn't allow exit() or _exit() to pass a negative value.To get the proper exit code we need to actually die from an uncaught signal....
Use a dedicated function to request exit from execution loop
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6762 c046a42c-6fe2-441c-8c8c-71466251a162
The _exit syscall is used for both thread termination in NPTL applications,and process termination in legacy applications. Try to guess which we wantbased on the presence of multiple threads.
Also implement locking when modifying the CPU list.
Signed-off-by: Paul Brook <paul@codesourcery.com>...
Replace noreturn with QEMU_NORETURN
Thanks to Robert Riebisch for analysis [1]
[1] http://marc.info/?l=qemu-devel&m=123352293319271&w=2
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6492 c046a42c-6fe2-441c-8c8c-71466251a162
linux-user: fix signal.c warning
This patch fixes:
linux-user/signal.c:1403: warning: no previous prototype for 'do_sigreturn_v1'linux-user/signal.c:1473: warning: no previous prototype for 'do_sigreturn_v2'linux-user/signal.c:1511: warning: no previous prototype for 'do_rt_sigreturn_v1'...
Add noreturn function attribute
Introduce noreturn attribute and attach it to cpu_loop_exit as well asinterrupt/exception helpers for i386. This avoids a bunch of gcc4warnings.
[ Note that this patch comes with a workaround to include qemu-common.heven in cases where is currently causes conflicts with dyngen-exec.h....
Fix more FSF addresses
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6192 c046a42c-6fe2-441c-8c8c-71466251a162
Fix qemu endless loop when raising a SIGSEGV/SIGBUS signal with gdbstub in user emulation
When a SIGSEGV signal is raised in user mode emulation the currenttest to know whether the signal is sent by the kernel is wrong :
info->si_code == SI_KERNEL
according to /usr/include/bits/siginfo.h it should be...
User-mode GDB stub improvements - handle signals
Handle signals in the user-mode GDB stub. Report them to GDB, andallow it to change or cancel them. Also correct the protocol numbering;it happens to match Linux numbering for SIGINT and SIGTRAP, but that's...
linux-user: Add support for STOP/CONT signals.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5802 c046a42c-6fe2-441c-8c8c-71466251a162
linux-user: sig is target signal.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5801 c046a42c-6fe2-441c-8c8c-71466251a162
CRIS: linux-user signals dont need ERP compensation after break anymore.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5450 c046a42c-6fe2-441c-8c8c-71466251a162
Make target_sigaltstack_used static
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5428 c046a42c-6fe2-441c-8c8c-71466251a162
Move offsetof to osdep.h, remove local defintions.
With this container_of can actually be used without causing build errors.Reformat container_of.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5234 c046a42c-6fe2-441c-8c8c-71466251a162
Fix some warnings that would be generated by gcc -Wmissing-prototypes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5022 c046a42c-6fe2-441c-8c8c-71466251a162
Fix a bunch of type mismatch-related warnings (Jan Kiszka).
Fix a typo in my previous comming (spotted by Laurent Desnouges).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4877 c046a42c-6fe2-441c-8c8c-71466251a162
More efficient target register / TC accesses.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4794 c046a42c-6fe2-441c-8c8c-71466251a162
Multithreaded locking fixes.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4692 c046a42c-6fe2-441c-8c8c-71466251a162
Make signal queues per thread.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4635 c046a42c-6fe2-441c-8c8c-71466251a162
Fix usermode build.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4634 c046a42c-6fe2-441c-8c8c-71466251a162
Copy siginfo.si_code.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4632 c046a42c-6fe2-441c-8c8c-71466251a162
Translate whole of target_sigset. Use host sigset accessors.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4631 c046a42c-6fe2-441c-8c8c-71466251a162
Perform target->host signal mapping for *kill syscalls.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4625 c046a42c-6fe2-441c-8c8c-71466251a162
Update ARM non-rt sigframe layout.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4385 c046a42c-6fe2-441c-8c8c-71466251a162
Update ARM rt_frame layout.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4365 c046a42c-6fe2-441c-8c8c-71466251a162
Fix Thumb signal handlers.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4089 c046a42c-6fe2-441c-8c8c-71466251a162
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4012 c046a42c-6fe2-441c-8c8c-71466251a162
First try at supporting ordinary signals for CRIS linux-user guests.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3999 c046a42c-6fe2-441c-8c8c-71466251a162
Make MIPS MT implementation more cache friendly.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3981 c046a42c-6fe2-441c-8c8c-71466251a162
SH4: Signal handling for the user space emulator, by Magnus Damm.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3764 c046a42c-6fe2-441c-8c8c-71466251a162
fixed more invalid pointer usage
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3624 c046a42c-6fe2-441c-8c8c-71466251a162
user access fixes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3623 c046a42c-6fe2-441c-8c8c-71466251a162
removed warnings - improved sparc32/64 signal frame setup - disabled x86 frame setup for x86_64
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3608 c046a42c-6fe2-441c-8c8c-71466251a162
removed warnings - fixed arm stack copy bug
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3593 c046a42c-6fe2-441c-8c8c-71466251a162
Linux user memory access API change (initial patch by Thayne Harbaugh)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3583 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
removed obsolete x86 code copy support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3551 c046a42c-6fe2-441c-8c8c-71466251a162
Syscall target errno fixes, by Thayne Harbaugh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3418 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
Implement sparc64_[gs]et_context
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3334 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
linux-user sigaltstack() syscall, by Thayne Harbaugh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3252 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
Partial support for 34K multithreading, not functional yet.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3156 c046a42c-6fe2-441c-8c8c-71466251a162
Sigio fd passing, by Alexander Graf.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3077 c046a42c-6fe2-441c-8c8c-71466251a162
Spelling fixes, by Stefan Weil.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3066 c046a42c-6fe2-441c-8c8c-71466251a162
MIPS linux-user update.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2810 c046a42c-6fe2-441c-8c8c-71466251a162
Code provision for x86_64 and PowerPC 64 linux user mode support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2619 c046a42c-6fe2-441c-8c8c-71466251a162
Don't let sigaction handle SIGKILL/SIGSTOP, by Stuart Anderson.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2561 c046a42c-6fe2-441c-8c8c-71466251a162
removed invalid code
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2202 c046a42c-6fe2-441c-8c8c-71466251a162
Sparc64 host support (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2064 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