Skip to content

Commit a14705f

Browse files
dm0-slp
authored andcommitted
vmm: Fix the nomodule kernel parameter
The plural version of this has no effect, as can be checked by the value in /proc/sys/kernel/modules_disabled on modular kernels. The kernel configurations in libkrunfw don't set CONFIG_MODULES in the first place, so this change won't be noticeable for most people. Signed-off-by: David Michael <[email protected]>
1 parent 67e8ccd commit a14705f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/vmm/src/vmm_config/boot_source.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,35 @@ use std::fmt::{Display, Formatter, Result};
77
/// - `reboot=k` shut down the guest on reboot, instead of well... rebooting;
88
/// - `panic=1` on panic, reboot after 1 second;
99
/// - `pci=off` do not scan for PCI devices (save boot time);
10-
/// - `nomodules` disable loadable kernel module support;
10+
/// - `nomodule` disable loadable kernel module support;
1111
/// - `8250.nr_uarts=0` disable 8250 serial interface;
1212
/// - `i8042.noaux` do not probe the i8042 controller for an attached mouse (save boot time);
1313
/// - `i8042.nomux` do not probe i8042 for a multiplexing controller (save boot time);
1414
/// - `i8042.nopnp` do not use ACPIPnP to discover KBD/AUX controllers (save boot time);
1515
/// - `i8042.dumbkbd` do not attempt to control kbd state via the i8042 (save boot time).
16-
//pub const DEFAULT_KERNEL_CMDLINE: &str = "reboot=k panic=1 pci=off nomodules 8250.nr_uarts=0 \
16+
//pub const DEFAULT_KERNEL_CMDLINE: &str = "reboot=k panic=1 pci=off nomodule 8250.nr_uarts=0 \
1717
// i8042.noaux i8042.nomux i8042.nopnp i8042.dumbkbd";
1818

1919
#[cfg(all(target_os = "linux", not(feature = "tee")))]
20-
pub const DEFAULT_KERNEL_CMDLINE: &str = "reboot=k panic=-1 panic_print=0 nomodules console=hvc0 \
20+
pub const DEFAULT_KERNEL_CMDLINE: &str = "reboot=k panic=-1 panic_print=0 nomodule console=hvc0 \
2121
rootfstype=virtiofs rw quiet no-kvmapf";
2222

2323
#[cfg(feature = "amd-sev")]
24-
pub const DEFAULT_KERNEL_CMDLINE: &str = "reboot=k panic=-1 panic_print=0 nomodules console=hvc0 \
24+
pub const DEFAULT_KERNEL_CMDLINE: &str = "reboot=k panic=-1 panic_print=0 nomodule console=hvc0 \
2525
root=/dev/vda rw quiet no-kvmapf";
2626
#[cfg(target_os = "macos")]
27-
pub const DEFAULT_KERNEL_CMDLINE: &str = "reboot=k panic=-1 panic_print=0 nomodules console=hvc0 \
27+
pub const DEFAULT_KERNEL_CMDLINE: &str = "reboot=k panic=-1 panic_print=0 nomodule console=hvc0 \
2828
rootfstype=virtiofs rw quiet no-kvmapf";
2929

30-
//pub const DEFAULT_KERNEL_CMDLINE: &str = "reboot=k panic=1 pci=off nomodules earlyprintk=ttyS0 \
30+
//pub const DEFAULT_KERNEL_CMDLINE: &str = "reboot=k panic=1 pci=off nomodule earlyprintk=ttyS0 \
3131
// console=ttyS0";
3232

3333
/// Strongly typed data structure used to configure the boot source of the
3434
/// microvm.
3535
#[derive(Debug, Default, Eq, PartialEq)]
3636
pub struct BootSourceConfig {
3737
/// The boot arguments to pass to the kernel. If this field is uninitialized, the default
38-
/// kernel command line is used: `reboot=k panic=1 pci=off nomodules 8250.nr_uarts=0`.
38+
/// kernel command line is used: `reboot=k panic=1 pci=off nomodule 8250.nr_uarts=0`.
3939
pub kernel_cmdline_prolog: Option<String>,
4040
pub kernel_cmdline_epilog: Option<String>,
4141
}

0 commit comments

Comments
 (0)