mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
b86f59c715
commit
fb6916dd6c
4 changed files with 87 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue