target/riscv: move riscv_cpu_realize_tcg() to TCG::cpu_realizefn()
commit9dcecbd724ebadd8c957356e629aab9d724e9889
authorDaniel Henrique Barboza <dbarboza@ventanamicro.com>
Mon, 25 Sep 2023 17:56:52 +0000 (25 14:56 -0300)
committerAlistair Francis <alistair.francis@wdc.com>
Thu, 12 Oct 2023 01:56:28 +0000 (12 11:56 +1000)
treef8aa8db752a7cd784a4dcb27a5a04603d6fa3909
parent9c5180d7998b8e211ec038e5342b305e78e06e22
target/riscv: move riscv_cpu_realize_tcg() to TCG::cpu_realizefn()

riscv_cpu_realize_tcg() was added to allow TCG cpus to have a different
realize() path during the common riscv_cpu_realize(), making it a good
choice to start moving TCG exclusive code to tcg-cpu.c.

Rename it to tcg_cpu_realizefn() and assign it as a implementation of
accel::cpu_realizefn(). tcg_cpu_realizefn() will then be called during
riscv_cpu_realize() via cpu_exec_realizefn(). We'll use a similar
approach with KVM in the near future.

riscv_cpu_validate_set_extensions() is too big and with too many
dependencies to be moved in this same patch. We'll do that next.

Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
Message-ID: <20230925175709.35696-3-dbarboza@ventanamicro.com>
[ Changes by AF:
 - Renames to fix build failures after rebase
]
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/cpu.c
target/riscv/tcg/tcg-cpu.c