Skip to content

Commit 55ea75f

Browse files
committed
KVM: arm64: selftests: Add SCTLR2_EL1 to get-reg-list
Handle SCTLR2_EL1 specially as it is only visible to userspace when FEAT_SCTLR2 is implemented for the VM. Reviewed-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent a90aac5 commit 55ea75f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/testing/selftests/kvm/arm64/get-reg-list.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ static struct feature_id_reg feat_id_regs[] = {
5252
ARM64_SYS_REG(3, 0, 0, 7, 3), /* ID_AA64MMFR3_EL1 */
5353
16,
5454
1
55+
},
56+
{
57+
KVM_ARM64_SYS_REG(SYS_SCTLR2_EL1),
58+
KVM_ARM64_SYS_REG(SYS_ID_AA64MMFR3_EL1),
59+
ID_AA64MMFR3_EL1_SCTLRX_SHIFT,
60+
ID_AA64MMFR3_EL1_SCTLRX_IMP
5561
}
5662
};
5763

@@ -469,6 +475,7 @@ static __u64 base_regs[] = {
469475
ARM64_SYS_REG(3, 0, 1, 0, 0), /* SCTLR_EL1 */
470476
ARM64_SYS_REG(3, 0, 1, 0, 1), /* ACTLR_EL1 */
471477
ARM64_SYS_REG(3, 0, 1, 0, 2), /* CPACR_EL1 */
478+
KVM_ARM64_SYS_REG(SYS_SCTLR2_EL1),
472479
ARM64_SYS_REG(3, 0, 2, 0, 0), /* TTBR0_EL1 */
473480
ARM64_SYS_REG(3, 0, 2, 0, 1), /* TTBR1_EL1 */
474481
ARM64_SYS_REG(3, 0, 2, 0, 2), /* TCR_EL1 */

0 commit comments

Comments
 (0)