spapr: Clear LPCR_ILE during reset
PATCH 1/1 spapr: Clear LPCR_ILE during reset
Since an OS can set LPCR_ILE we must clear it during reset. Otherwise if we reset into an OS with a different endian we die when we take the first exception.
This fixes an issue seen on both full emulation and KVM.
---
hw/ppc/spapr.c +2 -0
@@ -739,6 +739,8 @@ static void spapr_cpu_reset(void *opaque) env->spr[SPR_HIOR ] =0 ; + env->spr[SPR_LPCR ] &= ~LPCR_ILE ; + env->external_htab = (uint8_t *)spapr->htab; env->htab_base =-1 ; env->htab_mask =HTAB_SIZE (spapr) -1 ;
Am 06.03.2014 05:06, schrieb Anton Blanchard:
Quoted 15 lines
Since an OS can set
LPCR_ILEwe must clear it during reset. Otherwise if we reset into an OS with a different endian we die when we take the first exception.This fixes an issue seen on both full emulation and KVM.
Signed-off-by Anton Blanchard <[email protected]>---
hw/ppc/spapr.c +0
-0
hw/ppc/spapr.c static void spapr_cpu_reset(void *opaque) · line 742
Quoted 4 lines
hw/ppc/spapr.c +1
-0@@ -739,6 +739,8 @@ static void spapr_cpu_reset(void *opaque) env->spr[SPR_HIOR ] =0 ; + env->spr[SPR_LPCR ] &= ~LPCR_ILE ;
I guess this is superseded by the generalized SPR reset?
Regards,
Andreas
Quoted 5 lines
hw/ppc/spapr.c +1
-0+ env->external_htab = (uint8_t *)spapr->htab; env->htab_base =-1 ; env->htab_mask =HTAB_SIZE (spapr) -1 ;
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 17 lines · Andreas Färber
Am 06.03.2014 05:06, schrieb Anton Blanchard:
Quoted 16 lines
Since an OS can set
LPCR_ILEwe must clear it during reset. Otherwise if we reset into an OS with a different endian we die when we take the first exception.This fixes an issue seen on both full emulation and KVM.
Signed-off-by Anton Blanchard <[email protected]>---
hw/ppc/spapr.c +0
-0@@ -739,6 +739,8 @@ static void spapr_cpu_reset(void *opaque)
Quoted 5 lines
hw/ppc/spapr.c static void spapr_cpu_reset(void *opaque) · line 742
Quoted 3 lines
hw/ppc/spapr.c +1
-0env->spr[SPR_HIOR ] =0 ; + env->spr[SPR_LPCR ] &= ~LPCR_ILE ;I guess this is superseded by the generalized SPR reset?
Yes, it is. I tried my patch with Anton's testcase.
Quoted 11 lines
Regards,
AndreasQuoted 5 lines
hw/ppc/spapr.c +1
-0+ env->external_htab = (uint8_t *)spapr->htab; env->htab_base =-1 ; env->htab_mask =HTAB_SIZE (spapr) -1 ;
Signature · 1 line
Alexey