2 * Jailhouse, a Linux-based partitioning hypervisor
4 * Minimal configuration for PCI demo inmate:
5 * 1 CPU, 1 MB RAM, 1 serial port, 1 Intel HDA PCI device
7 * Copyright (c) Siemens AG, 2014
10 * Jan Kiszka <jan.kiszka@siemens.com>
12 * This work is licensed under the terms of the GNU GPL, version 2. See
13 * the COPYING file in the top-level directory.
16 #include <linux/types.h>
17 #include <jailhouse/cell-config.h>
19 #define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])
22 struct jailhouse_cell_desc cell;
24 struct jailhouse_memory mem_regions[3];
25 __u8 pio_bitmap[0x2000];
26 struct jailhouse_pci_device pci_devices[1];
27 struct jailhouse_pci_capability pci_caps[1];
28 } __attribute__((packed)) config = {
31 .flags = JAILHOUSE_CELL_PASSIVE_COMMREG,
33 .cpu_set_size = sizeof(config.cpus),
34 .num_memory_regions = ARRAY_SIZE(config.mem_regions),
36 .pio_bitmap_size = ARRAY_SIZE(config.pio_bitmap),
37 .num_pci_devices = ARRAY_SIZE(config.pci_devices),
38 .num_pci_caps = ARRAY_SIZE(config.pci_caps),
47 .phys_start = 0x3f100000,
50 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
51 JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA |
52 JAILHOUSE_MEM_LOADABLE,
54 /* communication region */ {
55 .virt_start = 0x00100000,
57 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
58 JAILHOUSE_MEM_COMM_REGION,
61 .phys_start = 0xfebc0000,
62 .virt_start = 0xfebc0000,
64 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
69 [ 0/8 ... 0x2f7/8] = -1,
70 [ 0x2f8/8 ... 0x2ff/8] = 0, /* serial2 */
71 [ 0x300/8 ... 0xcfff/8] = -1,
72 [0xc000/8 ... 0xc03f/8] = 0, /* e1000 */
73 [0xc040/8 ... 0xdfff/8] = -1,
74 [0xe000/8 ... 0xe007/8] = 0, /* OXPCIe952 serial2 */
75 [0xe008/8 ... 0xffff/8] = -1,
79 { /* Intel e1000 @00:19.0 */
80 .type = JAILHOUSE_PCI_TYPE_DEVICE,
91 { /* Intel e1000 @00:19.0 */
95 .flags = JAILHOUSE_PCICAPS_WRITE,