mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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 <muislam@microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
6404d2d513
commit
c9cf3294ea
@@ -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<String>,
|
||||
#[cfg(not(target_arch = "riscv64"))] timestamp: Instant,
|
||||
snapshot: Option<&Snapshot>,
|
||||
_vm_config: &Arc<Mutex<VmConfig>>,
|
||||
) -> Result<Arc<Mutex<DeviceManager>>> {
|
||||
#[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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user