HyperDbg Debugger
Loading...
Searching...
No Matches
CrossVmcalls.h File Reference

Headers relating to cross (standalone) VMCALLs. More...

Go to the source code of this file.

Functions

UINT64 CrossVmcallGetDebugctlVmcallOnTargetCore ()
 Get the guest state of IA32_DEBUGCTL on the target core from VMCS using VMCALL.
UINT64 CrossVmcallGetGuestIa32LbrCtlVmcallOnTargetCore ()
 Get the guest state of IA32_LBR_CTL on the target core from VMCS using VMCALL.
VOID CrossVmcallSetDebugctlVmcallOnTargetCore (UINT64 Value)
 Set the guest state of IA32_DEBUGCTL on the target core from VMCS using VMCALL.
VOID CrossVmcallSetGuestIa32LbrCtlVmcallOnTargetCore (UINT64 Value)
 Set the guest state of IA32_LBR_CTL on the target core from VMCS using VMCALL.
VOID CrossVmcallSetLbrSelectVmcallOnTargetCore (UINT64 FilterOptions)
 Set the guest state of MSR_LEGACY_LBR_SELECT on the target core from VMCS using VMCALL.
VOID CrossVmcallSetLoadDebugControlsVmcallOnTargetCore (BOOLEAN Set)
 Set LOAD DEBUG CONTROLS on Vm-entry controls on the target core from VMCS using VMCALL.
VOID CrossVmcallSetLoadGuestIa32LbrCtlVmcallOnTargetCore (BOOLEAN Set)
 Set CLEAR GUEST IA32_LBR_CTL on Vm-entry controls on the target core from VMCS using VMCALL.
VOID CrossVmcallSetSaveDebugControlsVmcallOnTargetCore (BOOLEAN Set)
 Set SAVE DEBUG CONTROLS on Vm-exit controls on the target core from VMCS using VMCALL.
VOID CrossVmcallSetClearGuestIa32LbrCtlVmcallOnTargetCore (BOOLEAN Set)
 Set CLEAR GUEST IA32_LBR_CTL on Vm-exit controls on the target core from VMCS using VMCALL.

Detailed Description

Headers relating to cross (standalone) VMCALLs.

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
0.19
Date
2026-04-14

Function Documentation

◆ CrossVmcallGetDebugctlVmcallOnTargetCore()

UINT64 CrossVmcallGetDebugctlVmcallOnTargetCore ( )

Get the guest state of IA32_DEBUGCTL on the target core from VMCS using VMCALL.

Returns
UINT64
22{
23 UINT64 DebugctlValue;
25 return DebugctlValue;
26}
NTSTATUS AsmVmxVmcall(UINT64 VmcallNumber, UINT64 OptionalParam1, UINT64 OptionalParam2, UINT64 OptionalParam3)
Request Vmcall.
#define VMCALL_GET_VMCS_DEBUGCTL
VMCALL to get IA32_DEBUGCTL on VMCS.
Definition Vmcall.h:327
#define NULL64_ZERO
Definition BasicTypes.h:111

◆ CrossVmcallGetGuestIa32LbrCtlVmcallOnTargetCore()

UINT64 CrossVmcallGetGuestIa32LbrCtlVmcallOnTargetCore ( )

Get the guest state of IA32_LBR_CTL on the target core from VMCS using VMCALL.

Returns
UINT64
35{
36 UINT64 GuestIa32LbrCtlValue;
37 AsmVmxVmcall(VMCALL_GET_GUEST_IA32_LBR_CTL, (UINT64)&GuestIa32LbrCtlValue, NULL64_ZERO, NULL64_ZERO);
38 return GuestIa32LbrCtlValue;
39}
#define VMCALL_GET_GUEST_IA32_LBR_CTL
VMCALL to get the guest state of IA32_LBR_CTL on VMCS.
Definition Vmcall.h:345

◆ CrossVmcallSetClearGuestIa32LbrCtlVmcallOnTargetCore()

VOID CrossVmcallSetClearGuestIa32LbrCtlVmcallOnTargetCore ( BOOLEAN Set)

Set CLEAR GUEST IA32_LBR_CTL on Vm-exit controls on the target core from VMCS using VMCALL.

Parameters
SetSet or unset
Returns
VOID
146{
147 if (Set)
148 {
150 }
151 else
152 {
154 }
155}
#define VMCALL_SET_CLEAR_GUEST_IA32_LBR_CTL
VMCALL to set CLEAR GUEST IA32_LBR_CTL on VM-exit controls.
Definition Vmcall.h:369
#define VMCALL_UNSET_CLEAR_GUEST_IA32_LBR_CTL
VMCALL to unset CLEAR GUEST IA32_LBR_CTL on VM-exit controls.
Definition Vmcall.h:375

◆ CrossVmcallSetDebugctlVmcallOnTargetCore()

VOID CrossVmcallSetDebugctlVmcallOnTargetCore ( UINT64 Value)

Set the guest state of IA32_DEBUGCTL on the target core from VMCS using VMCALL.

Parameters
Value
Returns
VOID
49{
51}
#define VMCALL_SET_VMCS_DEBUGCTL
VMCALL to set IA32_DEBUGCTL on VMCS.
Definition Vmcall.h:333
RequestedActionOfThePacket Value(0x1) 00000000

◆ CrossVmcallSetGuestIa32LbrCtlVmcallOnTargetCore()

VOID CrossVmcallSetGuestIa32LbrCtlVmcallOnTargetCore ( UINT64 Value)

Set the guest state of IA32_LBR_CTL on the target core from VMCS using VMCALL.

Parameters
Value
Returns
VOID
61{
63}
#define VMCALL_SET_GUEST_IA32_LBR_CTL
VMCALL to set the guest state of IA32_LBR_CTL on VMCS.
Definition Vmcall.h:351

◆ CrossVmcallSetLbrSelectVmcallOnTargetCore()

VOID CrossVmcallSetLbrSelectVmcallOnTargetCore ( UINT64 FilterOptions)

Set the guest state of MSR_LEGACY_LBR_SELECT on the target core from VMCS using VMCALL.

Parameters
FilterOptions
Returns
VOID
73{
75}
#define VMCALL_SET_MSR_LBR_SELECT
VMCALL to set MSR_LEGACY_LBR_SELECT using WRMSR.
Definition Vmcall.h:339

◆ CrossVmcallSetLoadDebugControlsVmcallOnTargetCore()

VOID CrossVmcallSetLoadDebugControlsVmcallOnTargetCore ( BOOLEAN Set)

Set LOAD DEBUG CONTROLS on Vm-entry controls on the target core from VMCS using VMCALL.

Parameters
SetSet or unset
Returns
VOID
86{
87 if (Set)
88 {
90 }
91 else
92 {
94 }
95}
#define VMCALL_SET_VM_ENTRY_LOAD_DEBUG_CONTROLS
VMCALL to set VM-entry LOAD DEBUG CONTROLS.
Definition Vmcall.h:199
#define VMCALL_UNSET_VM_ENTRY_LOAD_DEBUG_CONTROLS
VMCALL to unset VM-entry LOAD DEBUG CONTROLS.
Definition Vmcall.h:207

◆ CrossVmcallSetLoadGuestIa32LbrCtlVmcallOnTargetCore()

VOID CrossVmcallSetLoadGuestIa32LbrCtlVmcallOnTargetCore ( BOOLEAN Set)

Set CLEAR GUEST IA32_LBR_CTL on Vm-entry controls on the target core from VMCS using VMCALL.

Parameters
SetSet or unset
Returns
VOID
106{
107 if (Set)
108 {
110 }
111 else
112 {
114 }
115}
#define VMCALL_UNSET_VM_ENTRY_LOAD_GUEST_IA32_LBR_CTL
VMCALL to unset LOAD GUEST IA32_LBR_CTL on VM-entry controls.
Definition Vmcall.h:363
#define VMCALL_SET_VM_ENTRY_LOAD_GUEST_IA32_LBR_CTL
VMCALL to set LOAD GUEST IA32_LBR_CTL on VM-entry controls.
Definition Vmcall.h:357

◆ CrossVmcallSetSaveDebugControlsVmcallOnTargetCore()

VOID CrossVmcallSetSaveDebugControlsVmcallOnTargetCore ( BOOLEAN Set)

Set SAVE DEBUG CONTROLS on Vm-exit controls on the target core from VMCS using VMCALL.

Parameters
SetSet or unset
Returns
VOID
126{
127 if (Set)
128 {
130 }
131 else
132 {
134 }
135}
#define VMCALL_SET_VM_EXIT_SAVE_DEBUG_CONTROLS
VMCALL to set VM-exit SAVE DEBUG CONTROLS.
Definition Vmcall.h:215
#define VMCALL_UNSET_VM_EXIT_SAVE_DEBUG_CONTROLS
VMCALL to unset VM-exit SAVE DEBUG CONTROLS.
Definition Vmcall.h:223