2 * Jailhouse, a Linux-based partitioning hypervisor
4 * Copyright (c) Siemens AG, 2013
5 * Copyright (c) Valentine Sinitsyn, 2014
8 * Jan Kiszka <jan.kiszka@siemens.com>
9 * Valentine Sinitsyn <valentine.sinitsyn@gmail.com>
11 * This work is licensed under the terms of the GNU GPL, version 2. See
12 * the COPYING file in the top-level directory.
15 #ifndef _JAILHOUSE_ASM_CELL_H
16 #define _JAILHOUSE_ASM_CELL_H
18 #include <jailhouse/paging.h>
20 #include <jailhouse/cell-config.h>
21 #include <jailhouse/hypercall.h>
25 /** Cell-related states. */
26 /* TODO: factor out arch-independent bits, define struct arch_cell */
30 /** PIO access bitmap. */
32 /** Paging structures used for cell CPUs. */
33 struct paging_structures ept_structs;
34 } vmx; /**< Intel VMX-specific fields. */
39 /** Paging structures used for DMA requests. */
40 struct paging_structures pg_structs;
41 /** True if interrupt remapping support is emulated for this
44 } vtd; /**< Intel VT-d specific fields. */
47 /** ID of the cell. */
49 /** Number of pages used for storing cell-specific states and
50 * configuration data. */
51 unsigned int data_pages;
52 /** Pointer to static cell description. */
53 struct jailhouse_cell_desc *config;
55 /** Pointer to cell's CPU set. */
56 struct cpu_set *cpu_set;
57 /** Stores the cell's CPU set if small enough. */
58 struct cpu_set small_cpu_set;
60 /** True while the cell can be loaded by the root cell. */
63 /** Pointer to next cell in the system. */
66 /** List of PCI devices assigned to this cell. */
67 struct pci_device *pci_devices;
68 /** List of PCI devices assigned to this cell that support MSI-X. */
69 struct pci_device *msix_device_list;
70 /** Shadow value of PCI config space address port register. */
71 u32 pci_addr_port_val;
73 /** Shadow value of IOAPIC index register. */
74 u32 ioapic_index_reg_val;
75 /** IOAPIC ID as used for interrupt remapping. */
77 /** IOMMU unit responsible for the IOAPIC. */
79 /** Bitmap of IOAPIC pins assigned to this cell. */
80 u64 ioapic_pin_bitmap;
83 /** Communication region. */
84 struct jailhouse_comm_region comm_region;
85 /** Padding to full page size. */
86 u8 padding[PAGE_SIZE];
87 } __attribute__((aligned(PAGE_SIZE))) comm_page;
88 /**< Page containing the communication region (shared with cell). */
91 extern struct cell root_cell;
93 #endif /* !_JAILHOUSE_ASM_CELL_H */