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

Direct VMCALL routines. More...

#include "pch.h"

Functions

NTSTATUS DirectVmcallTest (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for test direct VMCALL
 
NTSTATUS DirectVmcallPerformVmcall (UINT32 CoreId, UINT64 VmcallNumber, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for performing a direct VMCALL
 
NTSTATUS DirectVmcallChangeMsrBitmapRead (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for changing MSR Bitmap (Read)
 
NTSTATUS DirectVmcallChangeMsrBitmapWrite (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for changing MSR Bitmap (Write)
 
NTSTATUS DirectVmcallChangeIoBitmap (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for changing IO Bitmap
 
NTSTATUS DirectVmcallEnableRdpmcExiting (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for enabling rdpmc exiting
 
NTSTATUS DirectVmcallEnableRdtscpExiting (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for enabling rdtsc/rdtscp exiting
 
NTSTATUS DirectVmcallEnableMov2DebugRegsExiting (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for enabling mov to debug registers exiting
 
NTSTATUS DirectVmcallSetExceptionBitmap (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for setting exception bitmap
 
NTSTATUS DirectVmcallEnableExternalInterruptExiting (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for enabling external interrupt exiting
 
NTSTATUS DirectVmcallEnableMovToCrExiting (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for enabling mov to CR exiting
 
NTSTATUS DirectVmcallEnableEferSyscall (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for enabling syscall hook using EFER SCE bit
 
NTSTATUS DirectVmcallSetHiddenBreakpointHook (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for putting hidden breakpoints (using EPT)
 
NTSTATUS DirectVmcallInvalidateEptAllContexts (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for invalidating EPT (All Contexts)
 
NTSTATUS DirectVmcallInvalidateSingleContext (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for invalidating EPT (A Single Context)
 
NTSTATUS DirectVmcallUnsetExceptionBitmap (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for unsetting exception bitmap on VMCS
 
NTSTATUS DirectVmcallUnhookSinglePage (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for restoring a single EPT entry and invalidating EPT cache
 
NTSTATUS DirectVmcallSetDisableExternalInterruptExitingOnlyOnClearingInterruptEvents (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for disabling external interrupt exiting only to clear !interrupt commands
 
NTSTATUS DirectVmcallResetMsrBitmapRead (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for resetting MSR Bitmap Read
 
NTSTATUS DirectVmcallResetMsrBitmapWrite (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for resetting MSR Bitmap Write
 
NTSTATUS DirectVmcallResetExceptionBitmapOnlyOnClearingExceptionEvents (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for resetting exception bitmap on VMCS
 
NTSTATUS DirectVmcallResetIoBitmap (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for resetting I/O Bitmaps (A & B)
 
NTSTATUS DirectVmcallDisableRdtscExitingForClearingTscEvents (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for clearing rdtsc exiting bit ONLY in the case of disabling the events for !tsc command
 
NTSTATUS DirectVmcallDisableRdpmcExiting (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for disabling rdpmc exiting in primary cpu-based controls
 
NTSTATUS DirectVmcallDisableEferSyscallEvents (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for disabling syscall hook using EFER SCE bit
 
NTSTATUS DirectVmcallDisableMov2DrExitingForClearingDrEvents (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for clearing mov 2 hw dr exiting bit ONLY in the case of disabling the events for !dr command
 
NTSTATUS DirectVmcallDisableMov2CrExitingForClearingCrEvents (UINT32 CoreId, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
 routines for clearing mov 2 cr exiting bit ONLY in the case of disabling the events for !crwrite command
 

Detailed Description

Direct VMCALL routines.

Author
Sina Karvandi (sina@.nosp@m.hype.nosp@m.rdbg..nosp@m.org)
Version
0.7
Date
2023-10-19

Function Documentation

◆ DirectVmcallChangeIoBitmap()

NTSTATUS DirectVmcallChangeIoBitmap ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for changing IO Bitmap

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
105{
106 //
107 // Call the VMCALL handler (directly)
108 //
109 return VmxVmcallDirectVmcallHandler(&g_GuestState[CoreId], VMCALL_CHANGE_IO_BITMAP, DirectVmcallOptions);
110}
VIRTUAL_MACHINE_STATE * g_GuestState
Save the state and variables related to virtualization on each to logical core.
Definition GlobalVariables.h:38
NTSTATUS VmxVmcallDirectVmcallHandler(VIRTUAL_MACHINE_STATE *VCpu, UINT64 VmcallNumber, DIRECT_VMCALL_PARAMETERS *DirectVmcallOptions)
Direct Vmcall Handler.
Definition Vmcall.c:109
#define VMCALL_CHANGE_IO_BITMAP
VMCALL to change I/O Bitmaps (A & B)
Definition Vmcall.h:118

◆ DirectVmcallChangeMsrBitmapRead()

NTSTATUS DirectVmcallChangeMsrBitmapRead ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for changing MSR Bitmap (Read)

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
67{
68 //
69 // Call the VMCALL handler (directly)
70 //
71 return VmxVmcallDirectVmcallHandler(&g_GuestState[CoreId], VMCALL_CHANGE_MSR_BITMAP_READ, DirectVmcallOptions);
72}
#define VMCALL_CHANGE_MSR_BITMAP_READ
VMCALL to change MSR Bitmap Read.
Definition Vmcall.h:76

◆ DirectVmcallChangeMsrBitmapWrite()

NTSTATUS DirectVmcallChangeMsrBitmapWrite ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for changing MSR Bitmap (Write)

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
86{
87 //
88 // Call the VMCALL handler (directly)
89 //
91}
#define VMCALL_CHANGE_MSR_BITMAP_WRITE
VMCALL to change MSR Bitmap Write.
Definition Vmcall.h:82

◆ DirectVmcallDisableEferSyscallEvents()

NTSTATUS DirectVmcallDisableEferSyscallEvents ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for disabling syscall hook using EFER SCE bit

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
486{
487 //
488 // Call the VMCALL handler (directly)
489 //
491}
#define VMCALL_DISABLE_SYSCALL_HOOK_EFER
VMCALL to disable syscall hook using EFER SCE bit.
Definition Vmcall.h:70

◆ DirectVmcallDisableMov2CrExitingForClearingCrEvents()

NTSTATUS DirectVmcallDisableMov2CrExitingForClearingCrEvents ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for clearing mov 2 cr exiting bit ONLY in the case of disabling the events for !crwrite command

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
526{
527 //
528 // Call the VMCALL handler (directly)
529 //
531}
#define VMCALL_DISABLE_MOV_TO_CR_EXITING_ONLY_FOR_CR_EVENTS
VMCALL to clear mov 2 cr exiting bit ONLY in the case of disabling the events for !...
Definition Vmcall.h:268

◆ DirectVmcallDisableMov2DrExitingForClearingDrEvents()

NTSTATUS DirectVmcallDisableMov2DrExitingForClearingDrEvents ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for clearing mov 2 hw dr exiting bit ONLY in the case of disabling the events for !dr command

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
506{
507 //
508 // Call the VMCALL handler (directly)
509 //
511}
#define VMCALL_DISABLE_MOV_TO_HW_DR_EXITING_ONLY_FOR_DR_EVENTS
VMCALL to clear mov 2 hw dr exiting bit ONLY in the case of disabling the events for !...
Definition Vmcall.h:250

◆ DirectVmcallDisableRdpmcExiting()

NTSTATUS DirectVmcallDisableRdpmcExiting ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for disabling rdpmc exiting in primary cpu-based controls

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
467{
468 //
469 // Call the VMCALL handler (directly)
470 //
471 return VmxVmcallDirectVmcallHandler(&g_GuestState[CoreId], VMCALL_UNSET_RDPMC_EXITING, DirectVmcallOptions);
472}
#define VMCALL_UNSET_RDPMC_EXITING
VMCALL to disable rdpmc exiting in primary cpu-based controls.
Definition Vmcall.h:142

◆ DirectVmcallDisableRdtscExitingForClearingTscEvents()

NTSTATUS DirectVmcallDisableRdtscExitingForClearingTscEvents ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for clearing rdtsc exiting bit ONLY in the case of disabling the events for !tsc command

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
448{
449 //
450 // Call the VMCALL handler (directly)
451 //
453}
#define VMCALL_DISABLE_RDTSC_EXITING_ONLY_FOR_TSC_EVENTS
VMCALL to clear rdtsc exiting bit ONLY in the case of disabling the events for !tsc command.
Definition Vmcall.h:243

◆ DirectVmcallEnableEferSyscall()

NTSTATUS DirectVmcallEnableEferSyscall ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for enabling syscall hook using EFER SCE bit

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
238{
239 //
240 // Call the VMCALL handler (directly)
241 //
243}
#define VMCALL_ENABLE_SYSCALL_HOOK_EFER
VMCALL to enable syscall hook using EFER SCE bit.
Definition Vmcall.h:64

◆ DirectVmcallEnableExternalInterruptExiting()

NTSTATUS DirectVmcallEnableExternalInterruptExiting ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for enabling external interrupt exiting

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
200{
201 //
202 // Call the VMCALL handler (directly)
203 //
205}
#define VMCALL_ENABLE_EXTERNAL_INTERRUPT_EXITING
VMCALL to enable external interrupt exiting.
Definition Vmcall.h:112

◆ DirectVmcallEnableMov2DebugRegsExiting()

NTSTATUS DirectVmcallEnableMov2DebugRegsExiting ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for enabling mov to debug registers exiting

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
162{
163 //
164 // Call the VMCALL handler (directly)
165 //
167}
#define VMCALL_ENABLE_MOV_TO_DEBUG_REGS_EXITING
VMCALL to enable mov to debug registers exiting.
Definition Vmcall.h:106

◆ DirectVmcallEnableMovToCrExiting()

NTSTATUS DirectVmcallEnableMovToCrExiting ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for enabling mov to CR exiting

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
219{
220 //
221 // Call the VMCALL handler (directly)
222 //
224}
#define VMCALL_ENABLE_MOV_TO_CONTROL_REGS_EXITING
VMCALL to enable mov to CR exiting.
Definition Vmcall.h:255

◆ DirectVmcallEnableRdpmcExiting()

NTSTATUS DirectVmcallEnableRdpmcExiting ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for enabling rdpmc exiting

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
124{
125 //
126 // Call the VMCALL handler (directly)
127 //
128 return VmxVmcallDirectVmcallHandler(&g_GuestState[CoreId], VMCALL_SET_RDPMC_EXITING, DirectVmcallOptions);
129}
#define VMCALL_SET_RDPMC_EXITING
VMCALL to enable rdpmc exiting in primary cpu-based controls.
Definition Vmcall.h:94

◆ DirectVmcallEnableRdtscpExiting()

NTSTATUS DirectVmcallEnableRdtscpExiting ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for enabling rdtsc/rdtscp exiting

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
143{
144 //
145 // Call the VMCALL handler (directly)
146 //
147 return VmxVmcallDirectVmcallHandler(&g_GuestState[CoreId], VMCALL_SET_RDTSC_EXITING, DirectVmcallOptions);
148}
#define VMCALL_SET_RDTSC_EXITING
VMCALL to enable rdtsc/rdtscp exiting in primary cpu-based controls.
Definition Vmcall.h:88

◆ DirectVmcallInvalidateEptAllContexts()

NTSTATUS DirectVmcallInvalidateEptAllContexts ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for invalidating EPT (All Contexts)

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
276{
277 //
278 // Call the VMCALL handler (directly)
279 //
280 return VmxVmcallDirectVmcallHandler(&g_GuestState[CoreId], VMCALL_INVEPT_ALL_CONTEXTS, DirectVmcallOptions);
281}
#define VMCALL_INVEPT_ALL_CONTEXTS
VMCALL to invalidate EPT (All Contexts)
Definition Vmcall.h:40

◆ DirectVmcallInvalidateSingleContext()

NTSTATUS DirectVmcallInvalidateSingleContext ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for invalidating EPT (A Single Context)

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
295{
296 //
297 // Call the VMCALL handler (directly)
298 //
299 return VmxVmcallDirectVmcallHandler(&g_GuestState[CoreId], VMCALL_INVEPT_SINGLE_CONTEXT, DirectVmcallOptions);
300}
#define VMCALL_INVEPT_SINGLE_CONTEXT
VMCALL to invalidate EPT (A Single Context)
Definition Vmcall.h:46

◆ DirectVmcallPerformVmcall()

NTSTATUS DirectVmcallPerformVmcall ( UINT32 CoreId,
UINT64 VmcallNumber,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for performing a direct VMCALL

Should be called from VMX root-mode

Parameters
CoreId
VmcallNumber
DirectVmcallOptions
Returns
NTSTATUS
48{
49 //
50 // Call the VMCALL handler (directly)
51 //
52 return VmxVmcallDirectVmcallHandler(&g_GuestState[CoreId], VmcallNumber, DirectVmcallOptions);
53}

◆ DirectVmcallResetExceptionBitmapOnlyOnClearingExceptionEvents()

NTSTATUS DirectVmcallResetExceptionBitmapOnlyOnClearingExceptionEvents ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for resetting exception bitmap on VMCS

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
409{
410 //
411 // Call the VMCALL handler (directly)
412 //
414}
#define VMCALL_RESET_EXCEPTION_BITMAP_ONLY_ON_CLEARING_EXCEPTION_EVENTS
VMCALL to reset exception bitmap on VMCS.
Definition Vmcall.h:168

◆ DirectVmcallResetIoBitmap()

NTSTATUS DirectVmcallResetIoBitmap ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for resetting I/O Bitmaps (A & B)

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
428{
429 //
430 // Call the VMCALL handler (directly)
431 //
432 return VmxVmcallDirectVmcallHandler(&g_GuestState[CoreId], VMCALL_RESET_IO_BITMAP, DirectVmcallOptions);
433}
#define VMCALL_RESET_IO_BITMAP
VMCALL to reset I/O Bitmaps (A & B)
Definition Vmcall.h:174

◆ DirectVmcallResetMsrBitmapRead()

NTSTATUS DirectVmcallResetMsrBitmapRead ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for resetting MSR Bitmap Read

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
371{
372 //
373 // Call the VMCALL handler (directly)
374 //
375 return VmxVmcallDirectVmcallHandler(&g_GuestState[CoreId], VMCALL_RESET_MSR_BITMAP_READ, DirectVmcallOptions);
376}
#define VMCALL_RESET_MSR_BITMAP_READ
VMCALL to reset MSR Bitmap Read.
Definition Vmcall.h:154

◆ DirectVmcallResetMsrBitmapWrite()

NTSTATUS DirectVmcallResetMsrBitmapWrite ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for resetting MSR Bitmap Write

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
390{
391 //
392 // Call the VMCALL handler (directly)
393 //
394 return VmxVmcallDirectVmcallHandler(&g_GuestState[CoreId], VMCALL_RESET_MSR_BITMAP_WRITE, DirectVmcallOptions);
395}
#define VMCALL_RESET_MSR_BITMAP_WRITE
VMCALL to reset MSR Bitmap Write.
Definition Vmcall.h:160

◆ DirectVmcallSetDisableExternalInterruptExitingOnlyOnClearingInterruptEvents()

NTSTATUS DirectVmcallSetDisableExternalInterruptExitingOnlyOnClearingInterruptEvents ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for disabling external interrupt exiting only to clear !interrupt commands

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
352{
353 //
354 // Call the VMCALL handler (directly)
355 //
357}
#define VMCALL_DISABLE_EXTERNAL_INTERRUPT_EXITING_ONLY_TO_CLEAR_INTERRUPT_COMMANDS
VMCALL to disable external interrupt exiting only to clear !interrupt commands.
Definition Vmcall.h:136

◆ DirectVmcallSetExceptionBitmap()

NTSTATUS DirectVmcallSetExceptionBitmap ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for setting exception bitmap

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
181{
182 //
183 // Call the VMCALL handler (directly)
184 //
185 return VmxVmcallDirectVmcallHandler(&g_GuestState[CoreId], VMCALL_SET_EXCEPTION_BITMAP, DirectVmcallOptions);
186}
#define VMCALL_SET_EXCEPTION_BITMAP
VMCALL to set exception bitmap on VMCS.
Definition Vmcall.h:100

◆ DirectVmcallSetHiddenBreakpointHook()

NTSTATUS DirectVmcallSetHiddenBreakpointHook ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for putting hidden breakpoints (using EPT)

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
257{
258 //
259 // Call the VMCALL handler (directly)
260 //
262}
#define VMCALL_SET_HIDDEN_CC_BREAKPOINT
VMCALL to put hidden breakpoints (using EPT)
Definition Vmcall.h:124

◆ DirectVmcallTest()

NTSTATUS DirectVmcallTest ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for test direct VMCALL

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
27{
28 //
29 // Call the VMCALL handler (directly)
30 //
31 return VmxVmcallDirectVmcallHandler(&g_GuestState[CoreId], VMCALL_TEST, DirectVmcallOptions);
32}
#define VMCALL_TEST
VMCALL to test hypervisor.
Definition Vmcall.h:22

◆ DirectVmcallUnhookSinglePage()

NTSTATUS DirectVmcallUnhookSinglePage ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for restoring a single EPT entry and invalidating EPT cache

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
333{
334 //
335 // Call the VMCALL handler (directly)
336 //
337 return VmxVmcallDirectVmcallHandler(&g_GuestState[CoreId], VMCALL_UNHOOK_SINGLE_PAGE, DirectVmcallOptions);
338}
#define VMCALL_UNHOOK_SINGLE_PAGE
VMCALL to restore a single EPT entry and invalidate EPT cache.
Definition Vmcall.h:58

◆ DirectVmcallUnsetExceptionBitmap()

NTSTATUS DirectVmcallUnsetExceptionBitmap ( UINT32 CoreId,
DIRECT_VMCALL_PARAMETERS * DirectVmcallOptions )

routines for unsetting exception bitmap on VMCS

Should be called from VMX root-mode

Parameters
CoreId
DirectVmcallOptions
Returns
NTSTATUS
314{
315 //
316 // Call the VMCALL handler (directly)
317 //
318 return VmxVmcallDirectVmcallHandler(&g_GuestState[CoreId], VMCALL_UNSET_EXCEPTION_BITMAP, DirectVmcallOptions);
319}
#define VMCALL_UNSET_EXCEPTION_BITMAP
VMCALL to unset exception bitmap on VMCS.
Definition Vmcall.h:192