HyperDbg Debugger
Loading...
Searching...
No Matches
Vmcall.h
Go to the documentation of this file.
1
12#pragma once
13
15// Constants //
17
22#define VMCALL_TEST 0x00000001
23
28#define VMCALL_VMXOFF 0x00000002
29
34#define VMCALL_CHANGE_PAGE_ATTRIB 0x00000003
35
40#define VMCALL_INVEPT_ALL_CONTEXTS 0x00000004
41
46#define VMCALL_INVEPT_SINGLE_CONTEXT 0x00000005
47
52#define VMCALL_UNHOOK_ALL_PAGES 0x00000006
53
58#define VMCALL_UNHOOK_SINGLE_PAGE 0x00000007
59
64#define VMCALL_ENABLE_SYSCALL_HOOK_EFER 0x00000008
65
70#define VMCALL_DISABLE_SYSCALL_HOOK_EFER 0x00000009
71
76#define VMCALL_CHANGE_MSR_BITMAP_READ 0x0000000A
77
82#define VMCALL_CHANGE_MSR_BITMAP_WRITE 0x0000000B
83
88#define VMCALL_SET_RDTSC_EXITING 0x0000000C
89
94#define VMCALL_SET_RDPMC_EXITING 0x0000000D
95
100#define VMCALL_SET_EXCEPTION_BITMAP 0x0000000E
101
106#define VMCALL_ENABLE_MOV_TO_DEBUG_REGS_EXITING 0x0000000F
107
112#define VMCALL_ENABLE_EXTERNAL_INTERRUPT_EXITING 0x00000010
113
118#define VMCALL_CHANGE_IO_BITMAP 0x00000011
119
124#define VMCALL_SET_HIDDEN_CC_BREAKPOINT 0x00000012
125
130#define VMCALL_UNSET_RDTSC_EXITING 0x00000013
131
136#define VMCALL_DISABLE_EXTERNAL_INTERRUPT_EXITING_ONLY_TO_CLEAR_INTERRUPT_COMMANDS 0x00000014
137
142#define VMCALL_UNSET_RDPMC_EXITING 0x00000015
143
148#define VMCALL_DISABLE_MOV_TO_DEBUG_REGS_EXITING 0x00000016
149
154#define VMCALL_RESET_MSR_BITMAP_READ 0x00000017
155
160#define VMCALL_RESET_MSR_BITMAP_WRITE 0x00000018
161
168#define VMCALL_RESET_EXCEPTION_BITMAP_ONLY_ON_CLEARING_EXCEPTION_EVENTS 0x00000019
169
174#define VMCALL_RESET_IO_BITMAP 0x0000001A
175
180#define VMCALL_ENABLE_MOV_TO_CR3_EXITING 0x0000001B
181
186#define VMCALL_DISABLE_MOV_TO_CR3_EXITING 0x0000001C
187
192#define VMCALL_UNSET_EXCEPTION_BITMAP 0x0000001D
193
200#define VMCALL_SET_VM_ENTRY_LOAD_DEBUG_CONTROLS 0x0000001E
201
208#define VMCALL_UNSET_VM_ENTRY_LOAD_DEBUG_CONTROLS 0x0000001F
209
216#define VMCALL_SET_VM_EXIT_SAVE_DEBUG_CONTROLS 0x00000020
217
224#define VMCALL_UNSET_VM_EXIT_SAVE_DEBUG_CONTROLS 0x00000021
225
230#define VMCALL_SET_VM_EXIT_ON_NMIS 0x00000022
231
236#define VMCALL_UNSET_VM_EXIT_ON_NMIS 0x00000023
237
243#define VMCALL_DISABLE_RDTSC_EXITING_ONLY_FOR_TSC_EVENTS 0x00000024
244
250#define VMCALL_DISABLE_MOV_TO_HW_DR_EXITING_ONLY_FOR_DR_EVENTS 0x00000025
251
255#define VMCALL_ENABLE_MOV_TO_CONTROL_REGS_EXITING 0x00000026
256
261#define VMCALL_DISABLE_MOV_TO_CONTROL_REGS_EXITING 0x00000027
262
268#define VMCALL_DISABLE_MOV_TO_CR_EXITING_ONLY_FOR_CR_EVENTS 0x00000028
269
274#define VMCALL_ENABLE_DIRTY_LOGGING_MECHANISM 0x00000029
275
280#define VMCALL_DISABLE_DIRTY_LOGGING_MECHANISM 0x0000002a
281
286#define VMCALL_CHANGE_TO_MBEC_SUPPORTED_EPTP 0x0000002b
287
292#define VMCALL_RESTORE_TO_NORMAL_EPTP 0x0000002c
293
298#define VMCALL_DISABLE_OR_ENABLE_MBEC 0x0000002d
299
301// Functions //
303
304// ----------------------------------------------------------------------------
305// Private Interfaces
306//
307
308static NTSTATUS
309VmxHypervVmcallHandler(_Inout_ VIRTUAL_MACHINE_STATE * VCpu, _Inout_ PGUEST_REGS GuestRegs);
310
317NTSTATUS
319
329NTSTATUS
331 UINT64 VmcallNumber,
332 DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions);
333
344NTSTATUS
346 _In_ UINT64 VmcallNumber,
347 _In_ UINT64 OptionalParam1,
348 _In_ UINT64 OptionalParam2,
349 _In_ UINT64 OptionalParam3);
350
359NTSTATUS
360VmcallTest(_In_ UINT64 Param1,
361 _In_ UINT64 Param2,
362 _In_ UINT64 Param3);
unsigned __int64 UINT64
Definition BasicTypes.h:21
_Use_decl_annotations_ NTSTATUS VmxHypervVmcallHandler(VIRTUAL_MACHINE_STATE *VCpu, PGUEST_REGS GuestRegs)
Handle vm-exits of VMCALLs.
Definition Vmcall.c:24
NTSTATUS VmxVmcallDirectVmcallHandler(VIRTUAL_MACHINE_STATE *VCpu, UINT64 VmcallNumber, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
Direct Vmcall Handler.
Definition Vmcall.c:109
NTSTATUS VmcallTest(_In_ UINT64 Param1, _In_ UINT64 Param2, _In_ UINT64 Param3)
Test function which shows a message to test a successful VMCALL.
Definition Vmcall.c:481
NTSTATUS VmxVmcallHandler(_Inout_ VIRTUAL_MACHINE_STATE *VCpu, _In_ UINT64 VmcallNumber, _In_ UINT64 OptionalParam1, _In_ UINT64 OptionalParam2, _In_ UINT64 OptionalParam3)
Main handler for VMCALLs.
NTSTATUS VmxHandleVmcallVmExit(_Inout_ VIRTUAL_MACHINE_STATE *VCpu)
Handle vm-exits of VMCALLs.
Used for sending direct VMCALLs on the VMX root-mode.
Definition DataTypes.h:294
The status of each core after and before VMX.
Definition State.h:290
Definition BasicTypes.h:70