[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/35] vmstate: make all architectures export a
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH 02/35] vmstate: make all architectures export a way to migrate cpu's |
Date: |
Mon, 07 May 2012 19:14:46 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120421 Thunderbird/12.0 |
Am 04.05.2012 18:16, schrieb Andreas Färber:
> Am 04.05.2012 12:54, schrieb Juan Quintela:
>> This makes several changes:
>> - exports VMStateDescription vmstate_cpu non-static.
>> - makes sure that every cpu has a vmstate_cpu or cpu_save/load defined
>> - for the architecture that had nothing, it just register the cpu as
>> unmigratable.
>> - Depending on CPU_SAVE_VERSION we register old/new migration style
>> - Add copyrights to the new files
>>
>> Signed-off-by: Juan Quintela <address@hidden>
>> ---
>> exec.c | 2 ++
>> target-alpha/machine.c | 12 +-----------
>> target-i386/machine.c | 2 +-
>> target-lm32/machine.c | 2 +-
>> target-m68k/machine.c | 21 +++++++++++++++++++++
>> target-s390x/machine.c | 14 ++++++--------
>> target-sh4/machine.c | 21 +++++++++++++++++++++
>> target-xtensa/machine.c | 14 ++++++--------
>> vmstate.h | 2 ++
>> 9 files changed, 61 insertions(+), 29 deletions(-)
[...]
> We have QOM CPUState now, so please add a vmsd field to CPUClass instead
> of exporting global vmstate_cpu variables.
Thinking more about this, I see that we will need to assign it in
cpu.c:xxx_class_init() (translate_init.c for ppc) as opposed to machine.c.
The declaration still shouldn't go into vmstate.h so that it remains a
target-local decision how to model this (think CPU subclasses).
I'd hate to #include "machine.c" in cpu.c.
Having the declaration in cpu.h is the least intrusive solution I see.
Moving the code into cpu.c would match qdev but would bloat the files.
What do you think?
> It then matches what we do
> for former qdev devices and will in the future allow to compile this
> code only twice.
BTW the easiest way to address my comment on 01/35 would be to simply
squash the two commits. :)
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] [PATCH v5 00/35] VMState port of all cpus, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 04/35] vmstate: use new cpu style for x86, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 02/35] vmstate: make all architectures export a way to migrate cpu's, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 11/35] vmstate: Introduce VMSTATE_STRUCT_VARRAY_INT32_TEST, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 06/35] vmstate: make microblaze cpus not migrateable, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 05/35] vmstate: use new style for lm32 cpus, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 08/35] vmstate: introduce float32 arrays, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 10/35] vmstate: introduce CPU_DoubleU arrays, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 13/35] vmstate: introduce VMSTATE_VARRAY_MULTIPLY, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 07/35] vmstate: port cris cpu to vmstate, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 14/35] vmstate: define vmstate_info_uinttls, Juan Quintela, 2012/05/04
- [Qemu-devel] [PATCH 12/35] vmstate: port ppc cpu, Juan Quintela, 2012/05/04