Some features such as LBT and PMU are implemented in kvm mode,
With paravirt features in future, post init function is added
for kvm mode, so that property for these features will be created
in kvm post init function.
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
loongarch_set_pmu);
object_property_set_description(obj, "pmu",
"Set off to performance monitor unit.");
-
+ kvm_loongarch_cpu_post_init(cpu);
} else {
cpu->lbt = ON_OFF_AUTO_OFF;
cpu->pmu = ON_OFF_AUTO_OFF;
void loongarch_cpu_post_init(Object *obj);
+#ifdef CONFIG_KVM
+void kvm_loongarch_cpu_post_init(LoongArchCPU *cpu);
+#else
+static inline void kvm_loongarch_cpu_post_init(LoongArchCPU *cpu)
+{
+}
+#endif
+
#endif /* LOONGARCH_CPU_H */
return ret;
}
+void kvm_loongarch_cpu_post_init(LoongArchCPU *cpu)
+{
+}
+
int kvm_arch_destroy_vcpu(CPUState *cs)
{
return 0;