hwaddr kernel_addr;
hwaddr fdt_addr;
+#ifdef CONFIG_KVM
/* kvm timer */
bool kvm_timer_dirty;
uint64_t kvm_timer_time;
uint64_t kvm_timer_compare;
uint64_t kvm_timer_state;
uint64_t kvm_timer_frequency;
+#endif /* CONFIG_KVM */
};
/*
}
};
+#ifdef CONFIG_KVM
static bool kvmtimer_needed(void *opaque)
{
return kvm_enabled();
}
-static int cpu_post_load(void *opaque, int version_id)
+static int cpu_kvmtimer_post_load(void *opaque, int version_id)
{
RISCVCPU *cpu = opaque;
CPURISCVState *env = &cpu->env;
.version_id = 1,
.minimum_version_id = 1,
.needed = kvmtimer_needed,
- .post_load = cpu_post_load,
+ .post_load = cpu_kvmtimer_post_load,
.fields = (VMStateField[]) {
VMSTATE_UINT64(env.kvm_timer_time, RISCVCPU),
VMSTATE_UINT64(env.kvm_timer_compare, RISCVCPU),
VMSTATE_END_OF_LIST()
}
};
+#endif
static bool debug_needed(void *opaque)
{
&vmstate_vector,
&vmstate_pointermasking,
&vmstate_rv128,
+#ifdef CONFIG_KVM
&vmstate_kvmtimer,
+#endif
&vmstate_envcfg,
&vmstate_debug,
&vmstate_smstateen,