Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The EL2 GCS registers are added out of order in `el2_regs[]`, breaking the sysreg encoding sort order.
--
--- Patch [10]: [PATCH v19 10/14] KVM: selftests: arm64: Add GCS registers to get-reg-list ---
commit 64edf4a2b97420c00ede7a2556bf99d948255c65
Author: Mark Brown <[email protected]>
KVM: selftests: arm64: Add GCS registers to get-reg-list
This commit adds the new GCS registers (GCSCR_ELx, GCSCRE0_EL1, and GCSPR_ELx)
to the list of registers validated by the get-reg-list KVM selftest on arm64.
> diff --git a/tools/testing/selftests/kvm/arm64/get-reg-list.c b/tools/testing/selftests/kvm/arm64/get-reg-list.c
> index 0a3a94c4cca16..6a93136d153f0 100644
> --- a/tools/testing/selftests/kvm/arm64/get-reg-list.c
> +++ b/tools/testing/selftests/kvm/arm64/get-reg-list.c
[ ... ]
> @@ -738,6 +748,8 @@ static __u64 el2_regs[] = {
> SYS_REG(VTTBR_EL2),
> SYS_REG(VTCR_EL2),
> SYS_REG(VNCR_EL2),
> + SYS_REG(GCSPR_EL2),
> + SYS_REG(GCSCR_EL2),
[Severity: Low]
Are these registers out of order with respect to their sysreg encoding?
The register arrays in get-reg-list are canonically sorted by their (op0, op1,
CRn, CRm, op2) encoding to match KVM's native ordering. Since GCSPR_EL2 has
op2=1 and GCSCR_EL2 has op2=0, should GCSCR_EL2 come before GCSPR_EL2, similar
to how the EL1 variants were added earlier in base_regs[]?
> SYS_REG(HDFGRTR2_EL2),
> SYS_REG(HDFGWTR2_EL2),
> SYS_REG(HFGRTR2_EL2),
--
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=10
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.