KVM: arm64: vgic-v3: Consolidate userspace access for MMIO registers
authorMarc Zyngier <maz@kernel.org>
Tue, 5 Jul 2022 09:26:07 +0000 (10:26 +0100)
committerMarc Zyngier <maz@kernel.org>
Sun, 17 Jul 2022 10:55:33 +0000 (11:55 +0100)
commite1246f3f2df7aec025fd587ac3d7912007d1144d
tree178ef7a858569de2a7e5bcb22ce4d9973c098e35
parent38cf0bb7625a58625efeef9ec944671464ff7430
KVM: arm64: vgic-v3: Consolidate userspace access for MMIO registers

For userspace accesses to GICv3 MMIO registers (and related data),
vgic_v3_{get,set}_attr are littered with {get,put}_user() calls,
making it hard to audit and reason about.

Consolidate all userspace accesses in vgic_v3_attr_regs_access(),
making the code far simpler to audit.

Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/vgic/vgic-kvm-device.c