vmm: fix tdx check

The field has been moved in 3793ffe888.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu 2022-11-16 22:58:49 +00:00 committed by Liu Wei
parent cd24f470f4
commit d274fe9cb8

View File

@ -2932,12 +2932,14 @@ impl GuestDebuggable for Vm {
#[cfg(feature = "tdx")] #[cfg(feature = "tdx")]
{ {
if self.config.lock().unwrap().tdx.is_some() { if let Some(ref platform) = self.config.lock().unwrap().platform {
if platform.tdx {
return Err(GuestDebuggableError::Coredump(anyhow!( return Err(GuestDebuggableError::Coredump(anyhow!(
"Coredump not possible with TDX VM" "Coredump not possible with TDX VM"
))); )));
} }
} }
}
let current_state = self.get_state().unwrap(); let current_state = self.get_state().unwrap();
if current_state != VmState::Paused { if current_state != VmState::Paused {