Re: [PATCH v17 10/14] KVM: selftests: arm64: Add GCS registers to get-reg-list

Mark Brown <[email protected]> Fri, 31 Jul 2026 14:31:48 +0100
Newsgroups dev.linux.lists.sashiko-reviews,dev.linux.lists.kvmarm
Message-ID <[email protected]>
On Fri, Jul 31, 2026 at 01:03:27PM +0000, [email protected] wrote:

> > @@ -757,6 +767,8 @@ static __u64 el2_regs[] = {
> >  	SYS_REG(PIRE0_EL2),
> >  	SYS_REG(PIR_EL2),
> >  	SYS_REG(POR_EL2),
> > +	SYS_REG(GCSPR_EL2),
> > +	SYS_REG(GCSCR_EL2),
> 
> [Severity: Low]
> This isn't a bug, but are these registers inserted out of order compared to
> their system register encoding?
> 
> The el2_regs array appears to be sorted by encoding (Op0, Op1, CRn, CRm,
> Op2). Both GCSCR_EL2 (3, 4, 2, 5, 0) and GCSPR_EL2 (3, 4, 2, 5, 1) have
> CRn=2, which suggests they should be placed earlier in the array, perhaps
> near VTCR_EL2 or VNCR_EL2.

With the use of symbolic names this sorting is really not at all
obvious...
signature.asc (application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmpso8MACgkQJNaLcl1U
h9BtRwf9EBpLgPwDvrEKN+n8Dg+2t1vscXTvTsqlPMoYzupPdZg3layK+BfGY31i
vujjWYemtdH0CVAygJb1bgCnYoeWeD8fVKxj2QvmPsAOiR2WS3v3t+wIkukckKxA
8HZHhfpqGz/UGoK3YvIT8V17zXAyvtpAMOqlddI9rkpJGTUgljS8WTR+MQh8Di1Z
GJJ/69ayfpk/OD0Vv2a0RDj0pB0u7i3e9mrPuIa4cpPEy0t4vadIi+c+IIvJQ5G0
mb/866UXn2Q3gZXZ3Ru745RZ5eygE8pDyOuxs5Rihy5hbzWUIpV5FG4bSleWNwO1
bYly47+tShxILWz6NvzFTLOo2GUUPQ==
=MFr3
-----END PGP SIGNATURE-----