diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2021-05-17 12:51:31 +0200 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2021-05-26 15:33:59 -0700 |
commit | 8b80bd28a5cf8d8af7d38abcf1c7d81a1b226ec3 (patch) | |
tree | 3605e96525b415e0d739591836978f4d131c5f4a /include/hw | |
parent | c2cf139d9c2f8f8b86686fe0e94a9daba27195a6 (diff) |
cpu: Introduce SysemuCPUOps structure
Introduce a structure to hold handler specific to sysemu.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210517105140.1062037-15-f4bug@amsat.org>
[rth: Squash "restrict hw/core/sysemu-cpu-ops.h" patch]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/core/cpu.h | 6 | ||||
-rw-r--r-- | include/hw/core/sysemu-cpu-ops.h | 21 |
2 files changed, 27 insertions, 0 deletions
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 1dfb788415..cd3fb70cb5 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -80,6 +80,9 @@ struct TCGCPUOps; /* see accel-cpu.h */ struct AccelCPUClass; +/* see sysemu-cpu-ops.h */ +struct SysemuCPUOps; + /** * CPUClass: * @class_by_name: Callback to map -cpu command line model name to an @@ -191,6 +194,9 @@ struct CPUClass { bool gdb_stop_before_watchpoint; struct AccelCPUClass *accel_cpu; + /* when system emulation is not available, this pointer is NULL */ + const struct SysemuCPUOps *sysemu_ops; + /* when TCG is not available, this pointer is NULL */ struct TCGCPUOps *tcg_ops; diff --git a/include/hw/core/sysemu-cpu-ops.h b/include/hw/core/sysemu-cpu-ops.h new file mode 100644 index 0000000000..e54a08ea25 --- /dev/null +++ b/include/hw/core/sysemu-cpu-ops.h @@ -0,0 +1,21 @@ +/* + * CPU operations specific to system emulation + * + * Copyright (c) 2012 SUSE LINUX Products GmbH + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#ifndef SYSEMU_CPU_OPS_H +#define SYSEMU_CPU_OPS_H + +#include "hw/core/cpu.h" + +/* + * struct SysemuCPUOps: System operations specific to a CPU class + */ +typedef struct SysemuCPUOps { +} SysemuCPUOps; + +#endif /* SYSEMU_CPU_OPS_H */ |