KVM: selftests: arm64: Correct feature test for S1PIE in get-reg-list
authorMark Brown <broonie@kernel.org>
Wed, 31 Jul 2024 16:21:13 +0000 (17:21 +0100)
committerOliver Upton <oliver.upton@linux.dev>
Wed, 7 Aug 2024 19:13:20 +0000 (19:13 +0000)
The ID register for S1PIE is ID_AA64MMFR3_EL1.S1PIE which is bits 11:8 but
get-reg-list uses a shift of 4, checking SCTLRX instead. Use a shift of 8
instead.

Fixes: 5f0419a0083b ("KVM: selftests: get-reg-list: add Permission Indirection registers")
Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Joey Gouly <joey.gouly@arm.com>
Link: https://lore.kernel.org/r/20240731-kvm-arm64-fix-s1pie-test-v1-1-a9253f3b7db4@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
tools/testing/selftests/kvm/aarch64/get-reg-list.c

index 709d7d7..4abebde 100644 (file)
@@ -32,13 +32,13 @@ static struct feature_id_reg feat_id_regs[] = {
        {
                ARM64_SYS_REG(3, 0, 10, 2, 2),  /* PIRE0_EL1 */
                ARM64_SYS_REG(3, 0, 0, 7, 3),   /* ID_AA64MMFR3_EL1 */
-               4,
+               8,
                1
        },
        {
                ARM64_SYS_REG(3, 0, 10, 2, 3),  /* PIR_EL1 */
                ARM64_SYS_REG(3, 0, 0, 7, 3),   /* ID_AA64MMFR3_EL1 */
-               4,
+               8,
                1
        }
 };