Skip to content

Commit b2e550b

Browse files
mtjhrcslp
authored andcommitted
Only enable tsi_hijack when a vsock device is attached
Signed-off-by: Matej Hrica <[email protected]>
1 parent a93355e commit b2e550b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/vmm/src/builder.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,7 @@ pub fn build_microvm(
584584
attach_block_devices(&mut vmm, &vm_resources.block, event_manager, intc.clone())?;
585585
if let Some(vsock) = vm_resources.vsock.get() {
586586
attach_unixsock_vsock_device(&mut vmm, vsock, event_manager, intc)?;
587+
vmm.kernel_cmdline.insert_str("tsi_hijack")?;
587588
}
588589

589590
if let Some(s) = &vm_resources.boot_config.kernel_cmdline_epilog {

src/vmm/src/vmm_config/boot_source.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ use std::fmt::{Display, Formatter, Result};
1818

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

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

3030
//pub const DEFAULT_KERNEL_CMDLINE: &str = "reboot=k panic=1 pci=off nomodules earlyprintk=ttyS0 \
3131
// console=ttyS0";

0 commit comments

Comments
 (0)