2 * Jailhouse, a Linux-based partitioning hypervisor
4 * Minimal configuration for IOAPIC demo inmate:
5 * 1 CPU, 1 MB RAM, 1 serial port, 1 ACPI IRQ pin
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[2];
25 struct jailhouse_irqchip irqchips[1];
26 __u8 pio_bitmap[0x2000];
27 } __attribute__((packed)) config = {
29 .name = "ioapic-demo",
30 .flags = JAILHOUSE_CELL_PASSIVE_COMMREG,
32 .cpu_set_size = sizeof(config.cpus),
33 .num_memory_regions = ARRAY_SIZE(config.mem_regions),
34 .num_irqchips = ARRAY_SIZE(config.irqchips),
35 .pio_bitmap_size = ARRAY_SIZE(config.pio_bitmap),
45 .phys_start = 0x3be00000,
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,
61 .address = 0xfec00000,
62 .pin_bitmap = 0x000200, /* ACPI IRQ */
67 [ 0/8 ... 0x2f7/8] = -1,
68 [ 0x2f8/8 ... 0x2ff/8] = 0, /* serial2 */
69 [ 0x300/8 ... 0x5ff/8] = -1,
70 [ 0x600/8 ... 0x607/8] = 0xf0, /* acpi-evt */
71 [ 0x608/8 ... 0xdfff/8] = -1,
72 [0xe000/8 ... 0xe007/8] = 0, /* OXPCIe952 serial2 */
73 [0xe008/8 ... 0xffff/8] = -1,