All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	qemu-ppc@nongnu.org, david@gibson.dropbear.id.au
Cc: aik@ozlabs.ru, rth@twiddle.net, agraf@suse.de, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-2.6] ppc: Fix migration of the XER register
Date: Fri, 15 Apr 2016 14:17:39 +0200	[thread overview]
Message-ID: <5710DBE3.8000808@redhat.com> (raw)
In-Reply-To: <5710BF9C.6070603@ilande.co.uk>

On 15.04.2016 12:17, Mark Cave-Ayland wrote:
> On 15/04/16 10:03, Thomas Huth wrote:
> 
>> env->xer only holds the lower bits of the XER register nowadays, the
>> SO, OV and CA bits are stored in separate variables (see the function
>> cpu_write_xer() for details). Since the migration code currently only
>> reads the "xer" variable, the upper bits are lost during migration.
>> Fix it by using cpu_read_xer() instead.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
> 
> This looks like the pre_save counterpart to the post_load patch I sent
> in January (see 6a9620e60cc1b16dba9ee9d9d8cb374e4303c072) so I'm fairly
> sure this is right.

Ah, ok, that's why the load part was already right :-)

Looks like the cpu_read/write_xer() functions have originally been
introduced in da91a00f ("Split out SO, OV, CA fields from XER"), and
this patch also used it for the load and save functions in machine.c.
However, a little bit later, the functions had been changed to use
VMState instead (see a90db158 - "Convert ppc cpu savevm to
VMStateDescription"), and the cpu_read/write_xer() calls accidentally
got dropped in this patch. So introducing them again now is really the
right thing to do.

> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>

 Thanks!
  Thomas

  reply	other threads:[~2016-04-15 12:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-15  9:03 [Qemu-devel] [PATCH for-2.6] ppc: Fix migration of the XER register Thomas Huth
2016-04-15 10:17 ` Mark Cave-Ayland
2016-04-15 12:17   ` Thomas Huth [this message]
2016-04-18  1:53 ` David Gibson

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=5710DBE3.8000808@redhat.com \
    --to=thuth@redhat.com \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=david@gibson.dropbear.id.au \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rth@twiddle.net \
    /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.