2 * Jailhouse, a Linux-based partitioning hypervisor
4 * Test configuration for QEMU Q35 VM, 1 GB RAM, 64 MB hypervisor (-192K ACPI)
6 * qemu-system-x86_64 -machine q35 -m 1G -enable-kvm -smp 4 \
7 * -drive file=/path/to/image,id=disk,if=none -device ide-hd,drive=disk \
8 * -virtfs local,path=/local/path,security_model=passthrough,mount_tag=host \
9 * -cpu kvm64,-kvm_pv_eoi,-kvm_steal_time,-kvm_asyncpf,-kvmclock,+vmx,+x2apic
11 * Copyright (c) Siemens AG, 2013
14 * Jan Kiszka <jan.kiszka@siemens.com>
16 * This work is licensed under the terms of the GNU GPL, version 2. See
17 * the COPYING file in the top-level directory.
20 #include <linux/types.h>
21 #include <jailhouse/cell-config.h>
23 #define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])
26 struct jailhouse_system header;
28 struct jailhouse_memory mem_regions[5];
29 struct jailhouse_irqchip irqchips[1];
30 __u8 pio_bitmap[0x2000];
31 struct jailhouse_pci_device pci_devices[6];
32 struct jailhouse_pci_capability pci_caps[3];
33 } __attribute__((packed)) config = {
35 .hypervisor_memory = {
36 .phys_start = 0x3c000000,
37 .size = 0x4000000 - 0x30000,
39 .platform_info.x86 = {
40 .mmconfig_base = 0xb0000000,
41 .mmconfig_end_bus = 0xff,
42 .pm_timer_address = 0x608,
45 .name = "QEMU Linux VM",
47 .cpu_set_size = sizeof(config.cpus),
48 .num_memory_regions = ARRAY_SIZE(config.mem_regions),
49 .num_irqchips = ARRAY_SIZE(config.irqchips),
50 .pio_bitmap_size = ARRAY_SIZE(config.pio_bitmap),
51 .num_pci_devices = ARRAY_SIZE(config.pci_devices),
52 .num_pci_caps = ARRAY_SIZE(config.pci_caps),
65 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE |
66 JAILHOUSE_MEM_EXECUTE | JAILHOUSE_MEM_DMA,
69 .phys_start = 0x3ffdf000,
70 .virt_start = 0x3ffdf000,
72 .flags = JAILHOUSE_MEM_READ,
75 .phys_start = 0xc0000000,
76 .virt_start = 0xc0000000,
78 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
80 /* not safe until we catch MSIs via interrupt remapping */
82 .phys_start = 0xfed00000,
83 .virt_start = 0xfed00000,
85 .flags = JAILHOUSE_MEM_READ | JAILHOUSE_MEM_WRITE,
91 .address = 0xfec00000,
92 .pin_bitmap = 0xffffff,
97 [ 0/8 ... 0x3f/8] = -1,
98 [ 0x40/8 ... 0x47/8] = 0xf0, /* PIT */
99 [ 0x48/8 ... 0x5f/8] = -1,
100 [ 0x60/8 ... 0x67/8] = 0xec, /* HACK: 8042, PC speaker - and more */
101 [ 0x68/8 ... 0x6f/8] = -1,
102 [ 0x70/8 ... 0x77/8] = 0xfc, /* rtc */
103 [ 0x78/8 ... 0x7f/8] = -1,
104 [ 0x80/8 ... 0x87/8] = 0xfe, /* port 80 (delays) */
105 [ 0x88/8 ... 0x2f7/8] = -1,
106 [ 0x2f8/8 ... 0x2ff/8] = 0, /* serial2 */
107 [ 0x300/8 ... 0x3af/8] = -1,
108 [ 0x3b0/8 ... 0x3df/8] = 0, /* VGA */
109 [ 0x3e0/8 ... 0x5657/8] = -1,
110 [0x5658/8 ... 0x565f/8] = 0xf0, /* vmport */
111 [0x5660/8 ... 0xbfff/8] = -1,
112 [0xc000/8 ... 0xc0ff/8] = 0, /* PCI devices */
113 [0xc100/8 ... 0xffff/8] = -1,
118 .type = JAILHOUSE_PCI_TYPE_DEVICE,
123 .type = JAILHOUSE_PCI_TYPE_DEVICE,
127 { /* virtio-9p-pci */
128 .type = JAILHOUSE_PCI_TYPE_DEVICE,
135 .type = JAILHOUSE_PCI_TYPE_DEVICE,
140 .type = JAILHOUSE_PCI_TYPE_DEVICE,
145 .num_msi_vectors = 1,
149 .type = JAILHOUSE_PCI_TYPE_DEVICE,
156 { /* virtio-9p-pci */
160 .flags = JAILHOUSE_PCICAPS_WRITE,
172 .flags = JAILHOUSE_PCICAPS_WRITE,