History | View | Annotate | Download (19.8 kB)
linux-user: fix segmentation fault passing with h2g(x) != x
When forwarding a segmentation fault into the guest process, we were passingthe host's address directly into the guest process's signal descriptor.
That obviously confused the guest process, since it didn't know what to make...
Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging
QOM CPUState refactorings
cpu: Replace cpu_single_env with CPUState current_cpu
Move it to qom/cpu.h.
Signed-off-by: Andreas Färber <afaerber@suse.de>
user-exec.c: Set is_write correctly in the ARM cpu_signal_handler()
In the ARM implementation of cpu_signal_handler(), set is_writecorrectly using the FSR value which the kernel passes us in theerror_code field of uc_mcontext. Since the WnR bit of the FSR was...
user-exec.c: aarch64 initial implementation of cpu_signal_handler
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>Reviewed-by: Richard Henderson <rth@twiddle.net>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 51AF4028.5030504@huawei.com...
Replace all setjmp()/longjmp() with sigsetjmp()/siglongjmp()
The setjmp() function doesn't specify whether signal masks are saved andrestored; on Linux they are not, but on BSD (including MacOSX) they are.We want to have consistent behaviour across platforms, so we should...
Merge remote-tracking branch 'bonzini/header-dirs' into staging
build: kill libdis, move disassemblers to disas/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
fix build error on ARM due to wrong glibc check
the test for glibc < 2 "succeeds" wrongly for any non-glibc C library,and breaks the build on musl libc.we must first test if GLIBC is defined at all, before using itunconditionally.
Signed-off-by: John Spencer <maillist-qemu@barfooze.de>...
exec: refactor cpu_restore_state
Refactor common code around calls to cpu_restore_state().
tb_find_pc() has now no external users, make it static.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Remove unused CONFIG_TCG_PASS_AREG0 and dead code
Now that CONFIG_TCG_PASS_AREG0 is enabled for all targets,remove dead code and support for !CONFIG_TCG_PASS_AREG0 case.
Remove dyngen-exec.h and all references to it. Although included byhw/spapr_hcall.c, it does not seem to use it....
user: fix accidental AREG0 use
Global register AREG0 was always assumed to be usable in user-exec.c,but this is incorrect for several targets.
Fix with #ifdeffery and by using other variables.
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 compilationof certain targets (eg. cris-user) breaks.
This struct was always typedef'd to be the same as 'siginfo_t' which...
x86: avoid AREG0 for exceptions
Add an explicit CPUX86State parameter instead of relying on AREG0.
Merge raise_exception_env() to raise_exception(), likewise withraise_exception_err_env() and raise_exception_err().
Introduce cpu_svm_check_intercept_param() and cpu_vmexit()...
user-exec.c: Don't assert on segfaults for non-valid addresses
h2g() will assert if passed an address that's not a valid guest address,so handle_cpu_signal() needs to check before passing "data addresswhich caused a segfault" to it, since for a misbehaving guest...
Use uintptr_t for various op related functions
Use uintptr_t instead of void * or unsigned long inseveral op related functions, env->mem_io_pc andGETPC macro.
Reviewed-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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...
Remove unused is_softmmu parameter from cpu_handle_mmu_fault
Parameter is_softmmu (and its evil mutant twin brother is_softmuu)is not used in cpu_*_handle_mmu_fault() functions, remove themand adjust callers.
Acked-by: Richard Henderson <rth@twiddle.net>...
exec.h cleanup
Move softmmu_exec.h include directives from target-*/exec.h totarget-*/op_helper.c. Move also various other stuff only used inop_helper.c there.
Define global env in dyngen-exec.h.
For i386, move wrappers for segment and FPU helpers from user-exec.c...
cpu_loop_exit: avoid using AREG0
Make cpu_loop_exit() take a parameter for CPUState instead of relyingon global env.
Move user emulator stuff from cpu-exec.c to user-exec.c
Simplify cpu-exec.c by refactoring.