mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-03-20 07:58:55 +00:00
vmm: tdx: Don't access same locked structure twice
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
bcee2fbd2d
commit
3dc15a9259
@ -549,6 +549,8 @@ impl Vm {
|
||||
}));
|
||||
|
||||
let exit_evt_clone = exit_evt.try_clone().map_err(Error::EventFdClone)?;
|
||||
#[cfg(feature = "tdx")]
|
||||
let tdx_enabled = config.lock().unwrap().tdx.is_some();
|
||||
let cpu_manager = cpu::CpuManager::new(
|
||||
&config.lock().unwrap().cpus.clone(),
|
||||
&device_manager,
|
||||
@ -560,7 +562,7 @@ impl Vm {
|
||||
seccomp_action.clone(),
|
||||
vm_ops,
|
||||
#[cfg(feature = "tdx")]
|
||||
config.lock().unwrap().tdx.is_some(),
|
||||
tdx_enabled,
|
||||
)
|
||||
.map_err(Error::CpuManager)?;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user