File tree Expand file tree Collapse file tree
src/hyperlight_host/src/hypervisor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -367,10 +367,6 @@ impl HyperlightVm {
367367 } ;
368368 }
369369
370- // Mark initial setup as complete for Windows - subsequent map_memory calls will fail
371- #[ cfg( target_os = "windows" ) ]
372- vm. complete_initial_memory_setup ( ) ;
373-
374370 #[ cfg( feature = "init-paging" ) ]
375371 vm. set_sregs ( & CommonSpecialRegisters :: standard_64bit_defaults ( _pml4_addr) )
376372 . map_err ( VmError :: Register ) ?;
Original file line number Diff line number Diff line change @@ -324,11 +324,6 @@ pub(crate) trait VirtualMachine: Debug + Send {
324324 /// Get partition handle
325325 #[ cfg( target_os = "windows" ) ]
326326 fn partition_handle ( & self ) -> windows:: Win32 :: System :: Hypervisor :: WHV_PARTITION_HANDLE ;
327-
328- /// Mark that initial memory setup is complete. After this, map_memory will fail.
329- /// This is only needed on Windows where dynamic memory mapping is not yet supported.
330- #[ cfg( target_os = "windows" ) ]
331- fn complete_initial_memory_setup ( & mut self ) ;
332327}
333328
334329#[ cfg( test) ]
Original file line number Diff line number Diff line change @@ -69,10 +69,6 @@ pub(crate) struct WhpVm {
6969 partition : WHV_PARTITION_HANDLE ,
7070 // Surrogate process for memory mapping
7171 surrogate_process : SurrogateProcess ,
72- // Track if initial memory setup is complete.
73- // Used to reject later memory mapping since it's not supported on windows.
74- // TODO remove this flag once memory mapping is supported on windows.
75- initial_memory_setup_done : bool ,
7672}
7773
7874// Safety: `WhpVm` is !Send because it holds `SurrogateProcess` which contains a raw pointer
@@ -111,7 +107,6 @@ impl WhpVm {
111107 Ok ( WhpVm {
112108 partition,
113109 surrogate_process,
114- initial_memory_setup_done : false ,
115110 } )
116111 }
117112
@@ -505,11 +500,6 @@ impl VirtualMachine for WhpVm {
505500 Ok ( xsave_buffer)
506501 }
507502
508- /// Mark that initial memory setup is complete. After this, map_memory will fail.
509- fn complete_initial_memory_setup ( & mut self ) {
510- self . initial_memory_setup_done = true ;
511- }
512-
513503 /// Get the partition handle for this VM
514504 fn partition_handle ( & self ) -> WHV_PARTITION_HANDLE {
515505 self . partition
You can’t perform that action at this time.
0 commit comments