From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH 07/19] xen: arm: Annotate trap handler for HCR_EL2.{TWI, TWE, TSC} Date: Fri, 17 Apr 2015 07:26:25 +0100 Message-ID: <5530A791.7080802@citrix.com> References: <1427796446.2115.34.camel@citrix.com> <1427796462-24376-7-git-send-email-ian.campbell@citrix.com> <551E9029.50700@gmail.com> <1429202073.25195.182.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1429202073.25195.182.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, julien.grall@linaro.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Hi Ian, On 16/04/2015 17:34, Ian Campbell wrote: > 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 >>> --- >>> 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. Right, it's better to have a specific reference. I was surprised to see that ARMv8 didn't have number for small section. > 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. Thank you for the explanation. When I reviewed the series, it was very handy to have a reference to the docs. Regards, -- Julien Grall