]> rtime.felk.cvut.cz Git - jailhouse.git/blob - hypervisor/arch/x86/include/asm/cell.h
x86: Emulate interrupt remapping support to enable x2APIC usage
[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 struct pci_device;
22
23 /**
24  * struct cell - cell-related state information
25  * ...
26  * @pci_addr_port_val: virtual address port for PCI config space
27  * ...
28  */
29 /* TODO: factor out arch-independent bits, define struct arch_cell */
30 struct cell {
31         struct {
32                 /* should be first as it requires page alignment */
33                 u8 __attribute__((aligned(PAGE_SIZE))) io_bitmap[2*PAGE_SIZE];
34                 struct paging_structures ept_structs;
35         } vmx;
36
37         struct {
38                 struct paging_structures pg_structs;
39                 bool ir_emulation;
40         } vtd;
41
42         unsigned int id;
43         unsigned int data_pages;
44         struct jailhouse_cell_desc *config;
45
46         struct cpu_set *cpu_set;
47         struct cpu_set small_cpu_set;
48
49         bool loadable;
50
51         struct cell *next;
52
53         struct pci_device *pci_devices;
54         struct pci_device *msix_device_list;
55         u32 pci_addr_port_val;
56
57         u32 ioapic_index_reg_val;
58         u16 ioapic_id;
59         u8 ioapic_iommu;
60         u64 ioapic_pin_bitmap;
61
62         union {
63                 struct jailhouse_comm_region comm_region;
64                 u8 padding[PAGE_SIZE];
65         } __attribute__((aligned(PAGE_SIZE))) comm_page;
66 };
67
68 extern struct cell root_cell;
69
70 #endif /* !_JAILHOUSE_ASM_CELL_H */