]> rtime.felk.cvut.cz Git - jailhouse.git/blob - jailhouse.h
c6bf15f628f09ebb13c07dd06934b7dedb606763
[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 #include <jailhouse/cell-config.h>
16
17 struct jailhouse_cell_create {
18         __u64 config_address;
19         __u32 config_size;
20         __u32 padding;
21 };
22
23 struct jailhouse_preload_image {
24         __u64 source_address;
25         __u64 size;
26         __u64 target_address;
27         __u64 padding;
28 };
29
30 struct jailhouse_cell_id {
31         __s32 id;
32         __u32 padding;
33         char name[JAILHOUSE_CELL_NAME_MAXLEN+1];
34 };
35
36 struct jailhouse_cell_load {
37         struct jailhouse_cell_id cell_id;
38         __u32 num_preload_images;
39         __u32 padding;
40         struct jailhouse_preload_image image[];
41 };
42
43 #define JAILHOUSE_CELL_ID_UNUSED        (-1)
44
45 #define JAILHOUSE_ENABLE                _IOW(0, 0, struct jailhouse_system)
46 #define JAILHOUSE_DISABLE               _IO(0, 1)
47 #define JAILHOUSE_CELL_CREATE           _IOW(0, 2, struct jailhouse_cell_create)
48 #define JAILHOUSE_CELL_LOAD             _IOW(0, 3, struct jailhouse_cell_load)
49 #define JAILHOUSE_CELL_START            _IOW(0, 4, struct jailhouse_cell_id)
50 #define JAILHOUSE_CELL_DESTROY          _IOW(0, 5, struct jailhouse_cell_id)