Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
---
target/riscv/kvm-stub.c | 30 ------------------------------
target/riscv/kvm_riscv.h | 31 +++++++++++++++++++++++++++++++
target/riscv/meson.build | 2 +-
3 files changed, 32 insertions(+), 31 deletions(-)
delete mode 100644 target/riscv/kvm-stub.c
diff --git a/target/riscv/kvm_riscv.h b/target/riscv/kvm_riscv.h
index f6501e68e2..c9ecd9a967 100644
--- a/target/riscv/kvm_riscv.h
+++ b/target/riscv/kvm_riscv.h
@@ -19,6 +19,7 @@
#ifndef QEMU_KVM_RISCV_H
#define QEMU_KVM_RISCV_H
+#ifdef CONFIG_KVM
void kvm_riscv_cpu_add_kvm_properties(Object *obj);
void kvm_riscv_reset_vcpu(RISCVCPU *cpu);
void kvm_riscv_set_irq(RISCVCPU *cpu, int irq, int level);
@@ -27,5 +28,35 @@ void kvm_riscv_aia_create(MachineState *machine, uint64_t
group_shift,
uint64_t aplic_base, uint64_t imsic_base,
uint64_t guest_num);
void riscv_kvm_aplic_request(void *opaque, int irq, int level);
+#else
+static inline void kvm_riscv_cpu_add_kvm_properties(Object *obj)
+{
+ g_assert_not_reached();
+}
+
+static inline void kvm_riscv_reset_vcpu(RISCVCPU *cpu)
+{
+ g_assert_not_reached();
+}
+
+static inline void kvm_riscv_set_irq(RISCVCPU *cpu, int irq, int level)
+{
+ g_assert_not_reached();
+}
+
+static inline void kvm_riscv_aia_create(MachineState *machine,
+ uint64_t group_shift, uint64_t aia_irq_num,
+ uint64_t aia_msi_num, uint64_t aplic_base,
+ uint64_t imsic_base, uint64_t guest_num)
+{
+ g_assert_not_reached();
+}
+
+static inline void riscv_kvm_aplic_request(void *opaque, int irq, int level)
+{
+ g_assert_not_reached();
+}
+
+#endif /* CONFIG_KVM */