Re: [PATCH v2 01/19] target/riscv: introduce TCG AccelCPUClass

2023-09-19 Thread LIU Zhiwei
On 2023/9/6 17:16, Daniel Henrique Barboza wrote: target/riscv/cpu.c needs to handle all possible accelerators (TCG and KVM at this moment) during both init() and realize() time. This forces us to resort to a lot of "if tcg" and "if kvm" throughout the code, which isn't wrong, but can get

[PATCH v2 01/19] target/riscv: introduce TCG AccelCPUClass

2023-09-06 Thread Daniel Henrique Barboza
target/riscv/cpu.c needs to handle all possible accelerators (TCG and KVM at this moment) during both init() and realize() time. This forces us to resort to a lot of "if tcg" and "if kvm" throughout the code, which isn't wrong, but can get cluttered over time. Splitting acceleration specific code