Skip to content

Commit 84ed454

Browse files
author
Marc Zyngier
committed
KVM: arm64: Simplify visibility handling of AArch32 SPSR_*
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Marc Zyngier <[email protected]>
1 parent 989fce6 commit 84ed454

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

arch/arm64/kvm/sys_regs.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2770,14 +2770,10 @@ static const struct sys_reg_desc sys_reg_descs[] = {
27702770
{ SYS_DESC(SYS_SP_EL1), access_sp_el1},
27712771

27722772
/* AArch32 SPSR_* are RES0 if trapped from a NV guest */
2773-
{ SYS_DESC(SYS_SPSR_irq), .access = trap_raz_wi,
2774-
.visibility = hidden_user_visibility },
2775-
{ SYS_DESC(SYS_SPSR_abt), .access = trap_raz_wi,
2776-
.visibility = hidden_user_visibility },
2777-
{ SYS_DESC(SYS_SPSR_und), .access = trap_raz_wi,
2778-
.visibility = hidden_user_visibility },
2779-
{ SYS_DESC(SYS_SPSR_fiq), .access = trap_raz_wi,
2780-
.visibility = hidden_user_visibility },
2773+
{ SYS_DESC(SYS_SPSR_irq), .access = trap_raz_wi },
2774+
{ SYS_DESC(SYS_SPSR_abt), .access = trap_raz_wi },
2775+
{ SYS_DESC(SYS_SPSR_und), .access = trap_raz_wi },
2776+
{ SYS_DESC(SYS_SPSR_fiq), .access = trap_raz_wi },
27812777

27822778
{ SYS_DESC(SYS_IFSR32_EL2), trap_undef, reset_unknown, IFSR32_EL2 },
27832779
EL2_REG(AFSR0_EL2, access_rw, reset_val, 0),

0 commit comments

Comments
 (0)