From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwxOZ-0002AH-DW for qemu-devel@nongnu.org; Mon, 25 May 2015 14:46:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YwxOU-0003by-Il for qemu-devel@nongnu.org; Mon, 25 May 2015 14:46:39 -0400 Received: from mail-qk0-f172.google.com ([209.85.220.172]:35098) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YwxOU-0003bh-Em for qemu-devel@nongnu.org; Mon, 25 May 2015 14:46:34 -0400 Received: by qkdn188 with SMTP id n188so70796172qkd.2 for ; Mon, 25 May 2015 11:46:33 -0700 (PDT) MIME-Version: 1.0 Sender: peter.crosthwaite@petalogix.com In-Reply-To: References: <1432569199-24306-1-git-send-email-peter.maydell@linaro.org> Date: Mon, 25 May 2015 11:46:33 -0700 Message-ID: From: Peter Crosthwaite Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] target-cris: update CPU state save/load to use VMStateDescription List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: "Edgar E. Iglesias" , Juan Quintela , QEMU Developers , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Patch Tracking On Mon, May 25, 2015 at 11:30 AM, Peter Maydell wrote: > On 25 May 2015 at 17:35, Peter Maydell wrote: >> On 25 May 2015 at 16:53, Peter Maydell wrote: >>> From: Juan Quintela >>> >>> Update the CRIS CPU state save/load to use a VMStateDescription struct >>> rather than cpu_save/cpu_load functions. > >> Oops, this has a couple of issues I only noticed when I started >> looking at the SPARC vmstate: >> * forgot to register vmstate by setting cc->vmsd >> * vmstate should be of CRISCPU, not CPUCRISState > > In looking at this I found that we currently have: > CPUs that set cc->vmsd: arm, i386, lm32, mips, moxie, ppc, s390x > CPUs that set dc->vmsd: alpha, m68k, microblaze, openrisc, sh4, > unicore32, xtensa > ...an exactly even split. > > Which of these is the recommended approach for new conversions? Should it be DC? CPU should not have specific support for something that already works for TYPE_DEVICE. This seems similar to SysBusDevice::init where we progressively pushed everything up to the higher level over time. Regards, Peter > CCing Andreas since this is a QOM CPU question... > > thanks > -- PMM >