summary refs log tree commit diff stats
path: root/include/hw/core
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2024-01-29 08:47:40 +1000
committerRichard Henderson <richard.henderson@linaro.org>2024-02-03 08:52:25 +1000
commit343ed32dacd866e393a8fa4825c53bcd610330f5 (patch)
tree49bd1a76884e7f19a8bfb33883c186f89cfb3261 /include/hw/core
parent29b008927ef6e3fbb70e6607b25d3fcae26a5190 (diff)
downloadfocaccia-qemu-343ed32dacd866e393a8fa4825c53bcd610330f5.tar.gz
focaccia-qemu-343ed32dacd866e393a8fa4825c53bcd610330f5.zip
include/hw/core: Add mmu_index to CPUClass
To be used after all targets have populated the hook.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/hw/core')
-rw-r--r--include/hw/core/cpu.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 2c284d6397..4385ce54c9 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -103,6 +103,8 @@ struct SysemuCPUOps;
  * @parse_features: Callback to parse command line arguments.
  * @reset_dump_flags: #CPUDumpFlags to use for reset logging.
  * @has_work: Callback for checking if there is work to do.
+ * @mmu_index: Callback for choosing softmmu mmu index;
+ *       may be used internally by memory_rw_debug without TCG.
  * @memory_rw_debug: Callback for GDB memory access.
  * @dump_state: Callback for dumping state.
  * @query_cpu_fast:
@@ -150,6 +152,7 @@ struct CPUClass {
     void (*parse_features)(const char *typename, char *str, Error **errp);
 
     bool (*has_work)(CPUState *cpu);
+    int (*mmu_index)(CPUState *cpu, bool ifetch);
     int (*memory_rw_debug)(CPUState *cpu, vaddr addr,
                            uint8_t *buf, int len, bool is_write);
     void (*dump_state)(CPUState *cpu, FILE *, int flags);