HyperDbg Debugger
|
This file contains the headers for Hypervisor Routines which have to be called by external codes. More...
Go to the source code of this file.
Functions | |
BOOLEAN | HvSetGuestSelector (PVOID GdtBase, UINT32 SegmentRegister, UINT16 Selector) |
Set Guest Selector Registers. | |
UINT32 | HvAdjustControls (UINT32 Ctl, UINT32 Msr) |
Returns the Cpu Based and Secondary Processor Based Controls and other controls based on hardware support. | |
VOID | HvHandleCpuid (VIRTUAL_MACHINE_STATE *VCpu) |
Handle Cpuid. | |
VOID | HvFillGuestSelectorData (PVOID GdtBase, UINT32 SegmentRegister, UINT16 Selector) |
Fill guest selector data. | |
VOID | HvHandleControlRegisterAccess (VIRTUAL_MACHINE_STATE *VCpu, VMX_EXIT_QUALIFICATION_MOV_CR *CrExitQualification) |
Handle Guest's Control Registers Access. | |
VOID | HvResumeToNextInstruction () |
Resume GUEST_RIP to next instruction. | |
VOID | HvSuppressRipIncrement (VIRTUAL_MACHINE_STATE *VCpu) |
Suppress the incrementation of RIP. | |
VOID | HvPerformRipIncrement (VIRTUAL_MACHINE_STATE *VCpu) |
Perform the incrementation of RIP. | |
VOID | HvSetMonitorTrapFlag (BOOLEAN Set) |
Set or unset the monitor trap flags. | |
VOID | HvSetRflagTrapFlag (BOOLEAN Set) |
Set the rflag's trap flag. | |
VOID | HvSetLoadDebugControls (BOOLEAN Set) |
Set LOAD DEBUG CONTROLS on Vm-entry controls. | |
VOID | HvSetSaveDebugControls (BOOLEAN Set) |
Set SAVE DEBUG CONTROLS on Vm-exit controls. | |
VOID | HvRestoreRegisters () |
Reset GDTR/IDTR and other old when you do vmxoff as the patchguard will detect them left modified. | |
VOID | HvSetPmcVmexit (BOOLEAN Set) |
Set vm-exit for rdpmc instructions. | |
VOID | HvSetMovControlRegsExiting (BOOLEAN Set, UINT64 ControlRegister, UINT64 MaskRegister) |
Set vm-exit for mov-to-cr0/4. | |
VOID | HvSetMovToCr3Vmexit (VIRTUAL_MACHINE_STATE *VCpu, BOOLEAN Set) |
Set vm-exit for mov-to-cr3. | |
VOID | HvWriteExceptionBitmap (UINT32 BitmapMask) |
Write to the exception bitmap. | |
UINT32 | HvReadExceptionBitmap () |
Read the exception bitmap. | |
VOID | HvSetInterruptWindowExiting (BOOLEAN Set) |
Set Interrupt-window exiting. | |
VOID | HvSetPmlEnableFlag (BOOLEAN Set) |
Set Page Modification Logging Enable bit. | |
VOID | HvSetModeBasedExecutionEnableFlag (BOOLEAN Set) |
Set Mode-based Execution Control (MBEC) Enable bit. | |
VOID | HvSetNmiWindowExiting (BOOLEAN Set) |
Set NMI-window exiting. | |
VOID | HvHandleMovDebugRegister (VIRTUAL_MACHINE_STATE *VCpu) |
Handle Mov to Debug Registers Exitings. | |
VOID | HvSetMovDebugRegsExiting (VIRTUAL_MACHINE_STATE *VCpu, BOOLEAN Set) |
Set the Mov to Debug Registers Exiting. | |
VOID | HvSetNmiExiting (BOOLEAN Set) |
Set the NMI Exiting. | |
VOID | HvSetVmxPreemptionTimerExiting (BOOLEAN Set) |
Set the VMX Preemptiom Timer. | |
VOID | HvSetExceptionBitmap (VIRTUAL_MACHINE_STATE *VCpu, UINT32 IdtIndex) |
Set exception bitmap in VMCS. | |
VOID | HvUnsetExceptionBitmap (VIRTUAL_MACHINE_STATE *VCpu, UINT32 IdtIndex) |
Unset exception bitmap in VMCS. | |
VOID | HvSetExternalInterruptExiting (VIRTUAL_MACHINE_STATE *VCpu, BOOLEAN Set) |
Set the External Interrupt Exiting. | |
VOID | HvEnableAndCheckForPreviousExternalInterrupts (VIRTUAL_MACHINE_STATE *VCpu) |
Checks to enable and reinject previous interrupts. | |
VOID | HvSetRdtscExiting (VIRTUAL_MACHINE_STATE *VCpu, BOOLEAN Set) |
Set the RDTSC/P Exiting. | |
UINT16 | HvGetCsSelector () |
Read CS selector. | |
UINT64 | HvGetRflags () |
Read guest's RFLAGS. | |
VOID | HvSetRflags (UINT64 Rflags) |
Set guest's RFLAGS. | |
UINT64 | HvGetRip () |
Read guest's RIP. | |
VOID | HvSetRip (UINT64 Rip) |
Set guest's RIP. | |
UINT64 | HvGetInterruptibilityState () |
Read guest's interruptibility state. | |
UINT64 | HvClearSteppingBits (UINT64 Interruptibility) |
Clear STI and MOV SS bits. | |
VOID | HvSetInterruptibilityState (UINT64 InterruptibilityState) |
Set guest's interruptibility state. | |
VOID | HvInjectPendingExternalInterrupts (VIRTUAL_MACHINE_STATE *VCpu) |
Inject pending external interrupts. | |
VOID | HvCheckAndEnableExternalInterrupts (VIRTUAL_MACHINE_STATE *VCpu) |
Check and enable external interrupts. | |
VOID | HvDisableExternalInterruptsAndInterruptWindow (VIRTUAL_MACHINE_STATE *VCpu) |
Disable external-interrupts and interrupt window. | |
BOOLEAN | HvInitVmm (VMM_CALLBACKS *VmmCallbacks) |
Initializes the hypervisor. | |
VOID | HvEnableMtfAndChangeExternalInterruptState (VIRTUAL_MACHINE_STATE *VCpu) |
Enables MTF and adjust external interrupt state. | |
VOID | HvPreventExternalInterrupts (VIRTUAL_MACHINE_STATE *VCpu) |
Adjust external interrupt state. | |
This file contains the headers for Hypervisor Routines which have to be called by external codes.
DO NOT DIRECTLY CALL VMX FUNCTIONS, instead use these routines
Returns the Cpu Based and Secondary Processor Based Controls and other controls based on hardware support.
Ctl | |
Msr |
Returns the Cpu Based and Secondary Processor Based Controls and other controls based on hardware support.
Ctl | |
Msr |
VOID HvCheckAndEnableExternalInterrupts | ( | VIRTUAL_MACHINE_STATE * | VCpu | ) |
Check and enable external interrupts.
VCpu | The virtual processor's state |
Clear STI and MOV SS bits.
VOID HvDisableExternalInterruptsAndInterruptWindow | ( | VIRTUAL_MACHINE_STATE * | VCpu | ) |
Disable external-interrupts and interrupt window.
VCpu | The virtual processor's state |
VOID HvEnableAndCheckForPreviousExternalInterrupts | ( | VIRTUAL_MACHINE_STATE * | VCpu | ) |
Checks to enable and reinject previous interrupts.
VCpu | The virtual processor's state |
Set | Set or unset the External Interrupt Exiting |
VOID HvEnableMtfAndChangeExternalInterruptState | ( | VIRTUAL_MACHINE_STATE * | VCpu | ) |
Enables MTF and adjust external interrupt state.
VCpu | The virtual processor's state |
Fill guest selector data.
GdtBase | |
SegmentRegister | |
Selector |
Fill guest selector data.
GdtBase | |
SegmentRegister | |
Selector |
UINT16 HvGetCsSelector | ( | ) |
Read CS selector.
UINT64 HvGetInterruptibilityState | ( | ) |
Read guest's interruptibility state.
UINT64 HvGetRflags | ( | ) |
Read guest's RFLAGS.
UINT64 HvGetRip | ( | ) |
Read guest's RIP.
VOID HvHandleControlRegisterAccess | ( | VIRTUAL_MACHINE_STATE * | VCpu, |
VMX_EXIT_QUALIFICATION_MOV_CR * | CrExitQualification ) |
Handle Guest's Control Registers Access.
VCpu |
Handle Guest's Control Registers Access.
VCpu | The virtual processor's state |
VOID HvHandleCpuid | ( | VIRTUAL_MACHINE_STATE * | VCpu | ) |
Handle Cpuid.
VCpu |
Handle Cpuid.
VCpu | The virtual processor's state |
VOID HvHandleMovDebugRegister | ( | VIRTUAL_MACHINE_STATE * | VCpu | ) |
Handle Mov to Debug Registers Exitings.
VCpu |
VCpu | The virtual processor's state |
BOOLEAN HvInitVmm | ( | VMM_CALLBACKS * | VmmCallbacks | ) |
Initializes the hypervisor.
VmmCallbacks |
VOID HvInjectPendingExternalInterrupts | ( | VIRTUAL_MACHINE_STATE * | VCpu | ) |
Inject pending external interrupts.
VCpu | The virtual processor's state |
|
externinline |
Perform the incrementation of RIP.
VCpu | The virtual processor's state |
VOID HvPreventExternalInterrupts | ( | VIRTUAL_MACHINE_STATE * | VCpu | ) |
Adjust external interrupt state.
VCpu | The virtual processor's state |
UINT32 HvReadExceptionBitmap | ( | ) |
Read the exception bitmap.
Read the exception bitmap.
Should be called in vmx-root
VOID HvRestoreRegisters | ( | ) |
Reset GDTR/IDTR and other old when you do vmxoff as the patchguard will detect them left modified.
VOID HvResumeToNextInstruction | ( | ) |
Resume GUEST_RIP to next instruction.
Resume GUEST_RIP to next instruction.
VOID HvSetExceptionBitmap | ( | VIRTUAL_MACHINE_STATE * | VCpu, |
UINT32 | IdtIndex ) |
Set exception bitmap in VMCS.
Should be called in vmx-root
IdtIndex |
Should be called in vmx-root
VCpu | The virtual processor's state |
IdtIndex | Interrupt Descriptor Table index of exception |
VOID HvSetExternalInterruptExiting | ( | VIRTUAL_MACHINE_STATE * | VCpu, |
BOOLEAN | Set ) |
Set the External Interrupt Exiting.
Set |
VCpu | The virtual processor's state |
Set | Set or unset the External Interrupt Exiting |
Set Guest Selector Registers.
GdtBase | |
SegmentRegister | |
Selector |
Set Guest Selector Registers.
GdtBase | |
SegmentRegister | |
Selector |
Set guest's interruptibility state.
InterruptibilityState |
Set Interrupt-window exiting.
Set |
Set | Set or unset the Interrupt-window exiting |
Set LOAD DEBUG CONTROLS on Vm-entry controls.
Set | Set or unset |
Set Mode-based Execution Control (MBEC) Enable bit.
Set | Set or unset the MBEC |
Set or unset the monitor trap flags.
Set |
Set or unset the monitor trap flags.
Set | Set or unset the MTFs |
Set vm-exit for mov-to-cr0/4.
Set | |
ControlRegister | |
MaskRegister |
Should be called in vmx-root
Set | or unset the vm-exits |
Control | Register |
Mask | Register |
VOID HvSetMovDebugRegsExiting | ( | VIRTUAL_MACHINE_STATE * | VCpu, |
BOOLEAN | Set ) |
Set the Mov to Debug Registers Exiting.
Set |
Set the Mov to Debug Registers Exiting.
VCpu | The virtual processor's state |
Set | Set or unset the Mov to Debug Registers Exiting |
VOID HvSetMovToCr3Vmexit | ( | VIRTUAL_MACHINE_STATE * | VCpu, |
BOOLEAN | Set ) |
Set vm-exit for mov-to-cr3.
Set |
Should be called in vmx-root
VCpu | The virtual processor's state |
Set | Set or unset the vm-exits |
Set the NMI Exiting.
Set |
Set | Set or unset the NMI Exiting |
Set NMI-window exiting.
Set |
Set | Set or unset the NMI-window exiting |
Set vm-exit for rdpmc instructions.
Set |
Should be called in vmx-root
Set | Set or unset the vm-exits |
Set Page Modification Logging Enable bit.
Set | Set or unset the PML |
VOID HvSetRdtscExiting | ( | VIRTUAL_MACHINE_STATE * | VCpu, |
BOOLEAN | Set ) |
Set the RDTSC/P Exiting.
Set |
VCpu | The virtual processor's state |
Set | Set or unset the RDTSC/P Exiting |
Set guest's RFLAGS.
Rflags |
Set the rflag's trap flag.
Set | Set or unset the TF |
Set SAVE DEBUG CONTROLS on Vm-exit controls.
Set | Set or unset |
Set the VMX Preemptiom Timer.
Set |
Set the VMX Preemptiom Timer.
Set | Set or unset the VMX preemption timer |
|
externinline |
Suppress the incrementation of RIP.
VCpu | The virtual processor's state |
VOID HvUnsetExceptionBitmap | ( | VIRTUAL_MACHINE_STATE * | VCpu, |
UINT32 | IdtIndex ) |
Unset exception bitmap in VMCS.
Should be called in vmx-root
IdtIndex |
Should be called in vmx-root
VCpu | The virtual processor's state |
IdtIndex | Interrupt Descriptor Table index of exception |
Write to the exception bitmap.
BitmapMask |
Write to the exception bitmap.
Should be called in vmx-root
BitmapMask | The content to write on exception bitmap |