We will fill in the functions in future commits. Signed-off-by: Alex Bennée --- target/loongarch/kvm/kvm.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/target/loongarch/kvm/kvm.c b/target/loongarch/kvm/kvm.c index 941142305e4..4bc08f195ed 100644 --- a/target/loongarch/kvm/kvm.c +++ b/target/loongarch/kvm/kvm.c @@ -29,6 +29,8 @@ #include "cpu-csr.h" #include "kvm_loongarch.h" #include "trace.h" +#include "accel/accel-cpu-target.h" +#include "accel/kvm/cpu-ops.h" static bool cap_has_mp_state; static unsigned int brk_insn; @@ -1648,3 +1650,26 @@ int kvm_loongarch_set_interrupt(LoongArchCPU *cpu, int irq, int level) void kvm_arch_accel_class_init(ObjectClass *oc) { } + +static const KVMCPUOps loongarch_kvm_cpu_ops = { +}; + +static void kvm_cpu_accel_class_init(ObjectClass *oc, const void *data) +{ + KVMAccelCPUClass *kacc = KVM_ACCEL_CPU_CLASS(oc); + + kacc->cpu_ops = &loongarch_kvm_cpu_ops; +} + +static const TypeInfo kvm_cpu_accel_type_info = { + .name = ACCEL_CPU_NAME("kvm"), + .parent = TYPE_KVM_ACCEL_CPU, + .class_init = kvm_cpu_accel_class_init, + .abstract = true, +}; + +static void kvm_cpu_accel_register_types(void) +{ + type_register_static(&kvm_cpu_accel_type_info); +} +type_init(kvm_cpu_accel_register_types); -- 2.47.3