2 * Jailhouse, a Linux-based partitioning hypervisor
4 * Copyright (c) Siemens AG, 2013-2015
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.
12 * Alternatively, you can use or redistribute this file under the following
15 * Redistribution and use in source and binary forms, with or without
16 * modification, are permitted provided that the following conditions
19 * 1. Redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer.
22 * 2. Redistributions in binary form must reproduce the above copyright
23 * notice, this list of conditions and the following disclaimer in the
24 * documentation and/or other materials provided with the distribution.
26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
30 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
36 * THE POSSIBILITY OF SUCH DAMAGE.
39 #ifndef _JAILHOUSE_DRIVER_H
40 #define _JAILHOUSE_DRIVER_H
42 #include <linux/ioctl.h>
43 #include <linux/types.h>
45 #define JAILHOUSE_CELL_ID_NAMELEN 31
47 struct jailhouse_cell_create {
53 struct jailhouse_preload_image {
60 struct jailhouse_cell_id {
63 char name[JAILHOUSE_CELL_ID_NAMELEN + 1];
66 struct jailhouse_cell_load {
67 struct jailhouse_cell_id cell_id;
68 __u32 num_preload_images;
70 struct jailhouse_preload_image image[];
73 #define JAILHOUSE_CELL_ID_UNUSED (-1)
75 #define JAILHOUSE_ENABLE _IOW(0, 0, void *)
76 #define JAILHOUSE_DISABLE _IO(0, 1)
77 #define JAILHOUSE_CELL_CREATE _IOW(0, 2, struct jailhouse_cell_create)
78 #define JAILHOUSE_CELL_LOAD _IOW(0, 3, struct jailhouse_cell_load)
79 #define JAILHOUSE_CELL_START _IOW(0, 4, struct jailhouse_cell_id)
80 #define JAILHOUSE_CELL_DESTROY _IOW(0, 5, struct jailhouse_cell_id)
82 #endif /* !_JAILHOUSE_DRIVER_H */