@@ -36,12 +36,13 @@ use super::fpu::{FP_TAG_WORD_DEFAULT, MXCSR_DEFAULT};
36
36
use super :: handlers:: DbgMemAccessHandlerWrapper ;
37
37
use super :: handlers:: { MemAccessHandlerWrapper , OutBHandlerWrapper } ;
38
38
use super :: surrogate_process:: SurrogateProcess ;
39
+ use super :: surrogate_process_manager:: * ;
39
40
use super :: windows_hypervisor_platform:: { VMPartition , VMProcessor } ;
40
41
use super :: wrappers:: { HandleWrapper , WHvFPURegisters } ;
41
- use super :: { surrogate_process_manager:: * , InterruptHandle } ;
42
42
use super :: {
43
- HyperlightExit , Hypervisor , VirtualCPU , CR0_AM , CR0_ET , CR0_MP , CR0_NE , CR0_PE , CR0_PG , CR0_WP ,
44
- CR4_OSFXSR , CR4_OSXMMEXCPT , CR4_PAE , EFER_LMA , EFER_LME , EFER_NX , EFER_SCE ,
43
+ HyperlightExit , Hypervisor , InterruptHandle , VirtualCPU , CR0_AM , CR0_ET , CR0_MP , CR0_NE ,
44
+ CR0_PE , CR0_PG , CR0_WP , CR4_OSFXSR , CR4_OSXMMEXCPT , CR4_PAE , EFER_LMA , EFER_LME , EFER_NX ,
45
+ EFER_SCE ,
45
46
} ;
46
47
use crate :: hypervisor:: fpu:: FP_CONTROL_WORD_DEFAULT ;
47
48
use crate :: hypervisor:: wrappers:: WHvGeneralRegisters ;
@@ -108,7 +109,7 @@ impl HypervWindowsDriver {
108
109
mem_regions,
109
110
interrupt_handle : Arc :: new ( WindowsInterruptHandle {
110
111
running : AtomicBool :: new ( false ) ,
111
- parition_handle : partition_handle,
112
+ partition_handle,
112
113
dropped : AtomicBool :: new ( false ) ,
113
114
} ) ,
114
115
} )
@@ -509,14 +510,14 @@ impl Drop for HypervWindowsDriver {
509
510
pub struct WindowsInterruptHandle {
510
511
// `WHvCancelRunVirtualProcessor()` will return Ok even if the vcpu is not running, which is the reason we need this flag.
511
512
running : AtomicBool ,
512
- parition_handle : WHV_PARTITION_HANDLE ,
513
+ partition_handle : WHV_PARTITION_HANDLE ,
513
514
dropped : AtomicBool ,
514
515
}
515
516
516
517
impl InterruptHandle for WindowsInterruptHandle {
517
518
fn kill ( & self ) -> bool {
518
519
self . running . load ( Ordering :: Relaxed )
519
- && unsafe { WHvCancelRunVirtualProcessor ( self . parition_handle , 0 , 0 ) . is_ok ( ) }
520
+ && unsafe { WHvCancelRunVirtualProcessor ( self . partition_handle , 0 , 0 ) . is_ok ( ) }
520
521
}
521
522
522
523
fn dropped ( & self ) -> bool {
0 commit comments