Re: [Xen-devel] [PATCH v2 00/19] xen: arm: cleanup traps.c

2015-05-08 Thread Ian Campbell
On Fri, 2015-05-08 at 11:37 +0100, Julien Grall wrote:
> Although it was only a NIT in the subject. If you don't want to bother
> resending the whole series on the ML for few NITs, you can add my
> Reviewed-by to this patch too.

Thanks, I've taken you up on that offer rather than spamming the list
and applied what would have been v3 with your R-by, thanks.

Ian.



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


Re: [Xen-devel] [PATCH v2 00/19] xen: arm: cleanup traps.c

2015-05-08 Thread Julien Grall
Hi Ian,

On 17/04/15 15:01, Ian Campbell wrote:
> (R)eviewed
> 
> R xen: arm: constify union hsr and struct hsr_* where possible.
> R xen: arm: Fix handling of ICC_{SGI1R,SGI0R,ASGI1R}_EL1
> R xen: arm: call inject_undef_exception directly
>  Mxen: arm: provide and use a handle_raz_wi helper
>  Mxen: arm: Add and use r/o+raz and w/o+wi helpers
>  Mxen: arm: add minimum exception level argument to trap handler helpers
>  Mxen: arm: Annotate trap handler for HSR_EL2.{TWI,TWE,TSC}
>  Mxen: arm: implement handling of ACTLR_EL1 trap
> RMxen: arm: Annotate registers trapped by HCR_EL1.TIDCP
>  Mxen: arm: implement handling of registers trapped by CPTR_EL2.TTA
>  Mxen: arm: Annotate handlers for CPTR_EL2.Tx
>  Mxen: arm: Annotate the handlers for HSTR_EL2.T15
>  Mxen: arm: Annotate registers trapped by MDCR_EL2.TDRA
>  Mxen: arm: Annotate registers trapped by MDCR_EL2.TDOSA
>   xen: arm: Annotate registers trapped by MDCR_EL2.TDA
>   xen: arm: Annotate registers trapped by MDCR_EL2.TPM and TPMCR
> R xen: arm: Remove CNTPCT_EL0 trap handling.
>   xen: arm: Annotate registers trapped when CNTHCTL_EL2.EL1PCEN == 0
> R xen: arm: Annotate source of ICC SGI register trapping

I added my Reviewed-by to all the patch except #16.

Although it was only a NIT in the subject. If you don't want to bother
resending the whole series on the ML for few NITs, you can add my
Reviewed-by to this patch too.

Regards,

-- 
Julien Grall

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


[Xen-devel] [PATCH v2 00/19] xen: arm: cleanup traps.c

2015-04-17 Thread Ian Campbell
While working on reenabling 32-bit user space on arm63 I concluded that
the trap handling in traps.c had grown into a twisty confusing mess.
Lets try and sort that out.

This series contains two halves (after a couple of preparatory
cleanups).

First clean up the goto maze which we've found ourselves in, by
providing a selection of handle_* helpers e.g. for raz/ro etc and by
calling those and the existing inject_* helpers directly instead of
trying to have only one call to each of the latter by using goto. The
handle_* helpers can also deal with the minimum allowable exception
level, which simplifies things further.

To keep things simpler I've used "return handle_..." when the caller and
callee both return void, since that avoids the need for 3 more lines (2
braces and the return), I think this improves clarity.

Second go through init_traps and for each bit there consolidate the
handling for each type of trap (e.g. do_cp15_32, do_cp15_64, do_sysreg
etc) such that all the registers whose traps are associated with that
bit are kept together beneath a comment which documents why those bits
are trapped, references the appropriate section of the ARMv7 and ARMv8
ARM (the v8 one in particular has a series of very useful tables per
bit) and notes which registers are not explicitly handled (and therefore
take the default case).

For traps which have no explicit handling (i.e. those which trap
implementation defined registers) and which always hit the default case
add the comment above that instead.

Do the same for the GICv3 ICC traps and timer traps.

There is probably scope for doing more, i.e. refactoring related
functionality into subsystem helpers (like we do for vtimer) and even
moving into separate files, but I think this is a good start.

This is a lot of patches, sorry, because I wanted to mostly go through
the trap bits one at a time per patch to keep each one manageable,
although I did end up compressing some of the more obvious ones.

Since last time I've addressed all (I hope!) of Julien's comments.

(R)eviewed

R   xen: arm: constify union hsr and struct hsr_* where possible.
R   xen: arm: Fix handling of ICC_{SGI1R,SGI0R,ASGI1R}_EL1
R   xen: arm: call inject_undef_exception directly
 M  xen: arm: provide and use a handle_raz_wi helper
 M  xen: arm: Add and use r/o+raz and w/o+wi helpers
 M  xen: arm: add minimum exception level argument to trap handler helpers
 M  xen: arm: Annotate trap handler for HSR_EL2.{TWI,TWE,TSC}
 M  xen: arm: implement handling of ACTLR_EL1 trap
RM  xen: arm: Annotate registers trapped by HCR_EL1.TIDCP
 M  xen: arm: implement handling of registers trapped by CPTR_EL2.TTA
 M  xen: arm: Annotate handlers for CPTR_EL2.Tx
 M  xen: arm: Annotate the handlers for HSTR_EL2.T15
 M  xen: arm: Annotate registers trapped by MDCR_EL2.TDRA
 M  xen: arm: Annotate registers trapped by MDCR_EL2.TDOSA
xen: arm: Annotate registers trapped by MDCR_EL2.TDA
xen: arm: Annotate registers trapped by MDCR_EL2.TPM and TPMCR
R   xen: arm: Remove CNTPCT_EL0 trap handling.
xen: arm: Annotate registers trapped when CNTHCTL_EL2.EL1PCEN == 0
R   xen: arm: Annotate source of ICC SGI register trapping

Ian.


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



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