From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQTB2-0003RH-Rj for qemu-devel@nongnu.org; Wed, 19 Mar 2014 22:57:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQTAw-0007WJ-0s for qemu-devel@nongnu.org; Wed, 19 Mar 2014 22:57:52 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:55251) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQTAv-0007W4-Qw for qemu-devel@nongnu.org; Wed, 19 Mar 2014 22:57:45 -0400 Received: by mail-pa0-f44.google.com with SMTP id bj1so266349pad.3 for ; Wed, 19 Mar 2014 19:57:44 -0700 (PDT) Message-ID: <532A5921.8090806@ozlabs.ru> Date: Thu, 20 Mar 2014 13:57:37 +1100 From: Alexey Kardashevskiy MIME-Version: 1.0 References: <20140306150652.1fc1313b@kryten> <532A3F82.7010308@suse.de> In-Reply-To: <532A3F82.7010308@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH] spapr: Clear LPCR_ILE during reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , Anton Blanchard , Greg Kurz Cc: paulus@samba.org, qemu-ppc@nongnu.org, qemu-devel@nongnu.org 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 >> --- >> >> 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