]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
KVM: arm64: Simplify visibility handling of AArch32 SPSR_*
authorMarc Zyngier <maz@kernel.org>
Wed, 4 Sep 2024 08:24:18 +0000 (09:24 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 11 Sep 2024 18:50:42 +0000 (19:50 +0100)
Since SPSR_* are not associated with any register in the sysreg array,
nor do they have .get_user()/.set_user() helpers, they are invisible to
userspace with that encoding.

Therefore hidden_user_visibility() serves no purpose here, and can be
safely removed.

Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20240904082419.1982402-3-maz@kernel.org
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/sys_regs.c

index 9e44038957389ce8e291608398e5255503e7600f..469780540bb89edf3cd1104f74c6ca0a480a9812 100644 (file)
@@ -2770,14 +2770,10 @@ static const struct sys_reg_desc sys_reg_descs[] = {
        { SYS_DESC(SYS_SP_EL1), access_sp_el1},
 
        /* AArch32 SPSR_* are RES0 if trapped from a NV guest */
-       { SYS_DESC(SYS_SPSR_irq), .access = trap_raz_wi,
-         .visibility = hidden_user_visibility },
-       { SYS_DESC(SYS_SPSR_abt), .access = trap_raz_wi,
-         .visibility = hidden_user_visibility },
-       { SYS_DESC(SYS_SPSR_und), .access = trap_raz_wi,
-         .visibility = hidden_user_visibility },
-       { SYS_DESC(SYS_SPSR_fiq), .access = trap_raz_wi,
-         .visibility = hidden_user_visibility },
+       { SYS_DESC(SYS_SPSR_irq), .access = trap_raz_wi },
+       { SYS_DESC(SYS_SPSR_abt), .access = trap_raz_wi },
+       { SYS_DESC(SYS_SPSR_und), .access = trap_raz_wi },
+       { SYS_DESC(SYS_SPSR_fiq), .access = trap_raz_wi },
 
        { SYS_DESC(SYS_IFSR32_EL2), trap_undef, reset_unknown, IFSR32_EL2 },
        EL2_REG(AFSR0_EL2, access_rw, reset_val, 0),