Lines Matching refs:uaddr
672 static int reg_from_user(void *val, const void __user *uaddr, u64 id) in reg_from_user() argument
674 if (copy_from_user(val, uaddr, KVM_REG_SIZE(id)) != 0) in reg_from_user()
683 static int reg_to_user(void __user *uaddr, const void *val, u64 id) in reg_to_user() argument
685 if (copy_to_user(uaddr, val, KVM_REG_SIZE(id)) != 0) in reg_to_user()
690 static int get_invariant_cp15(u64 id, void __user *uaddr) in get_invariant_cp15() argument
707 ret = reg_to_user(uaddr, &val, id); in get_invariant_cp15()
709 ret = reg_to_user(uaddr, &r->val, id); in get_invariant_cp15()
714 static int set_invariant_cp15(u64 id, void __user *uaddr) in set_invariant_cp15() argument
731 err = reg_from_user(&val32, uaddr, id); in set_invariant_cp15()
735 err = reg_from_user(&val, uaddr, id); in set_invariant_cp15()
790 static int demux_c15_get(u64 id, void __user *uaddr) in demux_c15_get() argument
793 u32 __user *uval = uaddr; in demux_c15_get()
815 static int demux_c15_set(u64 id, void __user *uaddr) in demux_c15_set() argument
818 u32 __user *uval = uaddr; in demux_c15_set()
891 static int vfp_get_reg(const struct kvm_vcpu *vcpu, u64 id, void __user *uaddr) in vfp_get_reg() argument
904 return reg_to_user(uaddr, &vcpu->arch.vfp_guest.fpregs[vfpid], in vfp_get_reg()
914 return reg_to_user(uaddr, &vcpu->arch.vfp_guest.fpexc, id); in vfp_get_reg()
916 return reg_to_user(uaddr, &vcpu->arch.vfp_guest.fpscr, id); in vfp_get_reg()
918 return reg_to_user(uaddr, &vcpu->arch.vfp_guest.fpinst, id); in vfp_get_reg()
920 return reg_to_user(uaddr, &vcpu->arch.vfp_guest.fpinst2, id); in vfp_get_reg()
923 return reg_to_user(uaddr, &val, id); in vfp_get_reg()
926 return reg_to_user(uaddr, &val, id); in vfp_get_reg()
929 return reg_to_user(uaddr, &val, id); in vfp_get_reg()
935 static int vfp_set_reg(struct kvm_vcpu *vcpu, u64 id, const void __user *uaddr) in vfp_set_reg() argument
949 uaddr, id); in vfp_set_reg()
958 return reg_from_user(&vcpu->arch.vfp_guest.fpexc, uaddr, id); in vfp_set_reg()
960 return reg_from_user(&vcpu->arch.vfp_guest.fpscr, uaddr, id); in vfp_set_reg()
962 return reg_from_user(&vcpu->arch.vfp_guest.fpinst, uaddr, id); in vfp_set_reg()
964 return reg_from_user(&vcpu->arch.vfp_guest.fpinst2, uaddr, id); in vfp_set_reg()
967 if (reg_from_user(&val, uaddr, id)) in vfp_set_reg()
973 if (reg_from_user(&val, uaddr, id)) in vfp_set_reg()
979 if (reg_from_user(&val, uaddr, id)) in vfp_set_reg()
999 static int vfp_get_reg(const struct kvm_vcpu *vcpu, u64 id, void __user *uaddr) in vfp_get_reg() argument
1004 static int vfp_set_reg(struct kvm_vcpu *vcpu, u64 id, const void __user *uaddr) in vfp_set_reg() argument
1013 void __user *uaddr = (void __user *)(long)reg->addr; in kvm_arm_coproc_get_reg() local
1017 return demux_c15_get(reg->id, uaddr); in kvm_arm_coproc_get_reg()
1020 return vfp_get_reg(vcpu, reg->id, uaddr); in kvm_arm_coproc_get_reg()
1024 return get_invariant_cp15(reg->id, uaddr); in kvm_arm_coproc_get_reg()
1031 ret = reg_to_user(uaddr, &val, reg->id); in kvm_arm_coproc_get_reg()
1033 ret = reg_to_user(uaddr, &vcpu->arch.cp15[r->reg], reg->id); in kvm_arm_coproc_get_reg()
1042 void __user *uaddr = (void __user *)(long)reg->addr; in kvm_arm_coproc_set_reg() local
1046 return demux_c15_set(reg->id, uaddr); in kvm_arm_coproc_set_reg()
1049 return vfp_set_reg(vcpu, reg->id, uaddr); in kvm_arm_coproc_set_reg()
1053 return set_invariant_cp15(reg->id, uaddr); in kvm_arm_coproc_set_reg()
1059 ret = reg_from_user(&val, uaddr, reg->id); in kvm_arm_coproc_set_reg()
1063 ret = reg_from_user(&vcpu->arch.cp15[r->reg], uaddr, reg->id); in kvm_arm_coproc_set_reg()