target-tilegx: Generate SEGV properly

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
diff --git a/target-tilegx/cpu.c b/target-tilegx/cpu.c
index 87aee24..78b73e4 100644
--- a/target-tilegx/cpu.c
+++ b/target-tilegx/cpu.c
@@ -119,7 +119,10 @@
 static int tilegx_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int rw,
                                        int mmu_idx)
 {
-    cpu_dump_state(cs, stderr, fprintf, 0);
+    TileGXCPU *cpu = TILEGX_CPU(cs);
+
+    cs->exception_index = TILEGX_EXCP_SEGV;
+    cpu->env.excaddr = address;
     return 1;
 }