2 * Jailhouse, a Linux-based partitioning hypervisor
4 * Copyright (c) Siemens AG, 2013
7 * Jan Kiszka <jan.kiszka@siemens.com>
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
13 #ifndef _JAILHOUSE_ASM_CELL_H
14 #define _JAILHOUSE_ASM_CELL_H
16 #include <jailhouse/paging.h>
18 #include <jailhouse/cell-config.h>
19 #include <jailhouse/hypercall.h>
23 /** Cell-related states. */
24 /* TODO: factor out arch-independent bits, define struct arch_cell */
27 /** PIO access bitmap. */
28 /* should be first as it requires page alignment */
29 u8 __attribute__((aligned(PAGE_SIZE))) io_bitmap[2*PAGE_SIZE];
30 /** Paging structures used for cell CPUs. */
31 struct paging_structures ept_structs;
32 } vmx; /**< Intel VMX-specific fields. */
35 /** Paging structures used for DMA requests. */
36 struct paging_structures pg_structs;
37 /** True if interrupt remapping support is emulated for this
40 } vtd; /**< Inte VT-d specific fields. */
42 /** ID of the cell. */
44 /** Number of pages used for storing cell-specific states and
45 * configuration data. */
46 unsigned int data_pages;
47 /** Pointer to static cell description. */
48 struct jailhouse_cell_desc *config;
50 /** Pointer to cell's CPU set. */
51 struct cpu_set *cpu_set;
52 /** Stores the cell's CPU set if small enough. */
53 struct cpu_set small_cpu_set;
55 /** True while the cell can be loaded by the root cell. */
58 /** Pointer to next cell in the system. */
61 /** List of PCI devices assigned to this cell. */
62 struct pci_device *pci_devices;
63 /** List of PCI devices assigned to this cell that support MSI-X. */
64 struct pci_device *msix_device_list;
65 /** Shadow value of PCI config space address port register. */
66 u32 pci_addr_port_val;
68 /** Shadow value of IOAPIC index register. */
69 u32 ioapic_index_reg_val;
70 /** IOAPIC ID as used for interrupt remapping. */
72 /** IOMMU unit responsible for the IOAPIC. */
74 /** Bitmap of IOAPIC pins assigned to this cell. */
75 u64 ioapic_pin_bitmap;
78 /** Communication region. */
79 struct jailhouse_comm_region comm_region;
80 /** Padding to full page size. */
81 u8 padding[PAGE_SIZE];
82 } __attribute__((aligned(PAGE_SIZE))) comm_page;
83 /**< Page containing the communication region (shared with cell). */
86 extern struct cell root_cell;
88 #endif /* !_JAILHOUSE_ASM_CELL_H */