qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [PULL 1/3] ppc: Rework POWER7 & POWER8 exception model


From: David Gibson
Subject: Re: [Qemu-ppc] [PULL 1/3] ppc: Rework POWER7 & POWER8 exception model
Date: Fri, 8 Apr 2016 11:20:51 +1000
User-agent: Mutt/1.5.24 (2015-08-30)

On Thu, Apr 07, 2016 at 12:27:34PM +0200, Cédric Le Goater wrote:
> Hello Laurent,
> 
> On 04/07/2016 11:13 AM, Laurent Vivier wrote:
> > 
> > 
> > On 05/04/2016 04:17, David Gibson wrote:
> >> From: Cédric Le Goater <address@hidden>
> >>
> >> From: Benjamin Herrenschmidt <address@hidden>
> >>
> >> This patch fixes the current AIL implementation for POWER8. The
> >> interrupt vector address can be calculated directly from LPCR when the
> >> exception is handled. The excp_prefix update becomes useless and we
> >> can cleanup the H_SET_MODE hcall.
> > 
> > I know it's a little bit late to comment this patch but:
> > 
> > what about the initialization of the NIP in ppc_cpu_reset()?
> > 
> >     env->nip = env->hreset_vector | env->excp_prefix;
> > 
> > on POWER8 "env->excp_prefix" is always 0, but LPCR can have an AIL defined?
> 
> yes. env->spr[SPR_LPCR] still has the previous value at that time and 
> it is reseted right below in the same routine. 
> 
> The cpu should restart in a valid state after that and later on, use the 
> H_SET_MODE hcall from the guest kernel to set the AIL bits back in LPCR. 
> It looks fine to me but I might be missing something.

Right.. it's kind of a case of two bugs cancelling each other out, but
the end result is correct.  The initial NIP should include the AIL
from the LPCR.. but the AIL should be cleared on reset, so it makes no
practical difference.

So in 2.7 it would certainly be good to clean this up for clarity if
nothing else, but I don't see something that needs fixing in the 2.6
timeframe.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]