From ef6e55a6cd8a9843867bdc6b20543fb290c6370d Mon Sep 17 00:00:00 2001 From: tommady Date: Fri, 22 Nov 2024 03:35:40 +0000 Subject: [PATCH] refactor(builder): address comments remove the aarch64 suffix from the attach_legacy_devices_aarch64 function and ensure that aarch64 smt is always set to false int the configure_system_for_boot function Signed-off-by: tommady --- src/vmm/src/builder.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vmm/src/builder.rs b/src/vmm/src/builder.rs index d0ea317df6a..51baf54b5b2 100644 --- a/src/vmm/src/builder.rs +++ b/src/vmm/src/builder.rs @@ -152,7 +152,7 @@ impl std::convert::From for StartMicrovmError { pub mod aarch64 { use super::*; - fn attach_legacy_devices_aarch64( + fn attach_legacy_devices( event_manager: &mut EventManager, vmm: &mut Vmm, cmdline: &mut LoaderKernelCmdline, @@ -222,7 +222,8 @@ pub mod aarch64 { let vcpu_config = VcpuConfig { vcpu_count: vm_config.vcpu_count, - smt: vm_config.smt, + // smt does not exist on aarch64 + smt: false, cpu_config, }; @@ -642,8 +643,7 @@ pub fn build_microvm_for_boot( } #[cfg(target_arch = "aarch64")] - aarch::attach_legacy_devices_aarch64(event_manager, &mut vmm, &mut boot_cmdline) - .map_err(Internal)?; + aarch::attach_legacy_devices(event_manager, &mut vmm, &mut boot_cmdline).map_err(Internal)?; attach_vmgenid_device(&mut vmm)?;