HyperDbg Debugger
Loading...
Searching...
No Matches
CrossVmexits.c File Reference

The functions for passing vm-exits in vmx root. More...

#include "pch.h"

Functions

VOID VmxHandleXsetbv (VIRTUAL_MACHINE_STATE *VCpu)
 Handling XSETBV Instruction vm-exits.
 
VOID VmxHandleVmxPreemptionTimerVmexit (VIRTUAL_MACHINE_STATE *VCpu)
 Handling VMX Preemption Timer vm-exits.
 
VOID VmxHandleTripleFaults (VIRTUAL_MACHINE_STATE *VCpu)
 Handling triple fault VM-exits.
 

Detailed Description

The functions for passing vm-exits in vmx root.

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
0.1
Date
2020-06-14

Function Documentation

◆ VmxHandleTripleFaults()

VOID VmxHandleTripleFaults ( VIRTUAL_MACHINE_STATE * VCpu)

Handling triple fault VM-exits.

Parameters
VCpuThe virtual processor's state
Returns
VOID
51{
52 LogError("Err, triple fault error occurred!");
53
54 //
55 // This error cannot be recovered, produce debug results
56 //
58
59 //
60 // We won't further continue after this error
61 //
62 DbgBreakPoint();
63}
#define LogError(format,...)
Log in the case of error.
Definition HyperDbgHyperLogIntrinsics.h:113
VOID CommonWriteDebugInformation(VIRTUAL_MACHINE_STATE *VCpu)
Produce debug information from unrecoverable bugs.
Definition Common.c:149

◆ VmxHandleVmxPreemptionTimerVmexit()

VOID VmxHandleVmxPreemptionTimerVmexit ( VIRTUAL_MACHINE_STATE * VCpu)

Handling VMX Preemption Timer vm-exits.

Parameters
VCpuThe virtual processor's state
Returns
VOID
34{
35 LogError("Why vm-exit for VMX preemption timer happened?");
36
37 //
38 // Not increase the RIP by default
39 //
41}
VOID HvSuppressRipIncrement(VIRTUAL_MACHINE_STATE *VCpu)
Suppress the incrementation of RIP.
Definition Hv.c:324

◆ VmxHandleXsetbv()

VOID VmxHandleXsetbv ( VIRTUAL_MACHINE_STATE * VCpu)

Handling XSETBV Instruction vm-exits.

Parameters
VCpu
Returns
VOID
22{
23 _xsetbv(VCpu->Regs->rcx & 0xffffffff, VCpu->Regs->rdx << 32 | VCpu->Regs->rax);
24}
GUEST_REGS * Regs
Definition State.h:305
UINT64 rax
Definition BasicTypes.h:75
UINT64 rcx
Definition BasicTypes.h:76
UINT64 rdx
Definition BasicTypes.h:77