2 * Jailhouse, a Linux-based partitioning hypervisor
4 * Copyright (c) Siemens AG, 2013, 2014
7 * Henning Schild <henning.schild@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 #include <linux/types.h>
14 #include <jailhouse/cell-config.h>
16 #define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])
19 struct jailhouse_cell_desc cell;
21 struct jailhouse_memory mem_regions[3];
22 __u8 pio_bitmap[0x2000];
23 struct jailhouse_pci_device pci_devices[1];
24 struct jailhouse_pci_capability pci_caps[0];
25 } __attribute__((packed)) config = {
27 .name = "ivshmem-demo",
28 .flags = JAILHOUSE_CELL_PASSIVE_COMMREG,
30 .cpu_set_size = sizeof(config.cpus),
31 .num_memory_regions = ARRAY_SIZE(config.mem_regions),
33 .pio_bitmap_size = ARRAY_SIZE(config.pio_bitmap),
34 .num_pci_devices = ARRAY_SIZE(config.pci_devices),
35 .num_pci_caps = ARRAY_SIZE(config.pci_caps),
44 .phys_start = 0x3f000000,
47 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
48 JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_LOADABLE,
50 /* communication region */ {
51 .virt_start = 0x00100000,
53 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
54 JAILHOUSE_MEM_COMM_REGION,
56 /* IVSHMEM shared memory region */
58 .phys_start = 0x3f1ff000,
59 .virt_start = 0x3f1ff000,
61 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
62 JAILHOUSE_MEM_ROOTSHARED,
67 [ 0/8 ... 0x3f7/8] = -1,
68 [ 0x3f8/8 ... 0x3ff/8] = 0, /* serial1 */
69 [ 0x400/8 ... 0xffff/8] = -1,
74 .type = JAILHOUSE_PCI_TYPE_IVSHMEM,
78 0xffffff00, 0xffffffff, 0x00000000,
79 0x00000000, 0xffffffe0, 0xffffffff,
82 .num_msix_vectors = 1,