From: Juan Quintela <quintela@redhat.com>
To: Alexander Graf <agraf@suse.de>
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 13/25] vmstate: port ppc cpu
Date: Mon, 31 Oct 2011 20:43:32 +0100 [thread overview]
Message-ID: <m3wrblj6aj.fsf@neno.neno> (raw)
In-Reply-To: <BDF4683B-DAF8-4B6A-83B7-5FA2FEE7125E@suse.de> (Alexander Graf's message of "Sun, 30 Oct 2011 17:36:22 +0100")
Alexander Graf <agraf@suse.de> wrote:
> On 25.10.2011, at 16:00, Juan Quintela wrote:
>
>> Added sdr1_vmstate because storing the value requires calling ppc_store_sdr1().
>> The position when the function is called also changes (I think it is save).
>
> Thanks for converting this. I'm fairly sure that vmsave is broken atm anyways and that someone will have to go through all the fields and make sure they're still working properly. However you're definitely not making the situation worse, so here's only a small comment:
>
>>
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> CC: Alexander Graf <agraf@suse.de>
>> ---
>> target-ppc/cpu.h | 4 +-
>> target-ppc/machine.c | 245 ++++++++++++++++++--------------------------------
>> 2 files changed, 89 insertions(+), 160 deletions(-)
>>
>> + VMSTATE_UINTTL_ARRAY(spr, CPUState, 1024),
>
> Shouldn't sizeof(((CPUState*)NULL)->spr / sizeof(target_ulong)) work as size field?
vmstate is inconsistent about this.
It "calculates" sizes for "strings" (ar uint8_t * if your preffer), but
not for arrays.
#define VMSTATE_BUFFER_V(_f, _s, _v) \
VMSTATE_STATIC_BUFFER(_f, _s, _v, NULL, 0, sizeof(typeof_field(_s, _f)))
#define VMSTATE_BUFFER(_f, _s) \
VMSTATE_BUFFER_V(_f, _s, 0)
And I don't know what the "right" solution is:
- Putting explicit size helps detect changes on that size (good)
- But, on lots of places, we are putting there a constant:
VMSTATE_INT32_ARRAY(tx_fifo, smc91c111_state, NUM_PACKETS),
So, we are not going to detect changes either.
Next on my plate is to get someway of unittesting and being able to
detect this kind of changes (then we can actually drop the sizes
always).
Later, Juan.
next prev parent reply other threads:[~2011-10-31 19:44 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-25 14:00 [Qemu-devel] [PATCH 00/25] VMState port of all cpus Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 01/25] vmstate: Fix VMSTATE_VARRAY_UINT32 Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 02/25] vmstate: Simplify test for CPU_SAVE_VERSION Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 03/25] vmstate: make all architectures export a way to migrate cpu's Juan Quintela
2011-10-25 15:33 ` Andreas Färber
2011-10-25 15:50 ` Juan Quintela
2011-10-25 20:41 ` Andreas Färber
2011-10-25 17:55 ` Max Filippov
2011-10-25 17:58 ` Richard Henderson
2011-10-25 19:02 ` Michael Walle
2011-10-25 14:00 ` [Qemu-devel] [PATCH 04/25] vmstate: unicore32 don't support cpu migration Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 05/25] vmstate: use new cpu style for x86 Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 06/25] vmstate: use new style for lm32 cpus Juan Quintela
2011-10-25 19:02 ` Michael Walle
2011-10-25 14:00 ` [Qemu-devel] [PATCH 07/25] vmstate: make microblaze cpus not migrateable Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 08/25] vmstate: port cris cpu to vmstate Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 09/25] vmstate: machine.c is only compiled for !CONFIG_USER_ONLY Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 10/25] vmstate: introduce float32 arrays Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 11/25] vmstate: introduce float64 arrays Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 12/25] vmstate: Introduce VMSTATE_STRUCT_VARRAY_INT32_TEST Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 13/25] vmstate: port ppc cpu Juan Quintela
2011-10-30 16:36 ` Alexander Graf
2011-10-31 19:43 ` Juan Quintela [this message]
2011-10-25 14:00 ` [Qemu-devel] [PATCH 14/25] vmstate: introduce VMSTATE_VARRAY_MULTIPLY Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 15/25] vmstate: define vmstate_info_uinttls Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 16/25] vmstate: port sparc cpu Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 17/25] vmstate: make incompatible change for sparc Juan Quintela
2011-10-25 20:30 ` Blue Swirl
2011-10-25 14:00 ` [Qemu-devel] [PATCH 18/25] mips_fulong2e: cpu vmstate already registered in cpu_exec_init Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 19/25] mips: make mvp an embedded struct instead of pointer Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 20/25] mips: make tlb an embedded struct instead of a pointer Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 21/25] mips: bump migration version to 4 Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 22/25] vmstate: port mips cpu Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 23/25] arm: save always 32 fpu registers Juan Quintela
2011-10-25 14:00 ` [Qemu-devel] [PATCH 24/25] vmstate: port arm cpu Juan Quintela
2011-10-25 18:27 ` Paul Brook
2011-10-25 19:08 ` Richard Henderson
2011-10-25 20:39 ` Paul Brook
2011-10-25 14:00 ` [Qemu-devel] [PATCH 25/25] vmstate: all cpus converted Juan Quintela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3wrblj6aj.fsf@neno.neno \
--to=quintela@redhat.com \
--cc=agraf@suse.de \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.