From patchwork Tue Oct 30 08:32:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 195424 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BA2FC2C00AC for ; Tue, 30 Oct 2012 21:43:29 +1100 (EST) Received: from localhost ([::1]:49839 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TT7IZ-0007Hk-NH for incoming@patchwork.ozlabs.org; Tue, 30 Oct 2012 04:35:47 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TT7GM-0004jI-4q for qemu-devel@nongnu.org; Tue, 30 Oct 2012 04:33:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TT7GC-0000ZK-Qx for qemu-devel@nongnu.org; Tue, 30 Oct 2012 04:33:30 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:44741) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TT7GC-0000Xr-Hk for qemu-devel@nongnu.org; Tue, 30 Oct 2012 04:33:20 -0400 Received: from ps.local.valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by mail.valinux.co.jp (Postfix) with SMTP id 66CA5181C2; Tue, 30 Oct 2012 17:33:13 +0900 (JST) Received: (nullmailer pid 29431 invoked by uid 1000); Tue, 30 Oct 2012 08:33:12 -0000 From: Isaku Yamahata To: qemu-devel@nongnu.org, kvm@vger.kernel.org Date: Tue, 30 Oct 2012 17:32:49 +0900 Message-Id: X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: In-Reply-To: References: X-Virus-Scanned: clamav-milter 0.95.2 at va-mail.local.valinux.co.jp X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 210.128.90.3 Cc: benoit.hudzia@gmail.com, aarcange@redhat.com, aliguori@us.ibm.com, quintela@redhat.com, stefanha@gmail.com, t.hirofuchi@aist.go.jp, dlaor@redhat.com, satoshi.itoh@aist.go.jp, mdroth@linux.vnet.ibm.com, yoshikawa.takuya@oss.ntt.co.jp, owasserm@redhat.com, avi@redhat.com, pbonzini@redhat.com, chegu_vinod@hp.com Subject: [Qemu-devel] [PATCH v3 13/35] arch_init/ram_save: introduce constant for ram save version = 4 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Introduce RAM_SAVE_VERSION_ID to represent version_id for ram save format. Signed-off-by: Isaku Yamahata --- arch_init.c | 2 +- arch_init.h | 2 ++ vl.c | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch_init.c b/arch_init.c index 4b65221..23717d3 100644 --- a/arch_init.c +++ b/arch_init.c @@ -784,7 +784,7 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id) seq_iter++; - if (version_id < 4 || version_id > 4) { + if (version_id < 4 || version_id > RAM_SAVE_VERSION_ID) { return -EINVAL; } diff --git a/arch_init.h b/arch_init.h index e4c131e..780eedf 100644 --- a/arch_init.h +++ b/arch_init.h @@ -44,4 +44,6 @@ CpuDefinitionInfoList GCC_WEAK_DECL *arch_query_cpu_definitions(Error **errp); #define RAM_SAVE_FLAG_CONTINUE 0x20 #define RAM_SAVE_FLAG_XBZRLE 0x40 +#define RAM_SAVE_VERSION_ID 4 /* currently version 4 */ + #endif diff --git a/vl.c b/vl.c index ee3c43a..723fc59 100644 --- a/vl.c +++ b/vl.c @@ -3557,7 +3557,8 @@ int main(int argc, char **argv, char **envp) default_drive(default_sdcard, snapshot, machine->use_scsi, IF_SD, 0, SD_OPTS); - register_savevm_live(NULL, "ram", 0, 4, &savevm_ram_handlers, NULL); + register_savevm_live(NULL, "ram", 0, RAM_SAVE_VERSION_ID, + &savevm_ram_handlers, NULL); if (nb_numa_nodes > 0) { int i;