In order to compile cpu.c and machine.c once for system mode and keep the linker happy in a single binary setting, we need to stub out some required functions otherwise only available under CONFIG_KVM.
Signed-off-by: Anton Johansson <[email protected]> --- target/riscv/kvm/kvm-stub.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/target/riscv/kvm/kvm-stub.c b/target/riscv/kvm/kvm-stub.c index 64e39c96d8..5dc91b9265 100644 --- a/target/riscv/kvm/kvm-stub.c +++ b/target/riscv/kvm/kvm-stub.c @@ -21,3 +21,24 @@ uint64_t kvm_riscv_get_timebase_frequency(RISCVCPU *cpu) { g_assert_not_reached(); } + +void kvm_riscv_reset_vcpu(RISCVCPU *cpu) +{ + g_assert_not_reached(); +} + +void kvm_riscv_set_irq(RISCVCPU *cpu, int irq, int level) +{ + g_assert_not_reached(); +} + +void riscv_kvm_cpu_finalize_features(RISCVCPU *cpu, Error **errp) +{ + g_assert_not_reached(); +} + +bool kvm_riscv_has_mp_state(void) +{ + g_assert_not_reached(); +} + -- 2.52.0
