@@ -19,6 +19,7 @@ use std::sync::{Arc, Mutex};
19
19
use hyperlight_common:: flatbuffer_wrappers:: function_types:: ParameterValue ;
20
20
use hyperlight_common:: flatbuffer_wrappers:: guest_error:: ErrorCode ;
21
21
use hyperlight_common:: flatbuffer_wrappers:: guest_log_data:: GuestLogData ;
22
+ use hyperlight_common:: outb:: OutBAction ;
22
23
use log:: { Level , Record } ;
23
24
use tracing:: { instrument, Span } ;
24
25
use tracing_log:: format_trace;
@@ -30,25 +31,6 @@ use crate::mem::mgr::SandboxMemoryManager;
30
31
use crate :: mem:: shared_mem:: HostSharedMemory ;
31
32
use crate :: { new_error, HyperlightError , Result } ;
32
33
33
- pub ( super ) enum OutBAction {
34
- Log ,
35
- CallFunction ,
36
- Abort ,
37
- }
38
-
39
- impl TryFrom < u16 > for OutBAction {
40
- type Error = HyperlightError ;
41
- #[ instrument( skip_all, parent = Span :: current( ) , level= "Trace" ) ]
42
- fn try_from ( val : u16 ) -> Result < Self > {
43
- match val {
44
- 99 => Ok ( OutBAction :: Log ) ,
45
- 101 => Ok ( OutBAction :: CallFunction ) ,
46
- 102 => Ok ( OutBAction :: Abort ) ,
47
- _ => Err ( new_error ! ( "Invalid OutB value: {}" , val) ) ,
48
- }
49
- }
50
- }
51
-
52
34
#[ instrument( err( Debug ) , skip_all, parent = Span :: current( ) , level="Trace" ) ]
53
35
pub ( super ) fn outb_log ( mgr : & mut SandboxMemoryManager < HostSharedMemory > ) -> Result < ( ) > {
54
36
// This code will create either a logging record or a tracing record for the GuestLogData depending on if the host has set up a tracing subscriber.
0 commit comments