summary refs log tree commit diff stats
path: root/target/ppc/cpu_init.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-09-18 06:37:19 -0700
committerRichard Henderson <richard.henderson@linaro.org>2021-11-02 07:00:52 -0400
commit1db8af5c87ef5c89ecdb9e2d2620cd38cfbca940 (patch)
tree5c31eb459980b5e8e08fdf32faf549b68e80496c /target/ppc/cpu_init.c
parent12f0bc55791bd6e0864a430a0c3c9518ae7622e8 (diff)
downloadfocaccia-qemu-1db8af5c87ef5c89ecdb9e2d2620cd38cfbca940.tar.gz
focaccia-qemu-1db8af5c87ef5c89ecdb9e2d2620cd38cfbca940.zip
target/ppc: Implement ppc_cpu_record_sigsegv
Record DAR, DSISR, and exception_index.  That last means
that we must exit to cpu_loop ourselves, instead of letting
exception_index being overwritten.

This is exactly what the user-mode ppc_cpu_tlb_fill does,
so simply rename it as ppc_cpu_record_sigsegv.

Reviewed-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/ppc/cpu_init.c')
-rw-r--r--target/ppc/cpu_init.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c
index 65545ba9ca..1c7a7b4b38 100644
--- a/target/ppc/cpu_init.c
+++ b/target/ppc/cpu_init.c
@@ -9014,9 +9014,11 @@ static const struct SysemuCPUOps ppc_sysemu_ops = {
 
 static const struct TCGCPUOps ppc_tcg_ops = {
   .initialize = ppc_translate_init,
-  .tlb_fill = ppc_cpu_tlb_fill,
 
-#ifndef CONFIG_USER_ONLY
+#ifdef CONFIG_USER_ONLY
+  .record_sigsegv = ppc_cpu_record_sigsegv,
+#else
+  .tlb_fill = ppc_cpu_tlb_fill,
   .cpu_exec_interrupt = ppc_cpu_exec_interrupt,
   .do_interrupt = ppc_cpu_do_interrupt,
   .cpu_exec_enter = ppc_cpu_exec_enter,