From patchwork Wed Oct 26 20:16:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 121994 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id CFB191007DA for ; Thu, 27 Oct 2011 07:32:17 +1100 (EST) Received: from localhost ([::1]:50695 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJA8r-0003nG-4P for incoming@patchwork.ozlabs.org; Wed, 26 Oct 2011 16:32:05 -0400 Received: from eggs.gnu.org ([140.186.70.92]:60210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJA8l-0003lu-Jb for qemu-devel@nongnu.org; Wed, 26 Oct 2011 16:32:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RJA8k-00039T-AF for qemu-devel@nongnu.org; Wed, 26 Oct 2011 16:31:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:3550) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RJA8k-00039F-16 for qemu-devel@nongnu.org; Wed, 26 Oct 2011 16:31:58 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9QKVe7A026310 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 26 Oct 2011 16:31:40 -0400 Received: from neno.neno (ovpn-116-28.ams2.redhat.com [10.36.116.28]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p9QKHulj018327; Wed, 26 Oct 2011 16:31:13 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 26 Oct 2011 22:16:35 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 209.132.183.28 Cc: Huacai Chen , Peter Maydell , Alexander Graf , Blue Swirl , Max Filippov , Michael Walle , Paul Brook , "Edgar E. Iglesias" , Aurelien Jarno , Richard Henderson Subject: [Qemu-devel] [PATCH 21/28] mips: bump migration version to 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 bcond state was stored as int32, but it is target_ulong. Change migration state to reflect that. Signed-off-by: Juan Quintela --- target-mips/cpu.h | 2 +- target-mips/machine.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/target-mips/cpu.h b/target-mips/cpu.h index 7ca751b..7810924 100644 --- a/target-mips/cpu.h +++ b/target-mips/cpu.h @@ -507,7 +507,7 @@ void mips_cpu_list (FILE *f, fprintf_function cpu_fprintf); #define cpu_signal_handler cpu_mips_signal_handler #define cpu_list mips_cpu_list -#define CPU_SAVE_VERSION 3 +#define CPU_SAVE_VERSION 4 /* MMU modes definitions. We carefully match the indices with our hflags layout. */ diff --git a/target-mips/machine.c b/target-mips/machine.c index a55fbb6..134dbd5 100644 --- a/target-mips/machine.c +++ b/target-mips/machine.c @@ -84,8 +84,7 @@ void cpu_save(QEMUFile *f, void *opaque) qemu_put_sbe32s(f, &env->error_code); qemu_put_be32s(f, &env->hflags); qemu_put_betls(f, &env->btarget); - i = env->bcond; - qemu_put_sbe32s(f, &i); + qemu_put_betls(f, &env->bcond); /* Save remaining CP1 registers */ qemu_put_sbe32s(f, &env->CP0_Index); @@ -193,9 +192,9 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id) CPUState *env = opaque; int i; - if (version_id != 3) + if (version_id != 4) { return -EINVAL; - + } /* Load active TC */ load_tc(f, &env->active_tc); @@ -236,8 +235,7 @@ int cpu_load(QEMUFile *f, void *opaque, int version_id) qemu_get_sbe32s(f, &env->error_code); qemu_get_be32s(f, &env->hflags); qemu_get_betls(f, &env->btarget); - qemu_get_sbe32s(f, &i); - env->bcond = i; + qemu_get_betls(f, &env->bcond); /* Load remaining CP1 registers */ qemu_get_sbe32s(f, &env->CP0_Index);