summaryrefslogtreecommitdiff
path: root/arch/arm64/kvm/sys_regs.h
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2022-07-04 19:27:00 +0300
committerMarc Zyngier <maz@kernel.org>2022-07-17 13:55:33 +0300
commit978ceeb3e40a59973ff1d1c3d23484f71f141819 (patch)
tree12ab69ff026780227bdb956b4b51cef9354ac26f /arch/arm64/kvm/sys_regs.h
parente48407ff9796529a1e5048b9e4d6ea8a0334468e (diff)
downloadlinux-978ceeb3e40a59973ff1d1c3d23484f71f141819.tar.xz
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>
Diffstat (limited to 'arch/arm64/kvm/sys_regs.h')
-rw-r--r--arch/arm64/kvm/sys_regs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm64/kvm/sys_regs.h b/arch/arm64/kvm/sys_regs.h
index 4fb6d59e7874..b8b576a2af2b 100644
--- a/arch/arm64/kvm/sys_regs.h
+++ b/arch/arm64/kvm/sys_regs.h
@@ -75,9 +75,9 @@ struct sys_reg_desc {
/* Custom get/set_user functions, fallback to generic if NULL */
int (*get_user)(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
- const struct kvm_one_reg *reg, void __user *uaddr);
+ u64 *val);
int (*set_user)(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
- const struct kvm_one_reg *reg, void __user *uaddr);
+ u64 val);
/* Return mask of REG_* runtime visibility overrides */
unsigned int (*visibility)(const struct kvm_vcpu *vcpu,