From 231b9dfd9d71c962418f77182b2e42c3af0f39c5 Mon Sep 17 00:00:00 2001 From: briwan01 Date: Wed, 8 Nov 2023 05:28:19 +0000 Subject: [PATCH] runtime-rs/clh: Fix unable to boot container In the case of Cloud Hypervisor running on arm64 architecture, only arm AMBA UART (pl011) is supported as the TTY. Consequently, when enabling Hypervisor debug mode, it's essential to configure the console as "ttyAMA0" rather than "ttyS0 Fixes: #8381 Signed-off-by: briwan01 --- .../crates/hypervisor/src/ch/inner_hypervisor.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/runtime-rs/crates/hypervisor/src/ch/inner_hypervisor.rs b/src/runtime-rs/crates/hypervisor/src/ch/inner_hypervisor.rs index 0eca4cd2ec..e10a557e06 100644 --- a/src/runtime-rs/crates/hypervisor/src/ch/inner_hypervisor.rs +++ b/src/runtime-rs/crates/hypervisor/src/ch/inner_hypervisor.rs @@ -140,13 +140,19 @@ impl CloudHypervisorInner { // Start by adding the default set of kernel parameters. let mut params = KernelParams::new(enable_debug); + #[cfg(target_arch = "x86_64")] + let console_param_debug = KernelParams::from_string("console=ttyS0,115200n8"); + + #[cfg(target_arch = "aarch64")] + let console_param_debug = KernelParams::from_string("console=ttyAMA0,115200n8"); + let mut rootfs_param = KernelParams::new_rootfs_kernel_params(rootfs_driver, rootfs_type)?; let mut console_params = if enable_debug { if confidential_guest { KernelParams::from_string("console=hvc0") } else { - KernelParams::from_string("console=ttyS0,115200n8") + console_param_debug } } else { KernelParams::from_string("quiet")