diff mbox series

[v3,33/45] qom: Add MMU_DEBUG_LOAD

Message ID 20180124232625.30105-34-richard.henderson@linaro.org
State New
Headers show
Series hppa-softmmu | expand

Commit Message

Richard Henderson Jan. 24, 2018, 11:26 p.m. UTC
This lets us tell bottom levels of virtual memory translation
routines that the access is from within QEMU itself and bypass
certain tests.

Cc: Andreas Färber <afaerber@suse.de>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 include/qom/cpu.h      | 3 ++-
 target/sh4/op_helper.c | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

-- 
2.14.3
diff mbox series

Patch

diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index 93bd546879..6367acca97 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -64,7 +64,8 @@  typedef uint64_t vaddr;
 typedef enum MMUAccessType {
     MMU_DATA_LOAD  = 0,
     MMU_DATA_STORE = 1,
-    MMU_INST_FETCH = 2
+    MMU_INST_FETCH = 2,
+    MMU_DEBUG_LOAD = 3
 } MMUAccessType;
 
 typedef struct CPUWatchpoint CPUWatchpoint;
diff --git a/target/sh4/op_helper.c b/target/sh4/op_helper.c
index d798f239cf..8fa7cb6b42 100644
--- a/target/sh4/op_helper.c
+++ b/target/sh4/op_helper.c
@@ -36,6 +36,8 @@  void superh_cpu_do_unaligned_access(CPUState *cs, vaddr addr,
     case MMU_DATA_STORE:
         cs->exception_index = 0x100;
         break;
+    default:
+        g_assert_not_reached();
     }
     cpu_loop_exit_restore(cs, retaddr);
 }