On Mon, May 25, 2015 at 11:30 AM, Peter Maydell <peter.mayd...@linaro.org> wrote: > On 25 May 2015 at 17:35, Peter Maydell <peter.mayd...@linaro.org> wrote: >> On 25 May 2015 at 16:53, Peter Maydell <peter.mayd...@linaro.org> wrote: >>> From: Juan Quintela <quint...@redhat.com> >>> >>> 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 >