Lines Matching full:args

19 static void kvm_rtas_set_xive(struct kvm_vcpu *vcpu, struct rtas_args *args)  in kvm_rtas_set_xive()  argument
24 if (be32_to_cpu(args->nargs) != 3 || be32_to_cpu(args->nret) != 1) { in kvm_rtas_set_xive()
29 irq = be32_to_cpu(args->args[0]); in kvm_rtas_set_xive()
30 server = be32_to_cpu(args->args[1]); in kvm_rtas_set_xive()
31 priority = be32_to_cpu(args->args[2]); in kvm_rtas_set_xive()
40 args->rets[0] = cpu_to_be32(rc); in kvm_rtas_set_xive()
43 static void kvm_rtas_get_xive(struct kvm_vcpu *vcpu, struct rtas_args *args) in kvm_rtas_get_xive() argument
48 if (be32_to_cpu(args->nargs) != 1 || be32_to_cpu(args->nret) != 3) { in kvm_rtas_get_xive()
53 irq = be32_to_cpu(args->args[0]); in kvm_rtas_get_xive()
65 args->rets[1] = cpu_to_be32(server); in kvm_rtas_get_xive()
66 args->rets[2] = cpu_to_be32(priority); in kvm_rtas_get_xive()
68 args->rets[0] = cpu_to_be32(rc); in kvm_rtas_get_xive()
71 static void kvm_rtas_int_off(struct kvm_vcpu *vcpu, struct rtas_args *args) in kvm_rtas_int_off() argument
76 if (be32_to_cpu(args->nargs) != 1 || be32_to_cpu(args->nret) != 1) { in kvm_rtas_int_off()
81 irq = be32_to_cpu(args->args[0]); in kvm_rtas_int_off()
90 args->rets[0] = cpu_to_be32(rc); in kvm_rtas_int_off()
93 static void kvm_rtas_int_on(struct kvm_vcpu *vcpu, struct rtas_args *args) in kvm_rtas_int_on() argument
98 if (be32_to_cpu(args->nargs) != 1 || be32_to_cpu(args->nret) != 1) { in kvm_rtas_int_on()
103 irq = be32_to_cpu(args->args[0]); in kvm_rtas_int_on()
112 args->rets[0] = cpu_to_be32(rc); in kvm_rtas_int_on()
117 void (*handler)(struct kvm_vcpu *vcpu, struct rtas_args *args);
138 struct kvm_rtas_token_args args; in rtas_name_matches() local
139 return !strncmp(s1, s2, sizeof(args.name)); in rtas_name_matches()
200 struct kvm_rtas_token_args args; in kvm_vm_ioctl_rtas_define_token() local
203 if (copy_from_user(&args, argp, sizeof(args))) in kvm_vm_ioctl_rtas_define_token()
208 if (args.token) in kvm_vm_ioctl_rtas_define_token()
209 rc = rtas_token_define(kvm, args.name, args.token); in kvm_vm_ioctl_rtas_define_token()
211 rc = rtas_token_undefine(kvm, args.name); in kvm_vm_ioctl_rtas_define_token()
221 struct rtas_args args; in kvmppc_rtas_hcall() local
227 * r4 contains the guest physical address of the RTAS args in kvmppc_rtas_hcall()
233 rc = kvm_read_guest(vcpu->kvm, args_phys, &args, sizeof(args)); in kvmppc_rtas_hcall()
239 * args->rets is a pointer into args->args. Now that we've in kvmppc_rtas_hcall()
240 * copied args we need to fix it up to point into our copy, in kvmppc_rtas_hcall()
241 * not the guest args. We also need to save the original in kvmppc_rtas_hcall()
244 orig_rets = args.rets; in kvmppc_rtas_hcall()
245 if (be32_to_cpu(args.nargs) >= ARRAY_SIZE(args.args)) { in kvmppc_rtas_hcall()
247 * Don't overflow our args array: ensure there is room for in kvmppc_rtas_hcall()
256 args.rets = &args.args[be32_to_cpu(args.nargs)]; in kvmppc_rtas_hcall()
262 if (d->token == be32_to_cpu(args.token)) { in kvmppc_rtas_hcall()
263 d->handler->handler(vcpu, &args); in kvmppc_rtas_hcall()
272 args.rets = orig_rets; in kvmppc_rtas_hcall()
273 rc = kvm_write_guest(vcpu->kvm, args_phys, &args, sizeof(args)); in kvmppc_rtas_hcall()
283 * args pointer or nargs/nret values that would overflow the in kvmppc_rtas_hcall()
284 * array. That means we can't get to the args, and so we can't in kvmppc_rtas_hcall()