* [Qemu-devel] [PATCH] spapr: Clear LPCR_ILE during reset
@ 2014-03-06 4:06 Anton Blanchard
2014-03-20 1:08 ` Andreas Färber
0 siblings, 1 reply; 3+ messages in thread
From: Anton Blanchard @ 2014-03-06 4:06 UTC (permalink / raw)
To: qemu-devel, qemu-ppc; +Cc: paulus
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.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 93d02c1..4d45197 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -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;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] spapr: Clear LPCR_ILE during reset
2014-03-06 4:06 [Qemu-devel] [PATCH] spapr: Clear LPCR_ILE during reset Anton Blanchard
@ 2014-03-20 1:08 ` Andreas Färber
2014-03-20 2:57 ` Alexey Kardashevskiy
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Färber @ 2014-03-20 1:08 UTC (permalink / raw)
To: Anton Blanchard, Alexey Kardashevskiy, Greg Kurz
Cc: paulus, qemu-ppc, qemu-devel
Am 06.03.2014 05:06, schrieb Anton Blanchard:
>
> 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.
>
> Signed-off-by: Anton Blanchard <anton@samba.org>
> ---
>
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 93d02c1..4d45197 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -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
> +
> env->external_htab = (uint8_t *)spapr->htab;
> env->htab_base = -1;
> env->htab_mask = HTAB_SIZE(spapr) - 1;
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] spapr: Clear LPCR_ILE during reset
2014-03-20 1:08 ` Andreas Färber
@ 2014-03-20 2:57 ` Alexey Kardashevskiy
0 siblings, 0 replies; 3+ messages in thread
From: Alexey Kardashevskiy @ 2014-03-20 2:57 UTC (permalink / raw)
To: Andreas Färber, Anton Blanchard, Greg Kurz
Cc: paulus, qemu-ppc, qemu-devel
On 03/20/2014 12:08 PM, Andreas Färber wrote:
> Am 06.03.2014 05:06, schrieb Anton Blanchard:
>>
>> 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.
>>
>> Signed-off-by: Anton Blanchard <anton@samba.org>
>> ---
>>
>> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
>> index 93d02c1..4d45197 100644
>> --- a/hw/ppc/spapr.c
>> +++ b/hw/ppc/spapr.c
>> @@ -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?
Yes, it is. I tried my patch with Anton's testcase.
>
> Regards,
> Andreas
>
>> +
>> env->external_htab = (uint8_t *)spapr->htab;
>> env->htab_base = -1;
>> env->htab_mask = HTAB_SIZE(spapr) - 1;
>>
>
>
--
Alexey
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-20 2:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-06 4:06 [Qemu-devel] [PATCH] spapr: Clear LPCR_ILE during reset Anton Blanchard
2014-03-20 1:08 ` Andreas Färber
2014-03-20 2:57 ` Alexey Kardashevskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).