]> git.proxmox.com Git - mirror_qemu.git/blobdiff - target-i386/kvm.c
target-i386: Add support to migrate vcpu's TSC rate
[mirror_qemu.git] / target-i386 / kvm.c
index 23d6b869a342ee9275ee79d771df6b8fbd78ccaf..419bb18bb3def9123790003779be01df8ab2977a 100644 (file)
@@ -2507,6 +2507,15 @@ int kvm_arch_put_registers(CPUState *cpu, int level)
         }
     }
 
+    if (level == KVM_PUT_FULL_STATE) {
+        /* We don't check for kvm_arch_set_tsc_khz() errors here,
+         * because TSC frequency mismatch shouldn't abort migration,
+         * unless the user explicitly asked for a more strict TSC
+         * setting (e.g. using an explicit "tsc-freq" option).
+         */
+        kvm_arch_set_tsc_khz(cpu);
+    }
+
     ret = kvm_getput_regs(x86_cpu, 1);
     if (ret < 0) {
         return ret;