diff options
| author | Claudio Fontana <cfontana@suse.de> | 2021-02-04 17:39:26 +0100 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2021-02-05 10:24:15 -1000 |
| commit | fb6916dd6ca8bb4b42d44baba9c67ecaf2279577 (patch) | |
| tree | 692eb654bd23ed45bcacc3f993d1d9fd29144f91 /include/hw/core/cpu.h | |
| parent | b86f59c71552591a17dd21ba8f09654bfa19a31e (diff) | |
| download | focaccia-qemu-fb6916dd6ca8bb4b42d44baba9c67ecaf2279577.tar.gz focaccia-qemu-fb6916dd6ca8bb4b42d44baba9c67ecaf2279577.zip | |
accel: introduce AccelCPUClass extending CPUClass
add a new optional interface to CPUClass, which allows accelerators to extend the CPUClass with additional accelerator-specific initializations. This will allow to separate the target cpu code that is specific to each accelerator, and register it automatically with object hierarchy lookup depending on accelerator code availability, as part of the accel_init_interfaces() initialization step. Signed-off-by: Claudio Fontana <cfontana@suse.de> Message-Id: <20210204163931.7358-19-cfontana@suse.de> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/hw/core/cpu.h')
| -rw-r--r-- | include/hw/core/cpu.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 4f6c6b18c9..38d813c389 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -79,6 +79,9 @@ struct TranslationBlock; /* see tcg-cpu-ops.h */ struct TCGCPUOps; +/* see accel-cpu.h */ +struct AccelCPUClass; + /** * CPUClass: * @class_by_name: Callback to map -cpu command line model name to an @@ -187,6 +190,7 @@ struct CPUClass { /* Keep non-pointer data at the end to minimize holes. */ int gdb_num_core_regs; bool gdb_stop_before_watchpoint; + struct AccelCPUClass *accel_cpu; /* when TCG is not available, this pointer is NULL */ struct TCGCPUOps *tcg_ops; |