KVM: arm64: Consolidate sysreg userspace accesses
authorMarc Zyngier <maz@kernel.org>
Mon, 4 Jul 2022 16:27:00 +0000 (17:27 +0100)
committerMarc Zyngier <maz@kernel.org>
Sun, 17 Jul 2022 10:55:33 +0000 (11:55 +0100)
commit978ceeb3e40a59973ff1d1c3d23484f71f141819
tree12ab69ff026780227bdb956b4b51cef9354ac26f
parente48407ff9796529a1e5048b9e4d6ea8a0334468e
KVM: arm64: Consolidate sysreg userspace accesses

Until now, the .set_user and .get_user callbacks have to implement
(directly or not) the userspace memory accesses. Although this gives
us maximem flexibility, this is also a maintenance burden, making it
hard to audit, and I'd feel much better if it was all located in
a single place.

So let's do just that, simplifying most of the function signatures
in the process (the callbacks are now only concerned with the
data itself, and not with userspace).

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