diff --git a/tee/supervisor-tdx/src/panic.rs b/tee/supervisor-tdx/src/panic.rs index b08625a..211a9d8 100644 --- a/tee/supervisor-tdx/src/panic.rs +++ b/tee/supervisor-tdx/src/panic.rs @@ -1,3 +1,4 @@ +use core::arch::asm; use core::panic::PanicInfo; use log::error; @@ -5,5 +6,13 @@ use log::error; #[panic_handler] fn panic_handler(info: &PanicInfo) -> ! { error!("{info}"); - loop {} + triple_fault(); +} + +fn triple_fault() -> ! { + // We don't have an exception handler for int3 or double faults, so this + // will cause a triple fault. + unsafe { + asm!("int3", options(noreturn)); + } }