[PATCH v1 15/18] arm64: disable EL2 traps for PIE

Mark Brown broonie at kernel.org
Thu Mar 9 08:38:41 PST 2023


On Thu, Mar 09, 2023 at 04:27:39PM +0000, Suzuki K Poulose wrote:
> On 09/03/2023 14:52, Joey Gouly wrote:

> > Disable trapping of TCR2_EL1 and PIRx_EL1 registers, so they can be
> > accessed from by EL1.

> > +.macro __init_el2_hcrx
> > +	mrs	x1, id_aa64mmfr1_el1
> > +	ubfx	x0, x1, #ID_AA64MMFR1_EL1_HCX_SHIFT, 4
> > +	cbz	x0, .Lskip_hcrx_\@

> If TCR2 is available, HCX must also be supported ?

OTOH given that an error here means that we'll die with no output and we
*have* had issues with virtual implementations not implementing all the
features they were supposed to (plus I guess some will allow user error
in configuration) a bit of defensiveness doesn't hurt.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20230309/c9b4f705/attachment.sig>


More information about the linux-arm-kernel mailing list