@@ -1417,8 +1417,27 @@ void kvm_arch_push_nmi(void *opaque)
}
#endif /* KVM_CAP_USER_NMI */
+static int kvm_turn_off_clock(CPUState *env)
+{
+ struct {
+ struct kvm_msrs info;
+ struct kvm_msr_entry entries[100];
+ } msr_data;
+
+ struct kvm_msr_entry *msrs = msr_data.entries;
+ int n = 0;
+
+ kvm_msr_entry_set(&msrs[n++], MSR_KVM_SYSTEM_TIME, 0);
+ kvm_msr_entry_set(&msrs[n++], MSR_KVM_WALL_CLOCK, 0);
+ msr_data.info.nmsrs = n;
+
+ return kvm_vcpu_ioctl(env, KVM_SET_MSRS, &msr_data);
+}
+
+
void kvm_arch_cpu_reset(CPUState *env)
{
+ kvm_turn_off_clock(env);
kvm_arch_reset_vcpu(env);
kvm_reset_mpstate(env);
}