]> rtime.felk.cvut.cz Git - jailhouse.git/blob - driver/cell.h
arm: Remove irq field from pending_irq
[jailhouse.git] / driver / cell.h
1 /*
2  * Jailhouse, a Linux-based partitioning hypervisor
3  *
4  * Copyright (c) Siemens AG, 2014-2015
5  *
6  * Authors:
7  *  Jan Kiszka <jan.kiszka@siemens.com>
8  *
9  * This work is licensed under the terms of the GNU GPL, version 2.  See
10  * the COPYING file in the top-level directory.
11  */
12
13 #ifndef _JAILHOUSE_DRIVER_CELL_H
14 #define _JAILHOUSE_DRIVER_CELL_H
15
16 #include <linux/cpumask.h>
17 #include <linux/list.h>
18 #include <linux/kobject.h>
19 #include <linux/uaccess.h>
20
21 #include "jailhouse.h"
22
23 #include <jailhouse/cell-config.h>
24
25 struct cell {
26         struct kobject kobj;
27         struct list_head entry;
28         unsigned int id;
29         cpumask_t cpus_assigned;
30         u32 num_memory_regions;
31         struct jailhouse_memory *memory_regions;
32 #ifdef CONFIG_PCI
33         u32 num_pci_devices;
34         struct jailhouse_pci_device *pci_devices;
35 #endif /* CONFIG_PCI */
36 };
37
38 extern struct cell *root_cell;
39
40 void jailhouse_cell_kobj_release(struct kobject *kobj);
41
42 struct cell *
43 jailhouse_cell_create(const struct jailhouse_cell_desc *cell_desc);
44 void jailhouse_cell_register(struct cell *cell);
45 void jailhouse_cell_delete(struct cell *cell);
46
47 int jailhouse_cell_prepare_root(const struct jailhouse_cell_desc *cell_desc);
48 void jailhouse_cell_register_root(void);
49 void jailhouse_cell_delete_root(void);
50
51 void jailhouse_cell_delete_all(void);
52
53 int jailhouse_cmd_cell_create(struct jailhouse_cell_create __user *arg);
54 int jailhouse_cmd_cell_load(struct jailhouse_cell_load __user *arg);
55 int jailhouse_cmd_cell_start(const char __user *arg);
56 int jailhouse_cmd_cell_destroy(const char __user *arg);
57
58 #endif /* !_JAILHOUSE_DRIVER_CELL_H */