]> rtime.felk.cvut.cz Git - jailhouse.git/blob - jailhouse.h
tools: Remove dependency of jailhouse tool on cell-config.h
[jailhouse.git] / jailhouse.h
1 /*
2  * Jailhouse, a Linux-based partitioning hypervisor
3  *
4  * Copyright (c) Siemens AG, 2013
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 #include <linux/ioctl.h>
14 #include <linux/types.h>
15
16 #define JAILHOUSE_CELL_ID_NAMELEN       31
17
18 struct jailhouse_cell_create {
19         __u64 config_address;
20         __u32 config_size;
21         __u32 padding;
22 };
23
24 struct jailhouse_preload_image {
25         __u64 source_address;
26         __u64 size;
27         __u64 target_address;
28         __u64 padding;
29 };
30
31 struct jailhouse_cell_id {
32         __s32 id;
33         __u32 padding;
34         char name[JAILHOUSE_CELL_ID_NAMELEN + 1];
35 };
36
37 struct jailhouse_cell_load {
38         struct jailhouse_cell_id cell_id;
39         __u32 num_preload_images;
40         __u32 padding;
41         struct jailhouse_preload_image image[];
42 };
43
44 #define JAILHOUSE_CELL_ID_UNUSED        (-1)
45
46 #define JAILHOUSE_ENABLE                _IOW(0, 0, void *)
47 #define JAILHOUSE_DISABLE               _IO(0, 1)
48 #define JAILHOUSE_CELL_CREATE           _IOW(0, 2, struct jailhouse_cell_create)
49 #define JAILHOUSE_CELL_LOAD             _IOW(0, 3, struct jailhouse_cell_load)
50 #define JAILHOUSE_CELL_START            _IOW(0, 4, struct jailhouse_cell_id)
51 #define JAILHOUSE_CELL_DESTROY          _IOW(0, 5, struct jailhouse_cell_id)