]> rtime.felk.cvut.cz Git - jailhouse.git/blob - hypervisor/arch/x86/include/asm/cell.h
core: Introduce communication region
[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 <asm/types.h>
17 #include <asm/paging.h>
18
19 #include <jailhouse/cell-config.h>
20 #include <jailhouse/hypercall.h>
21
22 struct cell {
23         struct {
24                 /* should be first as it requires page alignment */
25                 u8 __attribute__((aligned(PAGE_SIZE))) io_bitmap[2*PAGE_SIZE];
26                 pgd_t *ept;
27         } vmx;
28
29         struct {
30                 pgd_t *page_table;
31         } vtd;
32
33         unsigned int id;
34         unsigned int data_pages;
35         struct jailhouse_cell_desc *config;
36
37         struct cpu_set *cpu_set;
38         struct cpu_set small_cpu_set;
39
40         unsigned long page_offset;
41
42         struct cell *next;
43
44         union {
45                 struct jailhouse_comm_region comm_region;
46                 u8 padding[PAGE_SIZE];
47         } __attribute__((aligned(PAGE_SIZE))) comm_page;
48 };
49
50 extern struct cell linux_cell;
51
52 #endif /* !_JAILHOUSE_ASM_CELL_H */