@@ -21,17 +21,20 @@ use hyperlight_common::outb::OutBAction;
2121
2222/// Halt the execution of the guest and returns control to the host. 
2323#[ inline( never) ]  
24+ #[ hyperlight_guest_tracing_macro:: trace_function]  
2425pub  fn  halt ( )  { 
2526    unsafe  {  asm ! ( "hlt" ,  options( nostack) )  } 
2627} 
2728
2829/// Exits the VM with an Abort OUT action and code 0. 
2930#[ unsafe( no_mangle) ]  
31+ #[ hyperlight_guest_tracing_macro:: trace_function]  
3032pub  extern  "C"  fn  abort ( )  -> ! { 
3133    abort_with_code ( & [ 0 ,  0xFF ] ) 
3234} 
3335
3436/// Exits the VM with an Abort OUT action and a specific code. 
37+ #[ hyperlight_guest_tracing_macro:: trace_function]  
3538pub  fn  abort_with_code ( code :  & [ u8 ] )  -> ! { 
3639    outb ( OutBAction :: Abort  as  u16 ,  code) ; 
3740    outb ( OutBAction :: Abort  as  u16 ,  & [ 0xFF ] ) ;  // send abort terminator (if not included in code) 
@@ -42,6 +45,7 @@ pub fn abort_with_code(code: &[u8]) -> ! {
4245/// 
4346/// # Safety 
4447/// This function is unsafe because it dereferences a raw pointer. 
48+ #[ hyperlight_guest_tracing_macro:: trace_function]  
4549pub  unsafe  fn  abort_with_code_and_message ( code :  & [ u8 ] ,  message_ptr :  * const  c_char )  -> ! { 
4650    unsafe  { 
4751        // Step 1: Send abort code (typically 1 byte, but `code` allows flexibility) 
@@ -63,6 +67,7 @@ pub unsafe fn abort_with_code_and_message(code: &[u8], message_ptr: *const c_cha
6367
6468/// OUT bytes to the host through multiple exits. 
6569pub ( crate )  fn  outb ( port :  u16 ,  data :  & [ u8 ] )  { 
70+     hyperlight_guest_tracing_macro:: flush!( ) ; 
6671    unsafe  { 
6772        let  mut  i = 0 ; 
6873        while  i < data. len ( )  { 
0 commit comments