From patchwork Wed Apr 29 20:53:50 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony Liguori X-Patchwork-Id: 20810 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3TKs2N1007298 for ; Wed, 29 Apr 2009 20:54:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754520AbZD2Ux4 (ORCPT ); Wed, 29 Apr 2009 16:53:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753992AbZD2Ux4 (ORCPT ); Wed, 29 Apr 2009 16:53:56 -0400 Received: from e5.ny.us.ibm.com ([32.97.182.145]:42112 "EHLO e5.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753483AbZD2Uxy (ORCPT ); Wed, 29 Apr 2009 16:53:54 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e5.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n3TKn9vJ022650 for ; Wed, 29 Apr 2009 16:49:09 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n3TKrspn131426 for ; Wed, 29 Apr 2009 16:53:54 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n3TKq4Da026525 for ; Wed, 29 Apr 2009 16:52:04 -0400 Received: from localhost.localdomain (sig-9-65-58-151.mts.ibm.com [9.65.58.151]) by d01av02.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n3TKq1ka026435; Wed, 29 Apr 2009 16:52:03 -0400 From: Anthony Liguori To: kvm@vger.kernel.org Cc: Anthony Liguori , Avi Kivity Subject: [PATCH 2/2] Increment version id for CPU save state Date: Wed, 29 Apr 2009 15:53:50 -0500 Message-Id: <1241038430-7444-3-git-send-email-aliguori@us.ibm.com> X-Mailer: git-send-email 1.6.0.6 In-Reply-To: <1241038430-7444-1-git-send-email-aliguori@us.ibm.com> References: <1241038430-7444-1-git-send-email-aliguori@us.ibm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 9 is reserved for KVM. KVM cannot support migration from any other version. Signed-off-by: Anthony Liguori --- target-i386/cpu.h | 4 +++- target-i386/machine.c | 3 +++ 2 files changed, 6 insertions(+), 1 deletions(-) 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);