@@ -39,7 +39,6 @@ use crate::mem::memory_region::{MemoryRegion, MemoryRegionFlags};
3939use  crate :: { new_error,  Result } ; 
4040
4141pub ( crate )  fn  is_hypervisor_present ( )  -> bool  { 
42-     println ! ( "whp in_is_hypervisor_present" ) ; 
4342    let  mut  capability:  WHV_CAPABILITY  = Default :: default ( ) ; 
4443    let  written_size:  Option < * mut  u32 >  = None ; 
4544
@@ -89,8 +88,6 @@ unsafe impl Sync for WhpVm {}
8988
9089impl  WhpVm  { 
9190    pub ( crate )  fn  new ( mmap_file_handle :  HandleWrapper )  -> Result < Self >  { 
92-         println ! ( "whp in_is_hypervisor_present" ) ; 
93- 
9491        const  NUM_CPU :  u32  = 1 ; 
9592        let  partition = unsafe  { 
9693            let  partition = WHvCreatePartition ( ) ?; 
@@ -114,8 +111,6 @@ impl WhpVm {
114111
115112    /// Helper for setting arbitrary registers. 
116113     fn  set_registers ( & self ,  registers :  & [ ( WHV_REGISTER_NAME ,  WHV_REGISTER_VALUE ) ] )  -> Result < ( ) >  { 
117-         println ! ( "whp set_registers" ) ; 
118- 
119114        let  register_count = registers. len ( ) ; 
120115        let  mut  register_names:  Vec < WHV_REGISTER_NAME >  = vec ! [ ] ; 
121116        let  mut  register_values:  Vec < WHV_REGISTER_VALUE >  = vec ! [ ] ; 
@@ -141,8 +136,6 @@ impl WhpVm {
141136
142137impl  Vm  for  WhpVm  { 
143138    fn  get_regs ( & self )  -> Result < CommonRegisters >  { 
144-         println ! ( "whp get_regs" ) ; 
145- 
146139        let  mut  whv_regs_values:  [ WHV_REGISTER_VALUE ;  WHP_REGS_NAMES_LEN ]  =
147140            unsafe  {  std:: mem:: zeroed ( )  } ; 
148141
@@ -171,7 +164,6 @@ impl Vm for WhpVm {
171164    } 
172165
173166    fn  set_regs ( & self ,  regs :  & CommonRegisters )  -> Result < ( ) >  { 
174-         println ! ( "whp set_regs" ) ; 
175167        let  whp_regs:  [ ( WHV_REGISTER_NAME ,  WHV_REGISTER_VALUE ) ;  WHP_REGS_NAMES_LEN ]  = regs. into ( ) ; 
176168        self . set_registers ( & whp_regs) ?; 
177169        Ok ( ( ) ) 
@@ -183,9 +175,9 @@ impl Vm for WhpVm {
183175            unsafe  {  std:: mem:: zeroed ( )  } ; 
184176        println ! ( "whp get_sregs2" ) ; 
185177
186-         println ! ( "parition : {:?}" ,  self . partition) ; 
187-         println ! ( "whp_sregs_names: {:?}" ,  WHP_SREGS_NAMES ) ; 
188-         println ! ( "ptr : {:?}" ,  WHP_SREGS_NAMES . as_ptr( ) ) ; 
178+         println ! ( "partition : {:?}" ,  self . partition) ; 
179+         //  println!("whp_sregs_names: {:?}", WHP_SREGS_NAMES);
180+         //  println!("ptr : {:?}", WHP_SREGS_NAMES.as_ptr());
189181        // println!("first value: {:?}", unsafe { 
190182        //     WHP_SREGS_NAMES.as_ptr().read() 
191183        // }); 
@@ -222,14 +214,12 @@ impl Vm for WhpVm {
222214    } 
223215
224216    fn  set_sregs ( & self ,  sregs :  & CommonSpecialRegisters )  -> Result < ( ) >  { 
225-         println ! ( "whp set_sregs" ) ; 
226217        let  whp_regs:  [ ( WHV_REGISTER_NAME ,  WHV_REGISTER_VALUE ) ;  WHP_SREGS_NAMES_LEN ]  = sregs. into ( ) ; 
227218        self . set_registers ( & whp_regs) ?; 
228219        Ok ( ( ) ) 
229220    } 
230221
231222    fn  get_fpu ( & self )  -> Result < CommonFpu >  { 
232-         println ! ( "whp get_fpu" ) ; 
233223        let  mut  whp_fpu_values:  [ WHV_REGISTER_VALUE ;  WHP_FPU_NAMES_LEN ]  =
234224            unsafe  {  std:: mem:: zeroed ( )  } ; 
235225
@@ -253,14 +243,12 @@ impl Vm for WhpVm {
253243    } 
254244
255245    fn  set_fpu ( & self ,  fpu :  & CommonFpu )  -> Result < ( ) >  { 
256-         println ! ( "whp set_fpu" ) ; 
257246        let  whp_fpu:  [ ( WHV_REGISTER_NAME ,  WHV_REGISTER_VALUE ) ;  WHP_FPU_NAMES_LEN ]  = fpu. into ( ) ; 
258247        self . set_registers ( & whp_fpu) ?; 
259248        Ok ( ( ) ) 
260249    } 
261250
262251    unsafe  fn  map_memory ( & mut  self ,  regions :  & [ MemoryRegion ] )  -> Result < ( ) >  { 
263-         println ! ( "whp map_memory" ) ; 
264252        if  regions. is_empty ( )  { 
265253            return  Err ( new_error ! ( "No memory regions to map" ) ) ; 
266254        } 
@@ -330,8 +318,6 @@ impl Vm for WhpVm {
330318
331319    #[ expect( non_upper_case_globals,  reason = "Windows API constant are lower case" ) ]  
332320    fn  run_vcpu ( & mut  self )  -> Result < HyperlightExit >  { 
333-         println ! ( "whp run_vpu" ) ; 
334- 
335321        let  mut  exit_context:  WHV_RUN_VP_EXIT_CONTEXT  = Default :: default ( ) ; 
336322
337323        unsafe  { 
@@ -389,7 +375,6 @@ impl Vm for WhpVm {
389375    } 
390376
391377    fn  get_partition_handle ( & self )  -> WHV_PARTITION_HANDLE  { 
392-         println ! ( "whp get_partition_handle" ) ; 
393378        self . partition 
394379    } 
395380} 
@@ -403,7 +388,6 @@ impl Drop for WhpVm {
403388} 
404389
405390unsafe  fn  try_load_whv_map_gpa_range2 ( )  -> Result < WHvMapGpaRange2Func >  { 
406-     println ! ( "whp try_load_whv_map_gpa_range2" ) ; 
407391    let  library = unsafe  { 
408392        LoadLibraryExA ( 
409393            s ! ( "winhvplatform.dll" ) , 
0 commit comments