From 16a988215333b2c2c966f26547d5dda13a2b4adf Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 11 May 2022 14:33:11 +0100 Subject: [PATCH] vmm: cpu: tdx: Don't use fd suffix for something not an FD The hypervisor::Vcpu is the abstraction over the fd. Signed-off-by: Rob Bradford --- vmm/src/cpu.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vmm/src/cpu.rs b/vmm/src/cpu.rs index 174c322b3..4c7b13c23 100644 --- a/vmm/src/cpu.rs +++ b/vmm/src/cpu.rs @@ -989,8 +989,8 @@ impl CpuManager { } #[cfg(feature = "tdx")] VmExit::Tdx => { - if let Some(vcpu_fd) = Arc::get_mut(&mut vcpu.vcpu) { - match vcpu_fd.get_tdx_exit_details() { + if let Some(vcpu) = Arc::get_mut(&mut vcpu.vcpu) { + match vcpu.get_tdx_exit_details() { Ok(details) => match details { TdxExitDetails::GetQuote => warn!("TDG_VP_VMCALL_GET_QUOTE not supported"), TdxExitDetails::SetupEventNotifyInterrupt => { @@ -999,7 +999,7 @@ impl CpuManager { }, Err(e) => error!("Unexpected TDX VMCALL: {}", e), } - vcpu_fd.set_tdx_status(TdxExitStatus::InvalidOperand); + vcpu.set_tdx_status(TdxExitStatus::InvalidOperand); } else { // We should never reach this code as // this means the design from the code