Lines Matching defs:args

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