1. 14 3月, 2014 5 次提交
  2. 23 7月, 2013 1 次提交
    • A
      linux-user: fix segmentation fault passing with h2g(x) != x · 732f9e89
      Alexander Graf 提交于
      When forwarding a segmentation fault into the guest process, we were passing
      the 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
      of the (usually 32-bit truncated) address. Passing in h2g(address) makes the
      guest process a lot happier.
      
      To make the code more obvious, introduce a h2g_nocheck() macro that does the
      same as h2g(), but allows us to convert addresses that may be outside of guest
      mapped range into the guest's view of address space.
      
      This fixes java running in arm-linux-user for me.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
      732f9e89
  3. 10 7月, 2013 1 次提交
  4. 05 7月, 2013 1 次提交
    • P
      user-exec.c: Set is_write correctly in the ARM cpu_signal_handler() · 023b0ae3
      Peter Maydell 提交于
      In the ARM implementation of cpu_signal_handler(), set is_write
      correctly using the FSR value which the kernel passes us in the
      error_code field of uc_mcontext. Since the WnR bit of the FSR was
      only introduced in ARMv6, this means that v5 cores will continue
      to behave as before this patch, but they are not really supported
      as hosts for linux-user mode anyway since they do not have the
      modern behaviour for unaligned accesses.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1370352705-27590-1-git-send-email-peter.maydell@linaro.org
      023b0ae3
  5. 12 6月, 2013 1 次提交
  6. 24 2月, 2013 1 次提交
    • P
      Replace all setjmp()/longjmp() with sigsetjmp()/siglongjmp() · 6ab7e546
      Peter Maydell 提交于
      The setjmp() function doesn't specify whether signal masks are saved and
      restored; on Linux they are not, but on BSD (including MacOSX) they are.
      We want to have consistent behaviour across platforms, so we should
      always use "don't save/restore signal mask" (this is also generally
      going to be faster). This also works around a bug in MacOSX where the
      signal-restoration on longjmp() affects the signal mask for a completely
      different thread, not just the mask for the thread which did the longjmp.
      The most visible effect of this was that ctrl-C was ignored on MacOSX
      because the CPU thread did a longjmp which resulted in its signal mask
      being applied to every thread, so that all threads had SIGINT and SIGTERM
      blocked.
      
      The POSIX-sanctioned portable way to do a jump without affecting signal
      masks is to siglongjmp() to a sigjmp_buf which was created by calling
      sigsetjmp() with a zero savemask parameter, so change all uses of
      setjmp()/longjmp() accordingly. [Technically POSIX allows sigsetjmp(buf, 0)
      to save the signal mask; however the following siglongjmp() must not
      restore the signal mask, so the pair can be effectively considered as
      "sigjmp/longjmp which don't touch the mask".]
      
      For Windows we provide a trivial sigsetjmp/siglongjmp in terms of
      setjmp/longjmp -- this is OK because no user will ever pass a non-zero
      savemask.
      
      The setjmp() uses in tests/tcg/test-i386.c and tests/tcg/linux-test.c
      are left untouched because these are self-contained singlethreaded
      test programs intended to be run under QEMU's Linux emulation, so they
      have neither the portability nor the multithreading issues to deal with.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: NRichard Henderson <rth@twiddle.net>
      Tested-by: NStefan Weil <sw@weilnetz.de>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      6ab7e546
  7. 19 12月, 2012 2 次提交
  8. 16 12月, 2012 1 次提交
  9. 16 9月, 2012 1 次提交
  10. 10 8月, 2012 1 次提交
  11. 01 8月, 2012 1 次提交
  12. 29 6月, 2012 1 次提交
    • B
      x86: avoid AREG0 for exceptions · 77b2bc2c
      Blue Swirl 提交于
      Add an explicit CPUX86State parameter instead of relying on AREG0.
      
      Merge raise_exception_env() to raise_exception(), likewise with
      raise_exception_err_env() and raise_exception_err().
      
      Introduce cpu_svm_check_intercept_param() and cpu_vmexit()
      as wrappers.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      77b2bc2c
  13. 09 5月, 2012 1 次提交
  14. 14 4月, 2012 1 次提交
  15. 15 3月, 2012 1 次提交
  16. 07 8月, 2011 1 次提交
  17. 30 7月, 2011 1 次提交
    • B
      exec.h cleanup · 3e457172
      Blue Swirl 提交于
      Move softmmu_exec.h include directives from target-*/exec.h to
      target-*/op_helper.c. Move also various other stuff only used in
      op_helper.c there.
      
      Define global env in dyngen-exec.h.
      
      For i386, move wrappers for segment and FPU helpers from user-exec.c
      to op_helper.c. Implement raise_exception_err_env() to handle dynamic
      CPUState. Move the function declarations to cpu.h since they can be
      used outside of op_helper.c context.
      
      LM32, s390x, UniCore32: remove unused cpu_halted(), regs_to_env() and
      env_to_regs().
      
      ARM: make raise_exception() static.
      
      Convert
      #include "exec.h"
      to
      #include "cpu.h"
      #include "dyngen-exec.h"
      and remove now unused target-*/exec.h.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      3e457172
  18. 27 6月, 2011 1 次提交
  19. 28 5月, 2011 1 次提交