diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-08-03 17:55:23 +1000 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2016-09-07 12:40:12 +1000 |
commit | ba4a8df83f474be1ba02510f960e5224f29d229c (patch) | |
tree | 7df65b719633d5d973c34869c3173ac23f835101 | |
parent | dd2fa4f72d1ce44ce1635fe3a744bd47d8f2ab05 (diff) | |
download | qemu-ba4a8df83f474be1ba02510f960e5224f29d229c.zip qemu-ba4a8df83f474be1ba02510f960e5224f29d229c.tar.gz qemu-ba4a8df83f474be1ba02510f960e5224f29d229c.tar.bz2 |
ppc: Fix catching some segfaults in user mode
The usermode "translate" code generates an error code value that
has the "is_write" bit set, which causes our switch/case to miss
and display "Invalid segfault errno" and a spurrious second state
dump. Fix it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r-- | linux-user/main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index d112834..32070a4 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -1656,6 +1656,7 @@ void cpu_loop(CPUPPCState *env) /* XXX: check this. Seems bugged */ switch (env->error_code & 0xFF000000) { case 0x40000000: + case 0x42000000: info.si_signo = TARGET_SIGSEGV; info.si_errno = 0; info.si_code = TARGET_SEGV_MAPERR; |