diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2013-07-10 10:54:09 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-07-10 10:54:09 -0500 |
commit | 9f9a03b9818194da39c6759d9b0cbee5d7ace4e1 (patch) | |
tree | 8480f4d8fb85216f98e6503f7648fba7ee008e6e /user-exec.c | |
parent | 6272d17c420b8cdd6af1784edd34f0b3e9f26b76 (diff) | |
parent | 8384274eda1d7cb01f326143fa6118562c1eb5be (diff) | |
download | qemu-9f9a03b9818194da39c6759d9b0cbee5d7ace4e1.tar.gz qemu-9f9a03b9818194da39c6759d9b0cbee5d7ace4e1.tar.bz2 qemu-9f9a03b9818194da39c6759d9b0cbee5d7ace4e1.zip |
Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging
# By Andreas Schwab (2) and others
# Via Riku Voipio
* riku/linux-user-for-upstream:
linux-user: Do not ignore mmap failure from host
linux-user: improve target_to_host_sock_type conversion
user-exec.c: Set is_write correctly in the ARM cpu_signal_handler()
linux-user: Fix sys_utimensat (would not compile on old glibc)
linux-user: fix signal number range check
linux-user: add SIOCADDRT/SIOCDELRT support
linux-user: handle /proc/$$ like /proc/self
Message-id: cover.1373051589.git.riku.voipio@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'user-exec.c')
-rw-r--r-- | user-exec.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/user-exec.c b/user-exec.c index fa7f1f1de9..57c8e8de26 100644 --- a/user-exec.c +++ b/user-exec.c @@ -20,6 +20,7 @@ #include "cpu.h" #include "disas/disas.h" #include "tcg.h" +#include "qemu/bitops.h" #undef EAX #undef ECX @@ -441,8 +442,11 @@ int cpu_signal_handler(int host_signum, void *pinfo, #else pc = uc->uc_mcontext.arm_pc; #endif - /* XXX: compute is_write */ - is_write = 0; + + /* error_code is the FSR value, in which bit 11 is WnR (assuming a v6 or + * later processor; on v5 we will always report this as a read). + */ + is_write = extract32(uc->uc_mcontext.error_code, 11, 1); return handle_cpu_signal(pc, (unsigned long)info->si_addr, is_write, &uc->uc_sigmask, puc); |