/
Kconfig
336 lines (287 loc) · 9.07 KB
/
Kconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
choice
prompt "Platform"
default PLATFORM_SBL
help
The BIOS used on the target board.
config PLATFORM_UEFI
bool "UEFI"
select EFI_STUB
help
Select this if the target board uses UEFI.
config PLATFORM_SBL
bool "SBL"
help
Select this if the target board uses Slim Bootloader.
endchoice
choice
prompt "Hypervisor mode"
default SHARING_MODE
help
Select the usage mode of the hypervisor.
config SHARING_MODE
bool "Sharing mode"
help
In sharing mode, the first VM (called Service OS or SOS) is capable of
managing the other VMs (called User OS or UOS) and trap/mediate their
I/O accesses to physical devices.
config PARTITION_MODE
bool "Partition mode"
depends on PLATFORM_SBL
help
In partition mode, every VM owns part of the physical resources
exclusively and runs with minimal interference from the others. The VM
configurations are statically defined in the source.
endchoice
config PLATFORM
string
default "uefi" if PLATFORM_UEFI
default "sbl" if PLATFORM_SBL
config BOARD
string "Target board"
help
The target board this build runs on top of.
config DEFCONFIG_LIST
string
option defconfig_list
default "arch/x86/configs/$BOARD.config"
config RELEASE
bool "Release build"
default n
help
Whether to build a release version of the hypervisor. Logs, serial
console and hypervisor shell are available only in non-release
(i.e. debug) builds. Assertions are not effective in release builds.
config MAX_VM_NUM
int "Maximum number of VM"
range 1 8
default 4
help
The maximum number of virtual machines (VMs) the hypervisor can
support. This is customizable per the use cases of the build. For
general-purpose builds the maximum of physical cores can be used.
config MAX_VCPUS_PER_VM
int "Maximum number of VCPUS per VM"
range 1 8
default 4 if PLATFORM_SBL
default 8 if PLATFORM_UEFI
help
The maximum number of virtual CPUs the hypervisor can support in a
single VM.
config MAX_PCPU_NUM
int "Maximum number of PCPU"
range 1 8
default 8
config MAX_EMULATED_MMIO_REGIONS
int "Maximum number of emulated mmio regions"
range 0 128
default 16
config MAX_IOMMU_NUM
int "Maximum number of IOMMU devices"
range 1 2
default 2
help
The maximum number of physical IOMMUs the hypervisor can support.
config STACK_SIZE
hex "Capacity of one stack, in byte"
default 0x2000
help
The size of stacks used by physical cores. Each core uses one stack
for normal operations and another three for specific exceptions.
config LOG_BUF_SIZE
hex "Capacity of logbuf for each physical cpu"
default 0x40000
config LOG_DESTINATION
int "Bitmap of consoles where logs are printed"
range 0 7
default 7
help
A bitmap indicating the destinations of log messages. Currently there
are 3 destinations available. Bit 0 represents the serial console, bit
1 the SOS ACRN log and bit 2 NPK log. Effective only in debug builds.
config CPU_UP_TIMEOUT
int "Timeout in ms when bringing up secondary CPUs"
range 100 200
default 100
help
A 32-bit integer specifying the timeout in millisecond when waiting
for secondary CPUs to start up.
choice
prompt "serial IO type"
depends on !RELEASE
default SERIAL_MMIO if PLATFORM_SBL
default SERIAL_PIO if PLATFORM_UEFI
help
Whether the physical serial port shall be accessed via memory-mapped
registers or I/O ports.
config SERIAL_MMIO
bool "MMIO"
help
Select this if the serial port shall be accessed via memory-mapped
registers.
config SERIAL_PIO
bool "PIO"
help
Select this if the serial port shall be accessed via in/out
instructions.
endchoice
config SERIAL_MMIO_BASE
hex "Base address of serial MMIO region"
depends on SERIAL_MMIO
default 0xfc000000
help
A 64-bit integer indicating the base physical address of the
memory-mapped UART registers.
config SERIAL_PIO_BASE
hex "Base address of serial PIO region"
depends on SERIAL_PIO
default 0x3f8
help
The base address of the UART ports. This is logically 16-bit but used
as a 64-bit integer.
config MALLOC_ALIGN
int "Block size in the heap for malloc()"
range 8 32
default 16
config HEAP_SIZE
hex "Capacity of the heap for malloc()"
default 0x100000
config CONSOLE_LOGLEVEL_DEFAULT
int "Default loglevel on the serial console"
depends on !RELEASE
range 0 6
default 3
help
This indicates the maximum debug level of logs that will be available
on the the serial console. The higher the number, the more logs will
be available.
config MEM_LOGLEVEL_DEFAULT
int "Default loglevel in memory"
depends on !RELEASE
range 0 6
default 5
help
This indicates the maximum debug level of logs that will be available
in the logbuf in memory which can be accessed by ACRN log in SOS. The
higher the number, the more logs will be available.
config NPK_LOGLEVEL_DEFAULT
int "Default loglevel for the hypervisor NPK log"
depends on !RELEASE
range 0 6
default 5
help
This indicates the maximum debug level of logs that will be available
via NPK log. The higher the number, the more logs will be available.
config LOW_RAM_SIZE
hex "Size of the low RAM region"
default 0x00010000
help
A 32-bit integer indicating the size of RAM region below address
0x10000, starting from address 0x0.
config HV_RAM_START
hex "Start physical address of the RAM region used by the hypervisor"
default 0x6e000000 if PLATFORM_SBL
default 0x00100000 if PLATFORM_UEFI
help
A 64-bit integer indicating the base physical address to where the hypervisor
should be loaded to. If RELOC is disabled the bootloader is required
to load the hypervisor to this specific address. Otherwise the
hypervisor will not boot. With RELOC enabled the hypervisor is capable
of relocating its symbols to where it is placed at, and thus the
bootloader may not place the hypervisor at this specific address.
config HV_RAM_SIZE
hex "Size of the RAM region used by the hypervisor"
default 0x04800000 if PLATFORM_SBL
default 0x08000000 if PLATFORM_UEFI
help
A 64-bit integer indicating the size of RAM used by the hypervisor.
It is ensured at link time that the footprint of the hypervisor
does not exceed this size.
config PLATFORM_RAM_SIZE
hex "Size of the physical platform RAM"
default 0x200000000 if PLATFORM_SBL
default 0x400000000 if PLATFORM_UEFI
help
A 64-bit integer indicating the size of the physical platform RAM
(not included the MMIO).
config SOS_RAM_SIZE
hex "Size of the vm0 RAM"
default 0x200000000 if PLATFORM_SBL
default 0x400000000 if PLATFORM_UEFI
help
A 64-bit integer indicating the size of the vm0 RAM (not included the MMIO).
config UOS_RAM_SIZE
hex "Size of the UOS RAM"
default 0x100000000 if PLATFORM_SBL
default 0x200000000 if PLATFORM_UEFI
help
A 64-bit integer indicating the size of the user OS RAM (not included the MMIO).
Now we assume each UOS uses same amount of RAM size.
config CONSTANT_ACPI
bool "The platform ACPI info is constant"
default n
help
Whether constant ACPI tables shall be used. If selected, the built-in
ACPI tables, usually generated on target platforms by an offline tool,
will be used. If not a fixup subroutine will be invoked to update the
built-in tables after parsing the real ACPI tables at runtime.
config DMAR_PARSE_ENABLED
bool
default n if PLATFORM_SBL
default y if PLATFORM_UEFI
help
Whether to parse the ACPI DMA Remapping tables at runtime.
config GPU_SBDF
hex
depends on DMAR_PARSE_ENABLED
default 0x00000010
help
A 32-bit integer encoding the segment, bus, device and function of the
GPU. This integer consists of a 16-bit segment ID, 8-bit bus ID, 5-bit
device ID and 3-bit function ID. As an example, for PCI device at
00:02.0 in DRHD segment 0, this SBDF would be (0 << 16) | (0 << 8) |
(2 << 3) | (0 << 0), i.e. 0x00000010.
config EFI_STUB
bool
depends on PLATFORM_UEFI
default y
config UEFI_OS_LOADER_NAME
string "UEFI OS loader name"
depends on PLATFORM_UEFI
default "\\EFI\\org.clearlinux\\bootloaderx64.efi"
config MTRR_ENABLED
bool
default y
config RELOC
bool "Enable relocation"
default n
help
When selected, the hypervisor will relocate itself to where it is
loaded. This allows the bootloader to put the hypervisor image to
wherever appropriate. Without relocation the bootloader must put the
image to RAM_START, otherwise the hypervisor will not start up.
config IOMMU_BUS_NUM
hex "Limit of PCI bus on IOMMU initialization"
default 0x10 if PLATFORM_SBL
default 0x100 if PLATFORM_UEFI
help
Any BDF with a bus ID smaller than this number is mapped to
the IOMMU domain of the first VM.
config MAX_PCI_DEV_NUM
int "Maximum number of PCI dev"
range 1 1024
default 96
config MAX_MSIX_TABLE_NUM
int "Maximum number of MSI-X Table per device"
range 1 2048
default 16
config ENFORCE_VALIDATED_ACPI_INFO
bool "Enforce validated ACPI info table"
default n
help
When set, validated ACPI info tables is enforced and using offline
tools to generate such data is required. Otherwise a warning will be
printed when validated ACPI info is unavailable, but a binary can
still be built with the ACPI info template.
config L1D_FLUSH_VMENTRY_ENABLED
bool "Enable L1 cache flush before VM entry"
default n