From: Anthony Liguori <aligu...@us.ibm.com>

9 is reserved for KVM.  KVM cannot support migration from any other version.

Signed-off-by: Anthony Liguori <aligu...@us.ibm.com>
Signed-off-by: Avi Kivity <a...@redhat.com>

diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index f054af1..af0ee18 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -838,7 +838,9 @@ static inline int cpu_get_time_fast(void)
 #define cpu_signal_handler cpu_x86_signal_handler
 #define cpu_list x86_cpu_list
 
-#define CPU_SAVE_VERSION 8
+/* CPU_SAVE_VERSION 9 is reserved for KVM.  This is to avoid breakage as KVM
+ * merges into upstream QEMU */
+#define CPU_SAVE_VERSION 9
 
 /* MMU modes definitions */
 #define MMU_MODE0_SUFFIX _kernel
diff --git a/target-i386/machine.c b/target-i386/machine.c
index 399204d..7f75d31 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -196,6 +196,9 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)
     if (version_id != 3 && version_id != 4 && version_id != 5
         && version_id != 6 && version_id != 7 && version_id != 8)
         return -EINVAL;
+    /* KVM cannot accept migrations from QEMU today */
+    if (version_id != 9)
+        return -EINVAL;
     for(i = 0; i < CPU_NB_REGS; i++)
         qemu_get_betls(f, &env->regs[i]);
     qemu_get_betls(f, &env->eip);
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to