[PATCH 13/17] Increment version id for CPU save state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[aliguori: incorporated Glauber's fix for save/restore breakage]

Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx>
Signed-off-by: Avi Kivity <avi@xxxxxxxxxx>

diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 2f8b4f6..367b4be 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -836,7 +836,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 a006286..5713659 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -191,7 +191,11 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id)
     int32_t a20_mask;
 
     if (version_id != 3 && version_id != 4 && version_id != 5
-        && version_id != 6 && version_id != 7 && version_id != 8)
+        && version_id != 6 && version_id != 7 && version_id != 8
+        && version_id != 9)
+        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]);
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux