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 .signature = JAILHOUSE_CELL_DESC_SIGNATURE,
28 .name = "ivshmem-demo",
29 .flags = JAILHOUSE_CELL_PASSIVE_COMMREG,
31 .cpu_set_size = sizeof(config.cpus),
32 .num_memory_regions = ARRAY_SIZE(config.mem_regions),
34 .pio_bitmap_size = ARRAY_SIZE(config.pio_bitmap),
35 .num_pci_devices = ARRAY_SIZE(config.pci_devices),
36 .num_pci_caps = ARRAY_SIZE(config.pci_caps),
45 .phys_start = 0x3f000000,
48 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
49 JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_LOADABLE,
51 /* communication region */ {
52 .virt_start = 0x00100000,
54 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
55 JAILHOUSE_MEM_COMM_REGION,
57 /* IVSHMEM shared memory region */
59 .phys_start = 0x3f1ff000,
60 .virt_start = 0x3f1ff000,
62 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
63 JAILHOUSE_MEM_ROOTSHARED,
68 [ 0/8 ... 0x3f7/8] = -1,
69 [ 0x3f8/8 ... 0x3ff/8] = 0, /* serial1 */
70 [ 0x400/8 ... 0xffff/8] = -1,
75 .type = JAILHOUSE_PCI_TYPE_IVSHMEM,
79 0xffffff00, 0xffffffff, 0x00000000,
80 0x00000000, 0xffffffe0, 0xffffffff,
83 .num_msix_vectors = 1,