diff options
author | Daniel Henrique Barboza <dbarboza@ventanamicro.com> | 2023-09-25 14:57:05 -0300 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2023-10-12 12:24:07 +1000 |
commit | fce8bb5d088c655be18b1642e716489df608a0c4 (patch) | |
tree | 3fe687446ffd9d84a62825a9a4ce6e5ef3b56855 /target/riscv/cpu.h | |
parent | f51d03b01fac6cf2757d02efe1cc2679b1d133ac (diff) | |
download | qemu-fce8bb5d088c655be18b1642e716489df608a0c4.zip qemu-fce8bb5d088c655be18b1642e716489df608a0c4.tar.gz qemu-fce8bb5d088c655be18b1642e716489df608a0c4.tar.bz2 |
target/riscv/tcg: introduce tcg_cpu_instance_init()
tcg_cpu_instance_init() will be the 'cpu_instance_init' impl for the TCG
accelerator. It'll be called from within riscv_cpu_post_init(), via
accel_cpu_instance_init(), similar to what happens with KVM. In fact, to
preserve behavior, the implementation will be similar to what
riscv_cpu_post_init() already does.
In this patch we'll move riscv_cpu_add_user_properties() and
riscv_init_max_cpu_extensions() and all their dependencies to tcg-cpu.c.
All multi-extension properties code was moved. The 'multi_ext_user_opts'
hash table was also moved to tcg-cpu.c since it's a TCG only structure,
meaning that we won't have to worry about initializing a TCG hash table
when running a KVM CPU anymore.
riscv_cpu_add_user_properties() will remain in cpu.c for now due to how
much code it requires to be moved at the same time. We'll do that in the
next patch.
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20230925175709.35696-16-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target/riscv/cpu.h')
-rw-r--r-- | target/riscv/cpu.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index 7cc9f3d..9d41bea 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -710,7 +710,6 @@ enum riscv_pmu_event_idx { /* used by tcg/tcg-cpu.c*/ void isa_ext_update_enabled(RISCVCPU *cpu, uint32_t ext_offset, bool en); -bool cpu_cfg_ext_is_user_set(uint32_t ext_offset); bool isa_ext_is_enabled(RISCVCPU *cpu, uint32_t ext_offset); int cpu_cfg_ext_get_min_version(uint32_t ext_offset); void riscv_cpu_set_misa(CPURISCVState *env, RISCVMXL mxl, uint32_t ext); |