2 * Jailhouse, a Linux-based partitioning hypervisor
4 * Minimal configuration for ivshmem inmate demo:
5 * 1 CPU, 1MB RAM, serial ports, 4K shmem
7 * Copyright (c) Siemens AG, 2013, 2014
10 * Henning Schild <henning.schild@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 <jailhouse/types.h>
17 #include <jailhouse/cell-config.h>
20 struct jailhouse_cell_desc cell;
22 struct jailhouse_memory mem_regions[7];
23 struct jailhouse_pio pio_regions[1];
24 struct jailhouse_pci_device pci_devices[1];
25 struct jailhouse_pci_capability pci_caps[0];
26 } __attribute__((packed)) config = {
28 .signature = JAILHOUSE_CELL_DESC_SIGNATURE,
29 .revision = JAILHOUSE_CONFIG_REVISION,
30 .name = "ivshmem-demo",
31 .flags = JAILHOUSE_CELL_PASSIVE_COMMREG |
32 JAILHOUSE_CELL_VIRTUAL_CONSOLE_PERMITTED,
34 .cpu_set_size = sizeof(config.cpus),
35 .num_memory_regions = ARRAY_SIZE(config.mem_regions),
37 .num_pio_regions = ARRAY_SIZE(config.pio_regions),
38 .num_pci_devices = ARRAY_SIZE(config.pci_devices),
39 .num_pci_caps = ARRAY_SIZE(config.pci_caps),
42 .type = JAILHOUSE_CON_TYPE_8250,
43 .flags = JAILHOUSE_CON_ACCESS_PIO,
44 .address = 0x2f8,/* ######## ttyS0 is host -> ttyS1 */
53 /* IVSHMEM shared memory regions (demo) */
55 .phys_start = 0x271f0000,
56 .virt_start = 0x271f0000,
58 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_ROOTSHARED,
61 .phys_start = 0x271f1000,
62 .virt_start = 0x271f1000,
64 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
65 JAILHOUSE_MEM_ROOTSHARED,
68 .phys_start = 0x271fa000,
69 .virt_start = 0x271fa000,
71 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_ROOTSHARED,
74 .phys_start = 0x271fc000,
75 .virt_start = 0x271fc000,
77 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
78 JAILHOUSE_MEM_ROOTSHARED,
81 .phys_start = 0x271fe000,
82 .virt_start = 0x271fe000,
84 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_ROOTSHARED,
87 .phys_start = 0x27200000,/* to 0x27300000 */
90 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
91 JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_LOADABLE,
93 /* communication region */ {
94 .virt_start = 0x00100000,
96 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
97 JAILHOUSE_MEM_COMM_REGION,
102 PIO_RANGE(0x2f8, 8), /* serial 2 */
103 // PIO_RANGE(0x3f8, 8), /* serial 1 */
108 .type = JAILHOUSE_PCI_TYPE_IVSHMEM,
111 .bar_mask = JAILHOUSE_IVSHMEM_BAR_MASK_MSIX,
112 .num_msix_vectors = 16,
113 .shmem_regions_start = 0,
116 .shmem_protocol = JAILHOUSE_SHMEM_PROTO_UNDEFINED,