2 * Jailhouse, a Linux-based partitioning hypervisor
4 * Copyright (c) Siemens AG, 2013
7 * Jan Kiszka <jan.kiszka@siemens.com>
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
13 #include <asm/types.h>
14 #include <asm/percpu.h>
15 #include <jailhouse/cell-config.h>
17 extern struct jailhouse_system *system_config;
19 unsigned int next_cpu(unsigned int cpu, struct cpu_set *cpu_set,
22 #define for_each_cpu(cpu, set) \
24 (cpu) = next_cpu((cpu), (set), -1), \
25 (cpu) <= (set)->max_cpu_id; \
28 #define for_each_cpu_except(cpu, set, exception) \
30 (cpu) = next_cpu((cpu), (set), (exception)), \
31 (cpu) <= (set)->max_cpu_id; \
34 int check_mem_regions(struct jailhouse_cell_desc *config);
35 int cell_init(struct cell *cell, struct jailhouse_cell_desc *config,
38 int cell_create(struct per_cpu *cpu_data, unsigned long config_address);
40 int shutdown(struct per_cpu *cpu_data);
42 void arch_suspend_cpu(unsigned int cpu_id);
43 void arch_resume_cpu(unsigned int cpu_id);
44 void arch_reset_cpu(unsigned int cpu_id);
45 void arch_shutdown_cpu(unsigned int cpu_id);
47 int arch_cell_create(struct per_cpu *cpu_data, struct cell *new_cell,
48 struct jailhouse_cell_desc *config);