diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-06-06 12:07:47 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-07-04 12:08:44 +0200 |
commit | 38623a9f63395cecdd4138a305e1187e10964990 (patch) | |
tree | 0f1e879dacfa73fa8d819bcc807e71a4e78f1cfe /include | |
parent | b9b8ce038497a18f4525e9b229f9090b1cec3b05 (diff) | |
download | qemu-38623a9f63395cecdd4138a305e1187e10964990.zip qemu-38623a9f63395cecdd4138a305e1187e10964990.tar.gz qemu-38623a9f63395cecdd4138a305e1187e10964990.tar.bz2 |
accel: Keep reference to AccelOpsClass in AccelClass
Allow dereferencing AccelOpsClass outside of accel/accel-system.c.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20250703173248.44995-30-philmd@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/qemu/accel.h | 3 | ||||
-rw-r--r-- | include/system/accel-ops.h | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/qemu/accel.h b/include/qemu/accel.h index fbd3d89..9dea314 100644 --- a/include/qemu/accel.h +++ b/include/qemu/accel.h @@ -37,6 +37,9 @@ typedef struct AccelClass { /*< public >*/ const char *name; + /* Cached by accel_init_ops_interfaces() when created */ + AccelOpsClass *ops; + int (*init_machine)(MachineState *ms); bool (*cpu_common_realize)(CPUState *cpu, Error **errp); void (*cpu_common_unrealize)(CPUState *cpu); diff --git a/include/system/accel-ops.h b/include/system/accel-ops.h index e775ecc..a786c7d 100644 --- a/include/system/accel-ops.h +++ b/include/system/accel-ops.h @@ -10,6 +10,7 @@ #ifndef ACCEL_OPS_H #define ACCEL_OPS_H +#include "qemu/accel.h" #include "exec/vaddr.h" #include "qom/object.h" @@ -31,7 +32,7 @@ struct AccelOpsClass { /*< public >*/ /* initialization function called when accel is chosen */ - void (*ops_init)(AccelOpsClass *ops); + void (*ops_init)(AccelClass *ac); bool (*cpus_are_resettable)(void); void (*cpu_reset_hold)(CPUState *cpu); |