From patchwork Tue Oct 25 14:00:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 121695 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 602B1B6F67 for ; Wed, 26 Oct 2011 01:09:31 +1100 (EST) Received: from localhost ([::1]:60003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIhgu-0004V8-W6 for incoming@patchwork.ozlabs.org; Tue, 25 Oct 2011 10:09:20 -0400 Received: from eggs.gnu.org ([140.186.70.92]:53041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIhgg-0004HD-Fv for qemu-devel@nongnu.org; Tue, 25 Oct 2011 10:09:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIhao-00026K-FX for qemu-devel@nongnu.org; Tue, 25 Oct 2011 10:03:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIhal-00022U-39 for qemu-devel@nongnu.org; Tue, 25 Oct 2011 10:02:59 -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 p9PE2p8D024622 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 25 Oct 2011 10:02:51 -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 p9PE25Zj028141; Tue, 25 Oct 2011 10:02:49 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Tue, 25 Oct 2011 16:00:51 +0200 Message-Id: <24dbf7be98bfffaf5ee18a1912c0b4f4b5a459ab.1319550280.git.quintela@redhat.com> 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: Blue Swirl , aliguori@us.ibm.com Subject: [Qemu-devel] [PATCH 17/25] vmstate: make incompatible change for sparc 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 With this change, we sent arrays as arrays, making state description much simpler. The change is incompatible, but as far as I know, sparc don't care about migration compatibility beteween versions. Signed-off-by: Juan Quintela CC: Blue Swirl --- target-sparc/machine.c | 172 +++--------------------------------------------- 1 files changed, 9 insertions(+), 163 deletions(-) diff --git a/target-sparc/machine.c b/target-sparc/machine.c index 2186756..ccca36f 100644 --- a/target-sparc/machine.c +++ b/target-sparc/machine.c @@ -74,9 +74,9 @@ static int cpu_post_load(void *opaque, int version_id) const VMStateDescription vmstate_cpu = { .name = "cpu", - .version_id = 7, - .minimum_version_id = 7, - .minimum_version_id_old = 7, + .version_id = 8, + .minimum_version_id = 8, + .minimum_version_id_old = 8, .pre_save = cpu_pre_save, .post_load = cpu_post_load, .fields = (VMStateField[]) { @@ -106,166 +106,12 @@ const VMStateDescription vmstate_cpu = { VMSTATE_UINT64_ARRAY(mmubpregs, CPUState, 4), #else VMSTATE_UINT64(lsu, CPUState), - VMSTATE_UINT64(immuregs[0], CPUState), - VMSTATE_UINT64(dmmuregs[0], CPUState), - VMSTATE_UINT64(immuregs[1], CPUState), - VMSTATE_UINT64(dmmuregs[1], CPUState), - VMSTATE_UINT64(immuregs[2], CPUState), - VMSTATE_UINT64(dmmuregs[2], CPUState), - VMSTATE_UINT64(immuregs[3], CPUState), - VMSTATE_UINT64(dmmuregs[3], CPUState), - VMSTATE_UINT64(immuregs[4], CPUState), - VMSTATE_UINT64(dmmuregs[4], CPUState), - VMSTATE_UINT64(immuregs[5], CPUState), - VMSTATE_UINT64(dmmuregs[5], CPUState), - VMSTATE_UINT64(immuregs[6], CPUState), - VMSTATE_UINT64(dmmuregs[6], CPUState), - VMSTATE_UINT64(immuregs[7], CPUState), - VMSTATE_UINT64(dmmuregs[7], CPUState), - VMSTATE_UINT64(immuregs[8], CPUState), - VMSTATE_UINT64(dmmuregs[8], CPUState), - VMSTATE_UINT64(immuregs[9], CPUState), - VMSTATE_UINT64(dmmuregs[9], CPUState), - VMSTATE_UINT64(immuregs[10], CPUState), - VMSTATE_UINT64(dmmuregs[10], CPUState), - VMSTATE_UINT64(immuregs[11], CPUState), - VMSTATE_UINT64(dmmuregs[11], CPUState), - VMSTATE_UINT64(immuregs[12], CPUState), - VMSTATE_UINT64(dmmuregs[12], CPUState), - VMSTATE_UINT64(immuregs[13], CPUState), - VMSTATE_UINT64(dmmuregs[13], CPUState), - VMSTATE_UINT64(immuregs[14], CPUState), - VMSTATE_UINT64(dmmuregs[14], CPUState), - VMSTATE_UINT64(immuregs[15], CPUState), - VMSTATE_UINT64(dmmuregs[15], CPUState), - VMSTATE_STRUCT(itlb[0], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[0], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[1], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[1], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[2], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[2], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[3], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[3], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[4], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[4], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[5], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[5], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[6], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[6], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[7], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[7], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[8], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[8], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[9], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[9], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[10], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[10], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[11], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[11], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[12], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[12], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[13], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[13], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[14], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[14], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[15], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[15], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[16], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[16], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[17], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[17], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[18], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[18], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[19], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[19], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[20], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[20], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[21], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[21], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[22], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[22], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[23], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[23], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[24], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[24], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[25], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[25], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[26], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[26], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[27], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[27], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[28], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[28], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[29], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[29], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[30], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[30], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[31], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[31], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[32], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[32], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[33], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[33], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[34], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[34], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[35], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[35], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[36], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[36], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[37], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[37], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[38], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[38], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[39], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[39], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[40], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[40], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[41], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[41], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[42], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[42], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[43], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[43], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[44], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[44], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[45], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[45], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[46], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[46], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[47], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[47], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[48], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[48], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[49], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[49], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[50], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[50], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[51], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[51], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[52], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[52], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[53], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[53], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[54], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[54], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[55], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[55], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[56], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[56], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[57], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[57], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[58], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[58], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[59], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[59], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[60], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[60], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[61], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[61], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[62], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[62], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(itlb[63], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), - VMSTATE_STRUCT(dtlb[63], CPUState, 0, vmstate_tlb_entry, SparcTLBEntry), + VMSTATE_UINT64_ARRAY(immuregs, CPUState, 16), + VMSTATE_UINT64_ARRAY(dmmuregs, CPUState, 16), + VMSTATE_STRUCT_ARRAY(itlb, CPUState, 64, 0, + vmstate_tlb_entry, SparcTLBEntry), + VMSTATE_STRUCT_ARRAY(dtlb, CPUState, 64, 0, + vmstate_tlb_entry, SparcTLBEntry), VMSTATE_UINT32(mmu_version, CPUState), VMSTATE_STRUCT_ARRAY(ts, CPUState, MAXTL_MAX, 0, vmstate_trap_state, trap_state),