include/hw/core: Add mmu_index to CPUClass
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 28 Jan 2024 22:47:40 +0000 (08:47 +1000)
committerRichard Henderson <richard.henderson@linaro.org>
Fri, 2 Feb 2024 22:52:25 +0000 (08:52 +1000)
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>
include/hw/core/cpu.h

index 2c284d63972a526a8de88e4f46c4503232b629e3..4385ce54c999be69fc4e3306a8b3124a866b4960 100644 (file)
@@ -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);