Skip to content

Commit

Permalink
fix windows timeout tests
Browse files Browse the repository at this point in the history
Signed-off-by: Doru Blânzeanu <[email protected]>
  • Loading branch information
dblnz committed Dec 19, 2024
1 parent b6e7712 commit ca61def
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/hyperlight_host/src/hypervisor/hypervisor_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@ impl HypervisorHandler {
sandbox_memory_manager: SandboxMemoryManager<GuestSharedMemory>,
) -> Result<()> {
let configuration = self.configuration.clone();
let sandbox_memory_manager = Arc::new(Mutex::new(sandbox_memory_manager));
#[cfg(target_os = "windows")]
let in_process = sandbox_memory_manager.lock().unwrap().is_in_process();
let in_process = sandbox_memory_manager.is_in_process();
let sandbox_memory_manager = Arc::new(Mutex::new(sandbox_memory_manager));

*self.execution_variables.shm.try_lock().unwrap() = Some(sandbox_memory_manager);

Expand Down Expand Up @@ -850,10 +850,12 @@ fn set_up_hypervisor_partition(

#[cfg(target_os = "windows")]
Some(HypervisorType::Whp) => {
let mgr_lock = mgr.lock().unwrap();

let hv = crate::hypervisor::hyperv_windows::HypervWindowsDriver::new(
regions,
mgr.lock().unwrap().shared_mem.raw_mem_size(), // we use raw_* here because windows driver requires 64K aligned addresses,
mgr.lock().unwrap().shared_mem.raw_ptr() as *mut c_void, // and instead convert it to base_addr where needed in the driver itself
mgr_lock.shared_mem.raw_mem_size(), // we use raw_* here because windows driver requires 64K aligned addresses,
mgr_lock.shared_mem.raw_ptr() as *mut c_void, // and instead convert it to base_addr where needed in the driver itself
pml4_ptr.absolute()?,
entrypoint_ptr.absolute()?,
rsp_ptr.absolute()?,
Expand Down

0 comments on commit ca61def

Please sign in to comment.