]> rtime.felk.cvut.cz Git - jailhouse.git/blob - hypervisor/arch/x86/include/asm/cell.h
core: Add Cell Set Loadable hypercall
[jailhouse.git] / hypervisor / arch / x86 / include / asm / cell.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 #ifndef _JAILHOUSE_ASM_CELL_H
14 #define _JAILHOUSE_ASM_CELL_H
15
16 #include <jailhouse/paging.h>
17
18 #include <jailhouse/cell-config.h>
19 #include <jailhouse/hypercall.h>
20
21 /**
22  * struct cell - cell-related state information
23  * ...
24  * @pci_addr_port_val: virtual address port for PCI config space
25  * ...
26  */
27 /* TODO: factor out arch-independent bits, define struct arch_cell */
28 struct cell {
29         struct {
30                 /* should be first as it requires page alignment */
31                 u8 __attribute__((aligned(PAGE_SIZE))) io_bitmap[2*PAGE_SIZE];
32                 struct paging_structures ept_structs;
33         } vmx;
34
35         struct {
36                 struct paging_structures pg_structs;
37         } vtd;
38
39         unsigned int id;
40         unsigned int data_pages;
41         struct jailhouse_cell_desc *config;
42
43         struct cpu_set *cpu_set;
44         struct cpu_set small_cpu_set;
45
46         bool loadable;
47
48         struct cell *next;
49
50         u32 pci_addr_port_val;
51
52         union {
53                 struct jailhouse_comm_region comm_region;
54                 u8 padding[PAGE_SIZE];
55         } __attribute__((aligned(PAGE_SIZE))) comm_page;
56 };
57
58 extern struct cell root_cell;
59
60 #endif /* !_JAILHOUSE_ASM_CELL_H */