All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Paul Brook <paul@codesourcery.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	aliguori@us.ibm.com, qemu-devel@nongnu.org,
	Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 24/25] vmstate: port arm cpu
Date: Tue, 25 Oct 2011 12:08:55 -0700	[thread overview]
Message-ID: <4EA70947.9050904@twiddle.net> (raw)
In-Reply-To: <201110251927.53924.paul@codesourcery.com>

On 10/25/2011 11:27 AM, Paul Brook wrote:
>> -    /* Avoid mode switch when restoring CPSR.  */
>> -    env->uncached_cpsr = val & CPSR_M;
>> -    cpsr_write(env, val, 0xffffffff);
>> +
>> +    env->uncached_cpsr = env->cpsr_vmstate & CPSR_M;
>> +    cpsr_write(env, env->cpsr_vmstate, 0xffffffff);
> 
> You've removed the helpful comment explaining why this wierdness exists. 
> Please put it back.
> 
> A comment in cpu.h explaining what cpsr_vmstate is for would also be nice.
> Specifically it's a hack[1] to transfer data between the pre_save/post_load 
> hooks and the vmstate machinery.  IMO "vmstate" is a sufficiently generic term 
> that it could be confused with some actual cpu register, especially once we 
> get round to implementing the hypervisor extensions.
> 
> Paul
> 
> [1] Maybe a necessary hack, but still a wart from requiring static table 
> driven vmstate descriptions.

I wonder if we shouldn't make it easier to do what I do for Alpha
with the rather different hack for the fpcr.

That might avoid some of the other pre/post_load hooks, and the
extra data fields that requires in the cpu structure.


r~

  reply	other threads:[~2011-10-25 19:09 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
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 [this message]
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=4EA70947.9050904@twiddle.net \
    --to=rth@twiddle.net \
    --cc=aliguori@us.ibm.com \
    --cc=paul@codesourcery.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /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.