Lines Matching defs:cpu
24 * The notification value is in cpu->pending_notify: we return true if it went
27 bool send_notify_to_eventfd(struct lg_cpu *cpu)
42 * cpu->lg->eventfds before cpu->lg->eventfds is set. Sounds crazy,
49 map = rcu_dereference(cpu->lg->eventfds);
55 if (map->map[i].addr == cpu->pending_notify) {
57 cpu->pending_notify = 0;
61 /* We're done with the rcu-protected variable cpu->lg->eventfds. */
65 return cpu->pending_notify == 0;
180 static int user_send_irq(struct lg_cpu *cpu, const unsigned long __user *input)
193 set_interrupt(cpu, irq);
204 struct lg_cpu *cpu;
215 cpu = &lg->cpus[cpu_id];
218 if (current != cpu->tsk)
240 if (cpu->pending_notify)
241 cpu->pending_notify = 0;
244 return run_guest(cpu, (unsigned long __user *)user);
251 static int lg_cpu_start(struct lg_cpu *cpu, unsigned id, unsigned long start_ip)
254 if (id >= ARRAY_SIZE(cpu->lg->cpus))
258 cpu->id = id;
259 cpu->lg = container_of(cpu, struct lguest, cpus[id]);
260 cpu->lg->nr_cpus++;
263 init_clockdev(cpu);
269 cpu->regs_page = get_zeroed_page(GFP_KERNEL);
270 if (!cpu->regs_page)
274 cpu->regs = (void *)cpu->regs_page + PAGE_SIZE - sizeof(*cpu->regs);
280 lguest_arch_setup_regs(cpu, start_ip);
286 cpu->tsk = current;
293 cpu->mm = get_task_mm(cpu->tsk);
299 cpu->last_pages = NULL;
357 /* This is the first cpu (cpu 0) and it will start booting at args[2] */
411 struct lg_cpu *uninitialized_var(cpu);
423 cpu = &lg->cpus[cpu_id];
434 return user_send_irq(cpu, input);