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

Re: [Xen-devel] [PATCH 07/19] xen: arm: Annotate trap handler for HCR_EL2.{TWI, TWE, TSC}



On Fri, 2015-04-03 at 15:05 +0200, Julien Grall wrote:
> Hi Ian,
> 
> On 31/03/2015 12:07, Ian Campbell wrote:
> > Reference the bit which enables the trap and the section/page which
> > describes what that bit enables.
> >
> > These ones are pretty trivial, included for completeness.
> >
> > Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> > ---
> >   xen/arch/arm/traps.c |   17 +++++++++++++++++
> >   1 file changed, 17 insertions(+)
> >
> > diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
> > index c9c98d3..70e1b4d 100644
> > --- a/xen/arch/arm/traps.c
> > +++ b/xen/arch/arm/traps.c
> > @@ -2083,6 +2083,12 @@ asmlinkage void do_trap_hypervisor(struct 
> > cpu_user_regs *regs)
> >
> >       switch (hsr.ec) {
> >       case HSR_EC_WFI_WFE:
> > +        /*
> > +         * HSR_EL2.TWI, HSR_EL2.TWE
> 
> Typo: I should be HCR not HSR.

Gah, at least I was consistent pretty much throughout!

> 
> > +         *
> > +         * ARMv7 (DDI 0406C.b): B1.14.9
> > +         * ARMv8 (DDI 0487A.d): D1-1505 Table D1-51
> 
> It's a bit confusing that you are using section for ARMv7 and page for 
> ARMv8.

I wanted to use section numbers everywhere, since in the ARMv7 ARM they
are nice and precise. But the ARMv8 ARM doesn't really use them in the
same way.

In this case D1-1505 is in section D1.15.3 which starts on page D1-1495
and covers the whole of HCR_EL2, which isn't a useful reference since it
would be the same for 2/3 of the patches (AKA bits in HCR_EL2) in this
series. D1-1505 isn't perfect since there is other stuff on that page,
but it's as close I can get.

Bit in the ARMv7 ARM B1.14.9 is exactly about these two traps.

Part of my goal here is to make it so that people (especially me) don't
spend half their life searching for the doc associated with a given
HCR_EL2 trap bit.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.