[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH for-2.6] ppc: Fix migration of the XE
From: |
Thomas Huth |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH for-2.6] ppc: Fix migration of the XER register |
Date: |
Fri, 15 Apr 2016 14:17:39 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 |
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 <address@hidden>
>
> 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 <address@hidden>
Thanks!
Thomas