HyperDbg Debugger
Loading...
Searching...
No Matches
Hv.h
Go to the documentation of this file.
1
13#pragma once
14
16// Functions //
18
28HvSetGuestSelector(PVOID GdtBase, UINT32 SegmentRegister, UINT16 Selector);
29
40
47VOID
49
58VOID
59HvFillGuestSelectorData(PVOID GdtBase, UINT32 SegmentRegister, UINT16 Selector);
60
67VOID
69 VMX_EXIT_QUALIFICATION_MOV_CR * CrExitQualification);
70
76VOID
78
86extern inline VOID
88
96extern inline VOID
98
105VOID
107
115VOID
117
124VOID
126
133VOID
135
142VOID
144
151VOID
153
162VOID
163HvSetMovControlRegsExiting(BOOLEAN Set, UINT64 ControlRegister, UINT64 MaskRegister);
164
171VOID
173
180VOID
182
188UINT32
190
197VOID
199
206VOID
208
215VOID
217
224VOID
226
233VOID
235
242VOID
244
251VOID
253
260VOID
262
270VOID
272
280VOID
282
289VOID
291
299VOID
301
308VOID
310
316UINT16
318
324UINT64
326
333VOID
334HvSetRflags(UINT64 Rflags);
335
341UINT64
342HvGetRip();
343
350VOID
351HvSetRip(UINT64 Rip);
352
358UINT64
360
366UINT64
367HvClearSteppingBits(UINT64 Interruptibility);
368
375VOID
376HvSetInterruptibilityState(UINT64 InterruptibilityState);
377
385VOID
387
395VOID
397
405VOID
407
415HvInitVmm(VMM_CALLBACKS * VmmCallbacks);
416
422VOID
424
431VOID
unsigned short UINT16
Definition BasicTypes.h:47
UCHAR BOOLEAN
Definition BasicTypes.h:39
#define VOID
Definition BasicTypes.h:33
unsigned __int64 UINT64
Definition BasicTypes.h:21
unsigned int UINT32
Definition BasicTypes.h:48
VOID HvHandleControlRegisterAccess(VIRTUAL_MACHINE_STATE *VCpu, VMX_EXIT_QUALIFICATION_MOV_CR *CrExitQualification)
Handle Guest's Control Registers Access.
Definition Hv.c:136
UINT32 HvAdjustControls(UINT32 Ctl, UINT32 Msr)
Returns the Cpu Based and Secondary Processor Based Controls and other controls based on hardware sup...
Definition Hv.c:23
VOID HvRestoreRegisters()
Reset GDTR/IDTR and other old when you do vmxoff as the patchguard will detect them left modified.
Definition Hv.c:463
VOID HvSetRip(UINT64 Rip)
Set guest's RIP.
Definition Hv.c:1194
VOID HvFillGuestSelectorData(PVOID GdtBase, UINT32 SegmentRegister, UINT16 Selector)
Fill guest selector data.
Definition Hv.c:276
VOID HvSetPmcVmexit(BOOLEAN Set)
Set vm-exit for rdpmc instructions.
Definition Hv.c:509
VOID HvHandleMovDebugRegister(VIRTUAL_MACHINE_STATE *VCpu)
Handle Mov to Debug Registers Exitings.
Definition Hv.c:748
VOID HvSetNmiExiting(BOOLEAN Set)
Set the NMI Exiting.
Definition Hv.c:953
VOID HvUnsetExceptionBitmap(VIRTUAL_MACHINE_STATE *VCpu, UINT32 IdtIndex)
Unset exception bitmap in VMCS.
Definition Hv.c:1039
BOOLEAN HvSetGuestSelector(PVOID GdtBase, UINT32 SegmentRegister, UINT16 Selector)
Set Guest Selector Registers.
Definition Hv.c:42
UINT32 HvReadExceptionBitmap()
Read the exception bitmap.
Definition Hv.c:587
UINT64 HvGetRflags()
Read guest's RFLAGS.
Definition Hv.c:1151
VOID HvSetMovDebugRegsExiting(VIRTUAL_MACHINE_STATE *VCpu, BOOLEAN Set)
Set the Mov to Debug Registers Exiting.
Definition Hv.c:1121
VOID HvSuppressRipIncrement(VIRTUAL_MACHINE_STATE *VCpu)
Suppress the incrementation of RIP.
Definition Hv.c:324
VOID HvSetSaveDebugControls(BOOLEAN Set)
Set SAVE DEBUG CONTROLS on Vm-exit controls.
Definition Hv.c:433
VOID HvCheckAndEnableExternalInterrupts(VIRTUAL_MACHINE_STATE *VCpu)
Check and enable external interrupts.
Definition Hv.c:1271
VOID HvSetInterruptWindowExiting(BOOLEAN Set)
Set Interrupt-window exiting.
Definition Hv.c:606
VOID HvWriteExceptionBitmap(UINT32 BitmapMask)
Write to the exception bitmap.
Definition Hv.c:572
VOID HvResumeToNextInstruction()
Resume GUEST_RIP to next instruction.
Definition Hv.c:302
VOID HvEnableAndCheckForPreviousExternalInterrupts(VIRTUAL_MACHINE_STATE *VCpu)
Checks to enable and reinject previous interrupts.
Definition Hv.c:1072
UINT64 HvGetInterruptibilityState()
Read guest's interruptibility state.
Definition Hv.c:1205
VOID HvPreventExternalInterrupts(VIRTUAL_MACHINE_STATE *VCpu)
Adjust external interrupt state.
Definition Hv.c:1426
VOID HvSetPmlEnableFlag(BOOLEAN Set)
Set Page Modification Logging Enable bit.
Definition Hv.c:640
VOID HvPerformRipIncrement(VIRTUAL_MACHINE_STATE *VCpu)
Perform the incrementation of RIP.
Definition Hv.c:337
VOID HvSetVmxPreemptionTimerExiting(BOOLEAN Set)
Set the VMX Preemptiom Timer.
Definition Hv.c:989
UINT64 HvClearSteppingBits(UINT64 Interruptibility)
Clear STI and MOV SS bits.
Definition Hv.c:1220
VOID HvSetExternalInterruptExiting(VIRTUAL_MACHINE_STATE *VCpu, BOOLEAN Set)
Set the External Interrupt Exiting.
Definition Hv.c:1055
VOID HvHandleCpuid(VIRTUAL_MACHINE_STATE *VCpu)
Handle Cpuid.
Definition Hv.c:67
UINT64 HvGetRip()
Read guest's RIP.
Definition Hv.c:1178
VOID HvDisableExternalInterruptsAndInterruptWindow(VIRTUAL_MACHINE_STATE *VCpu)
Disable external-interrupts and interrupt window.
Definition Hv.c:1300
VOID HvSetMovControlRegsExiting(BOOLEAN Set, UINT64 ControlRegister, UINT64 MaskRegister)
Set vm-exit for mov-to-cr0/4.
Definition Hv.c:543
VOID HvSetRdtscExiting(VIRTUAL_MACHINE_STATE *VCpu, BOOLEAN Set)
Set the RDTSC/P Exiting.
Definition Hv.c:1108
VOID HvEnableMtfAndChangeExternalInterruptState(VIRTUAL_MACHINE_STATE *VCpu)
Enables MTF and adjust external interrupt state.
Definition Hv.c:1389
VOID HvSetModeBasedExecutionEnableFlag(BOOLEAN Set)
Set Mode-based Execution Control (MBEC) Enable bit.
Definition Hv.c:677
BOOLEAN HvInitVmm(VMM_CALLBACKS *VmmCallbacks)
Initializes the hypervisor.
Definition Hv.c:1322
VOID HvSetNmiWindowExiting(BOOLEAN Set)
Set NMI-window exiting.
Definition Hv.c:714
VOID HvSetMovToCr3Vmexit(VIRTUAL_MACHINE_STATE *VCpu, BOOLEAN Set)
Set vm-exit for mov-to-cr3.
Definition Hv.c:558
VOID HvSetLoadDebugControls(BOOLEAN Set)
Set LOAD DEBUG CONTROLS on Vm-entry controls.
Definition Hv.c:402
VOID HvSetInterruptibilityState(UINT64 InterruptibilityState)
Set guest's interruptibility state.
Definition Hv.c:1236
VOID HvInjectPendingExternalInterrupts(VIRTUAL_MACHINE_STATE *VCpu)
Inject pending external interrupts.
Definition Hv.c:1249
VOID HvSetExceptionBitmap(VIRTUAL_MACHINE_STATE *VCpu, UINT32 IdtIndex)
Set exception bitmap in VMCS.
Definition Hv.c:1022
VOID HvSetRflags(UINT64 Rflags)
Set guest's RFLAGS.
Definition Hv.c:1167
VOID HvSetMonitorTrapFlag(BOOLEAN Set)
Set or unset the monitor trap flags.
Definition Hv.c:349
VOID HvSetRflagTrapFlag(BOOLEAN Set)
Set the rflag's trap flag.
Definition Hv.c:381
UINT16 HvGetCsSelector()
Read CS selector.
Definition Hv.c:1132
_In_ UINT16 Selector
Definition Segmentation.h:50
The status of each core after and before VMX.
Definition State.h:290
Prototype of each function needed by VMM module.
Definition VMM.h:181