Message ID | 1242574999-20887-15-git-send-email-aliguori@us.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Anthony Liguori wrote: > 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@us.ibm.com> > Signed-off-by: Avi Kivity <avi@redhat.com> > > I reverted this in master, so the end result is different. Please redo this once it is resolved in master (in any case fixing in stable before master is fixed should be discouraged).
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]);