]> rtime.felk.cvut.cz Git - jailhouse.git/blob - hypervisor/arch/x86/include/asm/cell.h
core/configs/tools: Report IOMMU association of devices via config file
[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         } vtd;
40
41         unsigned int id;
42         unsigned int data_pages;
43         struct jailhouse_cell_desc *config;
44
45         struct cpu_set *cpu_set;
46         struct cpu_set small_cpu_set;
47
48         bool loadable;
49
50         struct cell *next;
51
52         struct pci_device *pci_devices;
53         struct pci_device *msix_device_list;
54         u32 pci_addr_port_val;
55
56         u32 ioapic_index_reg_val;
57         u16 ioapic_id;
58         u8 ioapic_iommu;
59         u64 ioapic_pin_bitmap;
60
61         union {
62                 struct jailhouse_comm_region comm_region;
63                 u8 padding[PAGE_SIZE];
64         } __attribute__((aligned(PAGE_SIZE))) comm_page;
65 };
66
67 extern struct cell root_cell;
68
69 #endif /* !_JAILHOUSE_ASM_CELL_H */