diff mbox

[2/4] target-ppc: use cpu_write_xer() helper in cpu_post_load

Message ID 1452104533-8516-3-git-send-email-mark.cave-ayland@ilande.co.uk
State New
Headers show

Commit Message

Mark Cave-Ayland Jan. 6, 2016, 6:22 p.m. UTC
Otherwise some internal xer variables fail to get set post-migration.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
 target-ppc/machine.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexey Kardashevskiy Jan. 8, 2016, 2:25 a.m. UTC | #1
On 01/07/2016 05:22 AM, Mark Cave-Ayland wrote:
> Otherwise some internal xer variables fail to get set post-migration.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> ---
>   target-ppc/machine.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target-ppc/machine.c b/target-ppc/machine.c
> index 98fc63a..322ce84 100644
> --- a/target-ppc/machine.c
> +++ b/target-ppc/machine.c
> @@ -168,7 +168,7 @@ static int cpu_post_load(void *opaque, int version_id)
>       env->spr[SPR_PVR] = env->spr_cb[SPR_PVR].default_value;
>       env->lr = env->spr[SPR_LR];
>       env->ctr = env->spr[SPR_CTR];
> -    env->xer = env->spr[SPR_XER];
> +    cpu_write_xer(env, env->spr[SPR_XER]);
>   #if defined(TARGET_PPC64)
>       env->cfar = env->spr[SPR_CFAR];
>   #endif
>

Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
David Gibson Jan. 18, 2016, 3:12 a.m. UTC | #2
On Fri, Jan 08, 2016 at 01:25:32PM +1100, Alexey Kardashevskiy wrote:
> On 01/07/2016 05:22 AM, Mark Cave-Ayland wrote:
> >Otherwise some internal xer variables fail to get set post-migration.
> >
> >Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> >---
> >  target-ppc/machine.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/target-ppc/machine.c b/target-ppc/machine.c
> >index 98fc63a..322ce84 100644
> >--- a/target-ppc/machine.c
> >+++ b/target-ppc/machine.c
> >@@ -168,7 +168,7 @@ static int cpu_post_load(void *opaque, int version_id)
> >      env->spr[SPR_PVR] = env->spr_cb[SPR_PVR].default_value;
> >      env->lr = env->spr[SPR_LR];
> >      env->ctr = env->spr[SPR_CTR];
> >-    env->xer = env->spr[SPR_XER];
> >+    cpu_write_xer(env, env->spr[SPR_XER]);
> >  #if defined(TARGET_PPC64)
> >      env->cfar = env->spr[SPR_CFAR];
> >  #endif
> >
> 
> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>	

I've merged just this patch into ppc-for-2.6.  The others in the
series have some problems which have been pointed out elsewhere.
Mark Cave-Ayland Jan. 18, 2016, 8:31 a.m. UTC | #3
On 18/01/16 03:12, David Gibson wrote:

> On Fri, Jan 08, 2016 at 01:25:32PM +1100, Alexey Kardashevskiy wrote:
>> On 01/07/2016 05:22 AM, Mark Cave-Ayland wrote:
>>> Otherwise some internal xer variables fail to get set post-migration.
>>>
>>> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>>> ---
>>>  target-ppc/machine.c |    2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/target-ppc/machine.c b/target-ppc/machine.c
>>> index 98fc63a..322ce84 100644
>>> --- a/target-ppc/machine.c
>>> +++ b/target-ppc/machine.c
>>> @@ -168,7 +168,7 @@ static int cpu_post_load(void *opaque, int version_id)
>>>      env->spr[SPR_PVR] = env->spr_cb[SPR_PVR].default_value;
>>>      env->lr = env->spr[SPR_LR];
>>>      env->ctr = env->spr[SPR_CTR];
>>> -    env->xer = env->spr[SPR_XER];
>>> +    cpu_write_xer(env, env->spr[SPR_XER]);
>>>  #if defined(TARGET_PPC64)
>>>      env->cfar = env->spr[SPR_CFAR];
>>>  #endif
>>>
>>
>> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>	
> 
> I've merged just this patch into ppc-for-2.6.  The others in the
> series have some problems which have been pointed out elsewhere.

Thanks David.

Any chance of being able to merge the macio VMStateDescription patchset
too at
https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg00558.html?
(this was sent without an explicit CC as I didn't know you were still
handling ppc-next).

With the macio fixes in place then Mac machine migration should start to
work once the respin of this series is applied.


Many thanks,

Mark.
David Gibson Jan. 19, 2016, 12:11 a.m. UTC | #4
On Mon, Jan 18, 2016 at 08:31:02AM +0000, Mark Cave-Ayland wrote:
> On 18/01/16 03:12, David Gibson wrote:
> 
> > On Fri, Jan 08, 2016 at 01:25:32PM +1100, Alexey Kardashevskiy wrote:
> >> On 01/07/2016 05:22 AM, Mark Cave-Ayland wrote:
> >>> Otherwise some internal xer variables fail to get set post-migration.
> >>>
> >>> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> >>> ---
> >>>  target-ppc/machine.c |    2 +-
> >>>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/target-ppc/machine.c b/target-ppc/machine.c
> >>> index 98fc63a..322ce84 100644
> >>> --- a/target-ppc/machine.c
> >>> +++ b/target-ppc/machine.c
> >>> @@ -168,7 +168,7 @@ static int cpu_post_load(void *opaque, int version_id)
> >>>      env->spr[SPR_PVR] = env->spr_cb[SPR_PVR].default_value;
> >>>      env->lr = env->spr[SPR_LR];
> >>>      env->ctr = env->spr[SPR_CTR];
> >>> -    env->xer = env->spr[SPR_XER];
> >>> +    cpu_write_xer(env, env->spr[SPR_XER]);
> >>>  #if defined(TARGET_PPC64)
> >>>      env->cfar = env->spr[SPR_CFAR];
> >>>  #endif
> >>>
> >>
> >> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>	
> > 
> > I've merged just this patch into ppc-for-2.6.  The others in the
> > series have some problems which have been pointed out elsewhere.
> 
> Thanks David.
> 
> Any chance of being able to merge the macio VMStateDescription patchset
> too at
> https://lists.gnu.org/archive/html/qemu-devel/2016-01/msg00558.html?
> (this was sent without an explicit CC as I didn't know you were still
> handling ppc-next).

*digs through mail archive*

Ok, done.

One small nit, as noted in the discussion 2/4 introduces a migration
breakage.  That's ok, since migration was broken beforehand anyway,
but I think it would make sense to set the minimum_version_id to
document the fact that you're dropping compatibility with all older
versions.

I'm happy for that to be a followup change though.


> With the macio fixes in place then Mac machine migration should start to
> work once the respin of this series is applied.
> 
> 
> Many thanks,
> 
> Mark.
>
diff mbox

Patch

diff --git a/target-ppc/machine.c b/target-ppc/machine.c
index 98fc63a..322ce84 100644
--- a/target-ppc/machine.c
+++ b/target-ppc/machine.c
@@ -168,7 +168,7 @@  static int cpu_post_load(void *opaque, int version_id)
     env->spr[SPR_PVR] = env->spr_cb[SPR_PVR].default_value;
     env->lr = env->spr[SPR_LR];
     env->ctr = env->spr[SPR_CTR];
-    env->xer = env->spr[SPR_XER];
+    cpu_write_xer(env, env->spr[SPR_XER]);
 #if defined(TARGET_PPC64)
     env->cfar = env->spr[SPR_CFAR];
 #endif