[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] target-cris: update CPU state save/load to use
From: |
Peter Crosthwaite |
Subject: |
Re: [Qemu-devel] [PATCH] target-cris: update CPU state save/load to use VMStateDescription |
Date: |
Mon, 25 May 2015 11:46:33 -0700 |
On Mon, May 25, 2015 at 11:30 AM, Peter Maydell
<address@hidden> wrote:
> On 25 May 2015 at 17:35, Peter Maydell <address@hidden> wrote:
>> On 25 May 2015 at 16:53, Peter Maydell <address@hidden> wrote:
>>> From: Juan Quintela <address@hidden>
>>>
>>> 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
>