From c9cf3294ea83ab15cd3790ea71f1702e7bf85922 Mon Sep 17 00:00:00 2001 From: Muminul Islam Date: Tue, 24 Feb 2026 15:10:59 -0800 Subject: [PATCH] vmm: remove duplicate vm config parameter Vm::create_device_manager accepted both config and _vm_config, but both represented the same VM configuration source. Remove _vm_config from the function signature and from its call site, and use config for the TDX dynamic check. This is a cleanup-only refactor with no intended functional change. Signed-off-by: Muminul Islam --- vmm/src/vm.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vmm/src/vm.rs b/vmm/src/vm.rs index 9c37457c1..3f793cd80 100644 --- a/vmm/src/vm.rs +++ b/vmm/src/vm.rs @@ -612,7 +612,6 @@ impl Vm { #[cfg(not(target_arch = "riscv64"))] timestamp, snapshot, - &config, )?; // Perform hypervisor-specific initialization @@ -798,10 +797,9 @@ impl Vm { boot_id_list: BTreeSet, #[cfg(not(target_arch = "riscv64"))] timestamp: Instant, snapshot: Option<&Snapshot>, - _vm_config: &Arc>, ) -> Result>> { #[cfg(feature = "tdx")] - let dynamic = !_vm_config.lock().unwrap().is_tdx_enabled(); + let dynamic = !config.lock().unwrap().is_tdx_enabled(); #[cfg(not(feature = "tdx"))] let dynamic = true;