69 VMX_EXIT_QUALIFICATION_MOV_CR * CrExitQualification);
VOID HvHandleControlRegisterAccess(VIRTUAL_MACHINE_STATE *VCpu, VMX_EXIT_QUALIFICATION_MOV_CR *CrExitQualification)
Handle Guest's Control Registers Access.
Definition Hv.c:140
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:491
VOID HvSetRip(UINT64 Rip)
Set guest's RIP.
Definition Hv.c:1240
VOID HvFillGuestSelectorData(PVOID GdtBase, UINT32 SegmentRegister, UINT16 Selector)
Fill guest selector data.
Definition Hv.c:272
VOID HvSetPmcVmexit(BOOLEAN Set)
Set vm-exit for rdpmc instructions.
Definition Hv.c:553
VOID HvGetAndStoreDebugctl(UINT64 *StoreDebugctl)
Get and store the guest state of IA32_DEBUGCTL.
Definition Hv.c:1561
VOID HvSetSaveDebugControls(VIRTUAL_MACHINE_STATE *VCpu, BOOLEAN Set)
Set SAVE DEBUG CONTROLS on Vm-exit controls.
Definition Hv.c:446
VOID HvHandleMovDebugRegister(VIRTUAL_MACHINE_STATE *VCpu)
Handle Mov to Debug Registers Exitings.
Definition Hv.c:792
VOID HvSetNmiExiting(BOOLEAN Set)
Set the NMI Exiting.
Definition Hv.c:1000
VOID HvUnsetExceptionBitmap(VIRTUAL_MACHINE_STATE *VCpu, UINT32 IdtIndex)
Unset exception bitmap in VMCS.
Definition Hv.c:1086
VOID HvSetGuestIa32LbrCtl(UINT64 Value)
Set the guest state of IA32_LBR_CTL.
Definition Hv.c:1620
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:631
UINT64 HvGetRflags()
Read guest's RFLAGS.
Definition Hv.c:1197
VOID HvSetMovDebugRegsExiting(VIRTUAL_MACHINE_STATE *VCpu, BOOLEAN Set)
Set the Mov to Debug Registers Exiting.
Definition Hv.c:1167
VOID HvSuppressRipIncrement(VIRTUAL_MACHINE_STATE *VCpu)
Suppress the incrementation of RIP.
Definition Hv.c:320
VOID HvCheckAndEnableExternalInterrupts(VIRTUAL_MACHINE_STATE *VCpu)
Check and enable external interrupts.
Definition Hv.c:1317
VOID HvSetInterruptWindowExiting(BOOLEAN Set)
Set Interrupt-window exiting.
Definition Hv.c:650
VOID HvSetDebugctl(UINT64 Value)
Set the guest state of IA32_DEBUGCTL.
Definition Hv.c:1607
VOID HvWriteExceptionBitmap(UINT32 BitmapMask)
Write to the exception bitmap.
Definition Hv.c:616
UINT64 HvGetDebugctl()
Get the guest state of IA32_DEBUGCTL.
Definition Hv.c:1526
VOID HvResumeToNextInstruction()
Resume GUEST_RIP to next instruction.
Definition Hv.c:298
VOID HvEnableAndCheckForPreviousExternalInterrupts(VIRTUAL_MACHINE_STATE *VCpu)
Checks to enable and reinject previous interrupts.
Definition Hv.c:1118
UINT64 HvGetInterruptibilityState()
Read guest's interruptibility state.
Definition Hv.c:1251
VOID HvPreventExternalInterrupts(VIRTUAL_MACHINE_STATE *VCpu)
Adjust external interrupt state.
Definition Hv.c:1475
VOID HvHandleTrapFlag()
Handle the case when the trap flag is set, and we need to inject the single-step exception right afte...
Definition Hv.c:1754
VOID HvSetPmlEnableFlag(BOOLEAN Set)
Set Page Modification Logging Enable bit.
Definition Hv.c:684
VOID HvPerformRipIncrement(VIRTUAL_MACHINE_STATE *VCpu)
Perform the incrementation of RIP.
Definition Hv.c:333
VOID HvSetVmxPreemptionTimerExiting(BOOLEAN Set)
Set the VMX Preemptiom Timer.
Definition Hv.c:1036
UINT64 HvClearSteppingBits(UINT64 Interruptibility)
Clear STI and MOV SS bits.
Definition Hv.c:1266
VOID HvSetExternalInterruptExiting(VIRTUAL_MACHINE_STATE *VCpu, BOOLEAN Set)
Set the External Interrupt Exiting.
Definition Hv.c:1102
VOID HvHandleCpuid(VIRTUAL_MACHINE_STATE *VCpu)
Handle Cpuid.
Definition Hv.c:67
VOID HvSetClearGuestIa32LbrCtl(VIRTUAL_MACHINE_STATE *VCpu, BOOLEAN Set)
Set SAVE GUEST IA32_LBR_CTL on Vm-exit controls.
Definition Hv.c:459
VOID HvSetDebugReg7(UINT64 Value)
Set the guest state of DR7.
Definition Hv.c:1741
UINT64 HvGetRip()
Read guest's RIP.
Definition Hv.c:1224
VOID HvDisableExternalInterruptsAndInterruptWindow(VIRTUAL_MACHINE_STATE *VCpu)
Disable external-interrupts and interrupt window.
Definition Hv.c:1346
VOID HvSetPendingDebugExceptions(UINT64 Value)
Set the guest state of pending debug exceptions.
Definition Hv.c:1515
VOID HvGetAndStoreGuestIa32LbrCtl(UINT64 *StoreGuestIa32Lbr)
Get and store the guest state of IA32_LBR_CTL.
Definition Hv.c:1585
VOID HvSetLbrSelect(UINT64 FilterOptions)
Set LBR selector.
Definition Hv.c:1633
VOID HvSetMovControlRegsExiting(BOOLEAN Set, UINT64 ControlRegister, UINT64 MaskRegister)
Set vm-exit for mov-to-cr0/4.
Definition Hv.c:587
VOID HvSetRdtscExiting(VIRTUAL_MACHINE_STATE *VCpu, BOOLEAN Set)
Set the RDTSC/P Exiting.
Definition Hv.c:1154
VOID HvEnableMtfAndChangeExternalInterruptState(VIRTUAL_MACHINE_STATE *VCpu)
Enables MTF and adjust external interrupt state.
Definition Hv.c:1438
VOID HvSetModeBasedExecutionEnableFlag(BOOLEAN Set)
Set Mode-based Execution Control (MBEC) Enable bit.
Definition Hv.c:721
BOOLEAN HvInitVmm(VMM_CALLBACKS *VmmCallbacks)
Initializes the hypervisor.
Definition Hv.c:1368
BOOLEAN HvCheckCpuSupportForSaveAndLoadDebugControls()
Check if CPU support save and load debug controls on exit and load entries.
Definition Hv.c:1644
VOID HvSetLoadDebugControls(VIRTUAL_MACHINE_STATE *VCpu, BOOLEAN Set)
Set LOAD DEBUG CONTROLS on Vm-entry controls.
Definition Hv.c:399
VOID HvSetNmiWindowExiting(BOOLEAN Set)
Set NMI-window exiting.
Definition Hv.c:758
VOID HvSetMovToCr3Vmexit(VIRTUAL_MACHINE_STATE *VCpu, BOOLEAN Set)
Set vm-exit for mov-to-cr3.
Definition Hv.c:602
VOID HvSetLoadGuestIa32LbrCtl(VIRTUAL_MACHINE_STATE *VCpu, BOOLEAN Set)
Set LOAD GUEST IA32_LBR_CTL on Vm-entry controls.
Definition Hv.c:412
VOID HvSetInterruptibilityState(UINT64 InterruptibilityState)
Set guest's interruptibility state.
Definition Hv.c:1282
VOID HvInjectPendingExternalInterrupts(VIRTUAL_MACHINE_STATE *VCpu)
Inject pending external interrupts.
Definition Hv.c:1295
UINT64 HvGetPendingDebugExceptions()
Get the guest state of pending debug exceptions.
Definition Hv.c:1500
VOID HvSetExceptionBitmap(VIRTUAL_MACHINE_STATE *VCpu, UINT32 IdtIndex)
Set exception bitmap in VMCS.
Definition Hv.c:1069
UINT64 HvGetGuestIa32LbrCtl()
Get the guest state of IA32_LBR_CTL.
Definition Hv.c:1543
VOID HvSetRflags(UINT64 Rflags)
Set guest's RFLAGS.
Definition Hv.c:1213
VOID HvSetMonitorTrapFlag(BOOLEAN Set)
Set or unset the monitor trap flags.
Definition Hv.c:345
VOID HvSetRflagTrapFlag(BOOLEAN Set)
Set the rflag's trap flag.
Definition Hv.c:377
BOOLEAN HvCheckCpuSupportForLoadAndClearGuestIa32LbrCtlControls()
Check if CPU support load and clear guest IA32_LBR_CTL controls on VM-entry and VM-exit.
Definition Hv.c:1692
UINT16 HvGetCsSelector()
Read CS selector.
Definition Hv.c:1178
_In_ UINT16 Selector
Definition Segmentation.h:50
struct _VMM_CALLBACKS VMM_CALLBACKS
Prototype of each function needed by VMM module.
RequestedActionOfThePacket Value(0x1) 00000000