From patchwork Mon Jun 4 09:57:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 162777 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 61597B6FA1 for ; Mon, 4 Jun 2012 22:02:23 +1000 (EST) Received: from localhost ([::1]:36627 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbU3P-0000Gc-RB for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2012 05:58:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbU2s-0008R3-NN for qemu-devel@nongnu.org; Mon, 04 Jun 2012 05:58:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SbU2n-0004a9-P9 for qemu-devel@nongnu.org; Mon, 04 Jun 2012 05:57:54 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:46350) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SbU2n-0004Zo-FR for qemu-devel@nongnu.org; Mon, 04 Jun 2012 05:57:49 -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 738F948967; Mon, 4 Jun 2012 18:57:44 +0900 (JST) Received: (nullmailer pid 5087 invoked by uid 1000); Mon, 04 Jun 2012 09:57:44 -0000 From: Isaku Yamahata To: qemu-devel@nongnu.org, kvm@vger.kernel.org Date: Mon, 4 Jun 2012 18:57:05 +0900 Message-Id: <0bf83e386b68c83d3205483721b666817b03082d.1338802192.git.yamahata@valinux.co.jp> X-Mailer: git-send-email 1.7.1.1 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 Subject: [Qemu-devel] [PATCH v2 03/41] 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 | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch_init.c b/arch_init.c index bd4e61e..2a53f58 100644 --- a/arch_init.c +++ b/arch_init.c @@ -410,7 +410,7 @@ int ram_load(QEMUFile *f, void *opaque, int version_id) int flags; int error; - 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 7cc3fa7..456637d 100644 --- a/arch_init.h +++ b/arch_init.h @@ -37,4 +37,6 @@ int xen_available(void); #define RAM_SAVE_FLAG_EOS 0x10 #define RAM_SAVE_FLAG_CONTINUE 0x20 +#define RAM_SAVE_VERSION_ID 4 /* currently version 4 */ + #endif diff --git a/vl.c b/vl.c index 23ab3a3..62dc343 100644 --- a/vl.c +++ b/vl.c @@ -3436,8 +3436,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, NULL, ram_save_live, NULL, - ram_load, NULL); + register_savevm_live(NULL, "ram", 0, RAM_SAVE_VERSION_ID, NULL, + ram_save_live, NULL, ram_load, NULL); if (nb_numa_nodes > 0) { int i;