1.. _kernel-parameters: 2 3ACRN Kernel Parameters 4###################### 5 6Generic Kernel Parameters 7************************* 8 9A number of kernel parameters control the behavior of ACRN-based systems. Some 10are applicable to the Service VM kernel, others to the User VM 11kernel, and some are applicable to both. 12 13This section focuses on generic parameters from the Linux kernel which are 14relevant for configuring or debugging ACRN-based systems. 15 16.. list-table:: 17 :header-rows: 1 18 :widths: 10,10,50,30 19 20 * - Parameter 21 - Used in Service VM or User VM 22 - Description 23 - Usage Example 24 25 * - ``module_blacklist`` 26 - Service VM 27 - A comma-separated list of modules that should not be loaded. 28 Useful to debug or work 29 around issues related to specific modules. 30 - :: 31 32 module_blacklist=dwc3_pci 33 34 * - ``no_timer_check`` 35 - Service VM, User VM 36 - Disables the code that tests for broken timer IRQ sources. 37 - :: 38 39 no_timer_check 40 41 * - ``console`` 42 - Service VM, User VM 43 - Output console device and options. 44 45 ``tty<n>`` 46 Use the virtual console device <n>. 47 48 ``ttyS<n>[,options]`` 49 Use the specified serial port and options. Default options are 50 ``9600n8`` meaning 9600 baud, no parity, 8 bits. Options are of the form *bbbbpnf*, 51 where: 52 53 | *bbbb* is baud rate, for example, 9600 54 | *p* is parity, one of ``n``, ``o``, or ``e`` (for none, odd, or even) 55 | *n* is number of bits (typically 8) 56 | *f* is flow control (``r`` for RTS, or left blank) 57 58 ``hvc<n>`` 59 Use the hypervisor console device <n>. (This is for both Xen and 60 PowerPC hypervisors.) 61 - :: 62 63 console=tty0 64 console=ttyS0 65 console=hvc0 66 67 * - ``loglevel`` 68 - Service VM 69 - All kernel messages with a loglevel less than the console loglevel will 70 be printed to the console. The loglevel can also be changed with 71 ``klogd`` or other programs. The loglevels are defined as follows: 72 73 .. list-table:: 74 :header-rows: 1 75 76 * - Loglevel Value 77 - Definition 78 * - 0 (KERN_EMERG) 79 - System is unusable 80 * - 1 (KERN_ALERT) 81 - Action must be taken immediately 82 * - 2 (KERN_CRIT) 83 - Critical conditions 84 * - 3 (KERN_ERR) 85 - Error conditions 86 * - 4 (KERN_WARNING) 87 - Warning conditions 88 * - 5 (KERN_NOTICE) 89 - Normal but significant condition 90 * - 6 (KERN_INFO) 91 - Informational 92 * - 7 (KERN_DEBUG) 93 - Debug-level messages 94 - :: 95 96 loglevel=7 97 98 * - ``ignore_loglevel`` 99 - User VM 100 - Ignoring loglevel setting will print **all** 101 kernel messages to the console. Useful for debugging. 102 We also add it as the ``printk`` module parameter, so users 103 can change it dynamically, usually by changing 104 ``/sys/module/printk/parameters/ignore_loglevel``. 105 - :: 106 107 ignore_loglevel 108 109 110 * - ``log_buf_len`` 111 - User VM 112 - Sets the size of the ``printk`` ring buffer, 113 in bytes. n must be a power of two and greater 114 than the minimal size. The minimal size is defined 115 by the ``LOG_BUF_SHIFT`` kernel config parameter. There is 116 also the ``CONFIG_LOG_CPU_MAX_BUF_SHIFT`` config parameter 117 that allows to increase the default size depending on 118 the number of CPUs. See ``init/Kconfig`` for more details. 119 - :: 120 121 log_buf_len=16M 122 123 * - ``consoleblank`` 124 - Service VM, User VM 125 - The console blank (screen saver) timeout in 126 seconds. Defaults to 600 (10 minutes). A value of 0 127 disables the blank timer. 128 - :: 129 130 consoleblank=0 131 132 * - ``rootwait`` 133 - Service VM, User VM 134 - Wait (indefinitely) for root device to show up. 135 Useful for devices that are detected asynchronously 136 (e.g., USB and MMC devices). 137 - :: 138 139 rootwait 140 141 * - ``root`` 142 - Service VM, User VM 143 - Define the root filesystem. 144 145 ``/dev/<disk_name><decimal>`` 146 represents the device number of the partition - device 147 number of disk plus the partition number. 148 149 ``/dev/<disk_name>p<decimal>`` 150 same as above, this form is used when the disk name of 151 the partitioned disk ends with a digit. To separate the 152 disk name and partition slot, a ``p`` is inserted. 153 154 ``PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF`` 155 represents the unique ID of a partition if the 156 partition table provides it. The UUID may be either 157 an EFI/GPT UUID, or refer to an MSDOS 158 partition using the format SSSSSSSS-PP, where SSSSSSSS is a 159 zero-filled hexadecimal representation of the 32-bit 160 NT disk signature, and PP is a zero-filled hexadecimal 161 representation of the 1-based partition number. 162 - :: 163 164 root=/dev/mmcblk0p1 165 root=/dev/vda2 166 root=PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF 167 168 * - ``rw`` 169 - Service VM, User VM 170 - Mount the root device read/write on boot. 171 - :: 172 173 rw 174 175 * - ``tsc`` 176 - User VM 177 - Disable clocksource stability checks for TSC. 178 179 Format: <string>, where the only supported value is: 180 181 ``reliable``: 182 Mark TSC clocksource as reliable, and disable clocksource 183 verification at runtime, and the stability checks done at boot. 184 Used to enable high-resolution timer mode on older hardware, and in 185 virtualized environments. 186 - :: 187 188 tsc=reliable 189 190 * - ``cma`` 191 - Service VM 192 - Sets the size of the kernel global memory area for 193 contiguous memory allocations, and optionally the 194 placement constraint by the physical address range of 195 memory allocations. A value of 0 disables CMA 196 altogether. For more information, see 197 ``include/linux/dma-contiguous``. 198 - :: 199 200 cma=64M@0 201 202 * - ``hvlog`` 203 - Service VM 204 - Sets the guest physical address and size of the dedicated hypervisor 205 log ring buffer between the hypervisor and Service VM. 206 A ``memmap`` parameter is also required to reserve the specified memory 207 from the guest VM. 208 209 If hypervisor relocation is enabled, reserve the memory below 256MB, 210 since the hypervisor could be relocated anywhere between 256MB and 4GB. 211 212 Enable address space layout randomization (ASLR) on the Service VM. 213 This ensures that when the guest Linux is relocating the kernel image, 214 it will avoid this buffer address. 215 216 - :: 217 218 hvlog=2M@0xe00000 219 220 * - ``memmap`` 221 - Service VM 222 - Mark specific memory as reserved. 223 224 ``memmap=nn[KMG]$ss[KMG]`` 225 Region of memory to be reserved is from ``ss`` to ``ss+nn``, 226 using ``K``, ``M``, and ``G`` representing kilobytes, megabytes, and 227 gigabytes, respectively. 228 - :: 229 230 memmap=0x400000$0xa00000 231 232 * - ``ramoops.mem_address`` 233 ``ramoops.mem_size`` 234 ``ramoops.console_size`` 235 - Service VM 236 - Ramoops is an oops/panic logger that writes its logs to RAM 237 before the system crashes. Ramoops uses a predefined memory area 238 to store the dump. See `Linux Kernel Ramoops oops/panic logger 239 <https://www.kernel.org/doc/html/v4.19/admin-guide/ramoops.html#ramoops-oops-panic-logger>`_ 240 for details. 241 242 This buffer should not overlap with hypervisor reserved memory and 243 guest kernel image. See ``hvlog``. 244 - :: 245 246 ramoops.mem_address=0xa00000 247 ramoops.mem_size=0x400000 248 ramoops.console_size=0x200000 249 250 251 * - ``reboot_panic`` 252 - Service VM 253 - Reboot in case of panic. 254 255 The comma-delimited parameters are: 256 257 reboot_mode: 258 ``w`` (warm), ``s`` (soft), ``c`` (cold), or ``g`` (GPIO) 259 260 reboot_type: 261 ``b`` (BIOS), ``a`` (ACPI), ``k`` (kbd), ``t`` (triple), ``e`` (EFI), 262 or ``p`` (PCI) 263 264 reboot_cpu: 265 ``s###`` (SMP, and processor number to be used for rebooting) 266 267 reboot_force: 268 ``f`` (force), or not specified. 269 - :: 270 271 reboot_panic=p,w 272 273 * - ``maxcpus`` 274 - User VM 275 - Maximum number of processors that an SMP kernel 276 will bring up during boot. 277 278 ``maxcpus=n`` where n >= 0 limits 279 the kernel to bring up ``n`` processors during system boot. 280 Giving n=0 is a special case, equivalent to ``nosmp``, which 281 also disables the I/O APIC. 282 283 After booting, you can bring up additional plugged CPUs by executing 284 285 ``echo 1 > /sys/devices/system/cpu/cpuX/online`` 286 - :: 287 288 maxcpus=1 289 290 * - ``nohpet`` 291 - User VM 292 - Don't use the HPET timer. 293 - :: 294 295 nohpet 296 297 * - ``intel_iommu`` 298 - User VM 299 - Intel IOMMU driver (DMAR) option 300 301 ``on``: 302 Enable Intel IOMMU driver. 303 304 ``off``: 305 Disable Intel IOMMU driver. 306 307 ``igfx_off``: 308 By default, gfx is mapped as a normal device. If a gfx 309 device has a dedicated DMAR unit, the DMAR unit is 310 bypassed by not enabling DMAR with this option. In 311 this case, the gfx device will use the physical address for DMA. 312 - :: 313 314 intel_iommu=off 315 316 * - ``hugepages`` 317 ``hugepagesz`` 318 - Service VM, User VM 319 - ``hugepages``: 320 HugeTLB pages to allocate at boot. 321 322 ``hugepagesz``: 323 The size of the HugeTLB pages. On x86-64 and PowerPC, 324 this option can be specified multiple times interleaved 325 with ``hugepages`` to reserve huge pages of different sizes. 326 Valid page sizes on x86-64 are 2M (when the CPU supports Page Size Extension (PSE)) 327 and 1G (when the CPU supports the ``pdpe1gb`` cpuinfo flag). 328 - :: 329 330 hugepages=10 331 hugepagesz=1G 332 333 * - ``i915.modeset`` 334 - Service VM 335 - GPU driver loading option. 336 337 ``0``: 338 Disable the GPU driver loading for Intel GPU device. 339 340 ``1``: 341 Enable the GPU driver loading for Intel GPU device. 342 - :: 343 344 i915.modeset=0 345 346.. note:: The ``hugepages`` and ``hugepagesz`` parameters are automatically 347 taken care of by the ACRN Configurator tool. If users have customized 348 hugepage settings to satisfy their particular workloads in the Service VM, 349 the ``hugepages`` and ``hugepagesz`` parameters can be redefined in the GRUB 350 menu to override the settings from the ACRN Configurator tool. 351