From d274fe9cb8c709c91fd7761bdf1b30c3e8c8a79c Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Wed, 16 Nov 2022 22:58:49 +0000 Subject: [PATCH] vmm: fix tdx check The field has been moved in 3793ffe888db. Signed-off-by: Wei Liu --- vmm/src/vm.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/vmm/src/vm.rs b/vmm/src/vm.rs index 1bc3e186b..3172d805d 100644 --- a/vmm/src/vm.rs +++ b/vmm/src/vm.rs @@ -2932,10 +2932,12 @@ impl GuestDebuggable for Vm { #[cfg(feature = "tdx")] { - if self.config.lock().unwrap().tdx.is_some() { - return Err(GuestDebuggableError::Coredump(anyhow!( - "Coredump not possible with TDX VM" - ))); + if let Some(ref platform) = self.config.lock().unwrap().platform { + if platform.tdx { + return Err(GuestDebuggableError::Coredump(anyhow!( + "Coredump not possible with TDX VM" + ))); + } } }