Bitdefender Hypervisor Memory Introspection
glue.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020 Bitdefender
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 #ifndef _GLUE_H_
6 #define _GLUE_H_
7 
8 #include "introtypes.h"
9 #include "memtags.h"
10 
11 #ifndef INT_COMPILER_MSVC
12 #include <stdlib.h>
13 #include <string.h>
14 #endif
15 
16 extern DWORD gCurLogBuffer;
17 
20 
21 extern IG_LOG_LEVEL gLogLevel;
22 
23 #ifdef INT_COMPILER_MSVC
24 #define INT_LOG(loglevel, fmt, ...) \
25  do { \
26  if ((loglevel) < gLogLevel) break; \
27  GlueTracePrint(__FILE__, __LINE__, (fmt), __VA_ARGS__); \
28  gCurLogBuffer = 0; \
29  } while (0)
30 #define NLOG(fmt, ...) \
31  do { \
32  GlueTracePrint(NULL, 0, (fmt), __VA_ARGS__); \
33  gCurLogBuffer = 0; \
34  } while (0)
35 #else
36 #define INT_LOG(loglevel, fmt, ...) \
37  do { \
38  if ((loglevel) < gLogLevel) break; \
39  GlueTracePrint(__FILENAME__, __LINE__, (fmt), ##__VA_ARGS__); \
40  gCurLogBuffer = 0; \
41  } while (0)
42 
43 #define NLOG(fmt, ...) \
44  do { \
45  GlueTracePrint(NULL, 0, (fmt), ##__VA_ARGS__); \
46  gCurLogBuffer = 0; \
47  } while (0)
48 #endif
49 
50 #ifdef INT_COMPILER_MSVC
51 #define TRACE(fmt, ...) INT_LOG(intLogLevelDebug, fmt, __VA_ARGS__)
52 #define INFO(fmt, ...) INT_LOG(intLogLevelInfo, fmt, __VA_ARGS__)
53 #define WARNING(fmt, ...) INT_LOG(intLogLevelWarning, fmt, __VA_ARGS__)
54 #define LOG(fmt, ...) INT_LOG(intLogLevelError, fmt, __VA_ARGS__)
55 #define ERROR(fmt, ...) INT_LOG(intLogLevelError, fmt, __VA_ARGS__)
56 #define CRITICAL(fmt, ...) INT_LOG(intLogLevelCritical, fmt, __VA_ARGS__)
57 #else
58 #define TRACE(fmt, ...) INT_LOG(intLogLevelDebug, fmt, ##__VA_ARGS__)
59 #define INFO(fmt, ...) INT_LOG(intLogLevelInfo, fmt, ##__VA_ARGS__)
60 #define WARNING(fmt, ...) INT_LOG(intLogLevelWarning, fmt, ##__VA_ARGS__)
61 #define LOG(fmt, ...) INT_LOG(intLogLevelError, fmt, ##__VA_ARGS__)
62 #define ERROR(fmt, ...) INT_LOG(intLogLevelError, fmt, ##__VA_ARGS__)
63 #define CRITICAL(fmt, ...) INT_LOG(intLogLevelCritical, fmt, ##__VA_ARGS__)
64 #endif
65 
66 #define INVALID_EPTP_INDEX 0xFFFFFFFF
67 
71 #define PHYS_MAP_FLG_NO_FASTMAP 0x80000000
72 
73 
74 void
76  void
77  );
78 
79 __nonnull() INTSTATUS
81  _In_ GLUE_IFACE const *GlueInterface,
82  _In_ UPPER_IFACE const *UpperInterface
83  );
84 
85 __nonnull((3)) INTSTATUS
87  _In_ DWORD InfoClass,
88  _In_opt_ void *InfoParam,
89  _When_(InfoClass == IG_QUERY_INFO_CLASS_SET_REGISTERS, _In_reads_bytes_(BufferLength))
90  _When_(InfoClass != IG_QUERY_INFO_CLASS_SET_REGISTERS, _Out_writes_bytes_(BufferLength))
91  void *Buffer,
92  _In_ DWORD BufferLength
93  );
94 
95 __nonnull() INTSTATUS
97  _In_ QWORD Gpa,
98  _Out_ QWORD *Hpa
99  );
100 
102 __nonnull() INTSTATUS
104  _In_ QWORD PhysAddress,
105  _In_ DWORD Length,
106  _In_ DWORD Flags,
107  _Outptr_result_bytebuffer_(Length) void **HostPtr
108  );
109 
110 __nonnull() INTSTATUS
112  _Inout_ _At_(*HostPtr, _Post_null_) void **HostPtr
113  );
114 
115 __nonnull() INTSTATUS
117  _Outptr_ void **FirstPageBase,
118  _Out_ DWORD *PagesCount,
119  _Outptr_ void **PtBase
120  );
121 
122 INTSTATUS
124  void
125  );
126 
127 INTSTATUS
129  void
130  );
131 
132 __nonnull() INTSTATUS
134  _In_ DWORD Msr,
135  _Out_ BOOLEAN *OldValue
136  );
137 
138 __nonnull() INTSTATUS
140  _In_ DWORD Msr,
141  _Out_ BOOLEAN *OldValue
142  );
143 
144 __nonnull() INTSTATUS
147  );
148 
149 INTSTATUS
151  void
152  );
153 
154 __nonnull() INTSTATUS
156  _In_ QWORD Gpa,
157  _Out_ IG_MEMTYPE *MemType
158  );
159 
160 INTSTATUS
162  _In_ DWORD Cr
163  );
164 
165 INTSTATUS
167  _In_ DWORD Cr
168  );
169 
170 __nonnull() INTSTATUS
173  );
174 
175 INTSTATUS
177  void
178  );
179 
180 __nonnull() INTSTATUS
183  );
184 
185 INTSTATUS
187  void
188  );
189 
190 __nonnull() INTSTATUS
193  );
194 
195 INTSTATUS
197  void
198  );
199 
200 __nonnull() INTSTATUS
203  );
204 
205 INTSTATUS
207  void
208  );
209 
210 __nonnull() INTSTATUS
212  _In_ DWORD EptIndex,
213  _In_ QWORD Gpa,
214  _Out_ BYTE *Read,
215  _Out_ BYTE *Write,
216  _Out_ BYTE *Execute
217  );
218 
219 INTSTATUS
221  _In_ DWORD EptIndex,
222  _In_ QWORD Gpa,
223  _In_ BYTE Read,
224  _In_ BYTE Write,
225  _In_ BYTE Execute
226  );
227 
228 __nonnull() INTSTATUS
230  _In_ QWORD Gpa,
231  _Out_ QWORD *Spp
232  );
233 
234 INTSTATUS
236  _In_ QWORD Gpa,
237  _In_ QWORD Spp
238  );
239 
240 BOOLEAN
242  void
243  );
244 
245 __nonnull() INTSTATUS
248  );
249 
250 INTSTATUS
252  void
253  );
254 
255 __nonnull() INTSTATUS
258  );
259 
260 INTSTATUS
262  void
263  );
264 
265 __nonnull() INTSTATUS
268  );
269 
270 INTSTATUS
272  void
273  );
274 
275 __nonnull() INTSTATUS
278  );
279 
280 INTSTATUS
282  void
283  );
284 
285 __nonnull() INTSTATUS
288  );
289 
290 INTSTATUS
292  void
293  );
294 
295 __nonnull() INTSTATUS
297  _Outptr_ void **SpinLock,
298  _In_z_ char *Name
299  );
300 
301 __nonnull() INTSTATUS
303  _Inout_ _At_(*SpinLock, _Post_null_) void **SpinLock
304  );
305 
306 _Acquires_lock_(SpinLock)
307 __nonnull() void
309  _In_ void *SpinLock
310  );
311 
312 _Releases_lock_(SpinLock)
313 __nonnull() void
315  _In_ void *SpinLock
316  );
317 
318 __nonnull() INTSTATUS
320  _Outptr_ void **SpinLock,
321  _In_z_ char *Name
322  );
323 
324 __nonnull() INTSTATUS
326  _Inout_ _At_(*SpinLock, _Post_null_) void **SpinLock
327  );
328 
329 __nonnull() INTSTATUS
331  _In_ void *SpinLock
332  );
333 
334 __nonnull() INTSTATUS
336  _In_ void *SpinLock
337  );
338 
339 __nonnull() INTSTATUS
341  _In_ void *SpinLock
342  );
343 
344 __nonnull() INTSTATUS
346  _In_ void *SpinLock
347  );
348 
349 __noreturn void
351  void
352  );
353 
354 INTSTATUS
356  void
357  );
358 
359 INTSTATUS
361  void
362  );
363 
364 INTSTATUS
366  _In_ INTRO_GUEST_TYPE OsType,
367  _In_ DWORD OsVersion,
368  _In_ BOOLEAN Is64
369  );
370 
371 INTSTATUS
373  _In_ INTRO_ERROR_STATE State,
375  );
376 
377 __nonnull() INTSTATUS
379  _Inout_ void *Parameters
380  );
381 
382 __nonnull() INTSTATUS
384  _In_ DWORD CpuNumber,
385  _In_ QWORD VirtualAddress,
386  _In_ DWORD BufferSize,
387  _In_reads_bytes_(BufferSize) BYTE *Buffer
388  );
389 
390 INTSTATUS
392  _In_ DWORD CpuNumber,
393  _In_ BYTE TrapNumber,
394  _In_ DWORD ErrorCode,
395  _In_opt_ QWORD Cr2
396  );
397 
398 __nonnull() INTSTATUS
400  _In_ INTRO_EVENT_TYPE EventClass,
401  _In_ void *Param,
402  _In_ size_t EventSize
403  );
404 
405 __nonnull() INTSTATUS
407  _In_ DWORD AgentTag,
408  _In_ BOOLEAN Is64,
409  _Out_ DWORD *Size,
410  _Outptr_ BYTE **Content
411  );
412 
413 __nonnull() INTSTATUS
415  _In_ void *Buffer,
416  _In_ DWORD Size
417  );
418 
419 INTSTATUS
421  _In_ BOOLEAN Enable
422  );
423 
424 __nonnull() INTSTATUS
426  _Out_ size_t *TotalHeapSize,
427  _Out_ size_t *FreeHeapSize
428  );
429 
430 __nonnull() INTSTATUS
432  _In_ char const *Message
433  );
434 
435 INTSTATUS
437  _In_ DWORD CpuNumber,
438  _In_ QWORD VeInfoGpa
439  );
440 
441 __nonnull() INTSTATUS
443  _Out_ DWORD *EptIndex
444  );
445 
446 INTSTATUS
448  _In_ DWORD EptIndex
449  );
450 
451 INTSTATUS
453  _In_ DWORD NewEptIndex
454  );
455 
456 __nonnull() INTSTATUS
458  _In_ DWORD EptIndex,
459  _In_ QWORD Address,
460  _Out_ BOOLEAN *Convertible
461  );
462 
463 INTSTATUS
465  _In_ DWORD EptIndex,
466  _In_ QWORD Address,
467  _In_ BOOLEAN Convertible
468  );
469 
470 INTSTATUS
472  void
473  );
474 
475 BOOLEAN
477  void
478  );
479 
480 BOOLEAN
482  void
483  );
484 
485 #ifdef INT_COMPILER_MSVC
486 
487 __attribute__((malloc))
488 __attribute__ ((alloc_size (1)))
490 void *
491 IntAllocWithTag(
492  _In_ size_t Length,
493  _In_ DWORD Tag,
494  _In_ const char *FileName,
495  _In_ DWORD FileLine
496  );
497 
498 INTSTATUS
499 IntFreeWithTag(
500  _In_ void *Address,
501  _In_ DWORD Tag
502  );
503 
504 #endif // INT_COMPILER_MSVC
505 
506 #ifndef DEBUG_MEM_ALLOCS
507 
508 # ifdef INT_COMPILER_MSVC
509 # define HpAllocWithTag(Len, Tag) IntAllocWithTag((Len), (Tag), __FILENAME__, __LINE__)
510 # define HpFreeAndNullWithTag(Add, Tag) \
511  do { \
512  IntFreeWithTag(*(Add), (Tag)); \
513  *(Add) = NULL; \
514  } while (0)
515 # else
516 # define HpAllocWithTag(Len, Tag) (int)(Len) <= 0 ? NULL : calloc(1, (Len))
517 # define HpFreeAndNullWithTag(Add, Tag) \
518  do { \
519  free(*(Add)); \
520  *(Add) = NULL; \
521  } while (0)
522 # endif // INT_COMPILER_MSVC
523 
524 #endif // DEBUG_MEM_ALLOCS
525 
526 #endif // _GLUE_H_
#define _In_opt_
Definition: intro_sal.h:16
INTSTATUS IntRwSpinLockReleaseShared(void *SpinLock)
Definition: glue.c:899
_Bool BOOLEAN
Definition: intro_types.h:58
#define _Out_
Definition: intro_sal.h:22
INTSTATUS IntRegisterDtrHandler(PFUNC_IntIntroDescriptorTableCallback Callback)
Definition: glue.c:777
INTSTATUS IntGetEPTPageConvertible(DWORD EptIndex, QWORD Address, BOOLEAN *Convertible)
Definition: glue.c:1210
INTSTATUS IntReserveVaSpaceWithPt(void **FirstPageBase, DWORD *PagesCount, void **PtBase)
Reserves a contiguous region of virtual memory which will then be used to map physical pages...
Definition: glue.c:451
uint8_t BYTE
Definition: intro_types.h:47
INTSTATUS GluePauseVcpus(void)
Definition: glue.c:481
#define _In_
Definition: intro_sal.h:21
void IntGlueReset(void)
Resets the global glue state (gIface. gUpIface, gIntHandle, gEventId, etc)
Definition: glue.c:77
INTSTATUS GlueResumeVcpus(void)
Definition: glue.c:490
INTSTATUS IntGpaToHpa(QWORD Gpa, QWORD *Hpa)
Definition: glue.c:240
#define _Out_writes_bytes_(expr)
Definition: intro_sal.h:38
INTSTATUS PRINTF_ATTRIBUTE(* PFUNC_IntTracePrint)(const CHAR *File, DWORD Line, const CHAR *Format,...)
Provides print-like trace functionality for introcore.
Definition: upperiface.h:42
void IntSpinLockRelease(void *SpinLock)
Definition: glue.c:848
Interface that exposes basic services to the introspection engines.
Definition: upperiface.h:262
IG_LOG_LEVEL gLogLevel
The currently used log level.
Definition: glue.c:68
INTSTATUS(* PFUNC_IntEPTViolationCallback)(void *GuestHandle, QWORD PhysicalAddress, DWORD Length, QWORD VirtualAddress, DWORD CpuNumber, INTRO_ACTION *Action, IG_EPT_ACCESS Type)
Definition: glueiface.h:428
INTSTATUS IntRegisterVmxTimerHandler(PFUNC_IntIntroTimerCallback Callback)
Definition: glue.c:759
#define _Outptr_
Definition: intro_sal.h:19
INTSTATUS IntDisableCrWriteExit(DWORD Cr)
Definition: glue.c:556
int INTSTATUS
The status data type.
Definition: introstatus.h:24
INTSTATUS IntUnregisterEPTHandler(void)
Definition: glue.c:732
INTSTATUS IntUnregisterVmxTimerHandler(void)
Definition: glue.c:768
INTSTATUS IntQueryGuestInfo(DWORD InfoClass, void *InfoParam, void *Buffer, DWORD BufferLength)
Definition: glue.c:226
PFUNC_IntTracePrint GlueTracePrint
The trace API used.
Definition: glue.c:72
INTSTATUS IntFlushEPTPermissions(void)
Definition: glue.c:1242
INTSTATUS IntUnregisterDtrHandler(void)
Definition: glue.c:786
INTSTATUS(* PFUNC_IntMSRViolationCallback)(void *GuestHandle, DWORD Msr, IG_MSR_HOOK_TYPE Flags, INTRO_ACTION *Action, QWORD OriginalValue, QWORD *NewValue, DWORD CpuNumber)
Definition: glueiface.h:457
INTSTATUS IntQueryHeapSize(size_t *TotalHeapSize, size_t *FreeHeapSize)
Definition: glue.c:1112
PFUNC_IntEnterDebugger GlueEnterDebugger
The API used to break into the debugger.
Definition: glue.c:74
INTSTATUS IntUnregisterXcrWriteHandler(void)
Definition: glue.c:804
INTSTATUS IntGetSPPPageProtection(QWORD Gpa, QWORD *Spp)
Definition: glue.c:685
Interface used for communicating between the introspection engine and the integrator.
Definition: glueiface.h:2078
INTSTATUS IntNotifyIntroActive(void)
Definition: glue.c:927
INTSTATUS IntRegisterCrWriteHandler(PFUNC_IntCrWriteCallback Callback)
Definition: glue.c:565
INTSTATUS(* PFUNC_IntIntroDescriptorTableCallback)(void *GuestHandle, DWORD Flags, DWORD CpuNumber, INTRO_ACTION *Action)
Definition: glueiface.h:518
INTSTATUS IntEnableMsrExit(DWORD Msr, BOOLEAN *OldValue)
Definition: glue.c:499
INTSTATUS IntSpinLockUnInit(void **SpinLock)
Definition: glue.c:823
INTSTATUS(* PFUNC_IntBreakpointCallback)(void *GuestHandle, QWORD PhysicalAddress, DWORD CpuNumber)
Definition: glueiface.h:590
INTSTATUS IntSetEPTPageProtection(DWORD EptIndex, QWORD Gpa, BYTE Read, BYTE Write, BYTE Execute)
Definition: glue.c:672
INTSTATUS IntRwSpinLockInit(void **SpinLock, char *Name)
Definition: glue.c:862
#define _Inout_
Definition: intro_sal.h:20
#define _Acquires_lock_(expr)
Definition: intro_sal.h:34
INTSTATUS IntRwSpinLockUnInit(void **SpinLock)
Definition: glue.c:872
INTSTATUS(* PFUNC_IntEventInjectionCallback)(void *GuestHandle, DWORD Vector, QWORD ErrorCode, QWORD Cr2, DWORD CpuNumber)
Definition: glueiface.h:610
The context of an error state.
Definition: intro_types.h:2415
INTSTATUS IntRegisterEnginesResultCallback(PFUNC_IntEventEnginesResultCallback Callback)
Thin wrapper over the optional GLUE_IFACE.RegisterEnginesResultCallback API.
Definition: glue.c:619
__noreturn void IntBugCheck(void)
Definition: glue.c:917
INTSTATUS IntNotifyIntroEvent(INTRO_EVENT_TYPE EventClass, void *Param, size_t EventSize)
Notifies the integrator about an introspection alert.
Definition: glue.c:1042
unsigned long long QWORD
Definition: intro_types.h:53
#define __must_check
Definition: introtypes.h:48
INTSTATUS IntRwSpinLockAcquireShared(void *SpinLock)
Definition: glue.c:881
INTSTATUS IntSetIntroEmulatorContext(DWORD CpuNumber, QWORD VirtualAddress, DWORD BufferSize, BYTE *Buffer)
Definition: glue.c:1018
DWORD gCurLogBuffer
Used for utf16_for_log to support calling that function 8 times in a single macro.
Definition: glue.c:58
#define _Releases_lock_(expr)
Definition: intro_sal.h:35
INTSTATUS IntEnableCrWriteExit(DWORD Cr)
Definition: glue.c:547
INTSTATUS IntNotifyEngines(void *Parameters)
Definition: glue.c:1004
void(* PFUNC_IntEnterDebugger)(void)
Breaks into the debugger.
Definition: upperiface.h:215
INTSTATUS(* PFUNC_IntEventEnginesResultCallback)(void *GuestHandle, PENG_NOTIFICATION_HEADER EngineNotification)
Definition: glueiface.h:633
INTSTATUS IntNotifyIntroInactive(void)
Definition: glue.c:941
#define _Outptr_result_bytebuffer_(expr)
Definition: intro_sal.h:24
INTSTATUS IntSpinLockInit(void **SpinLock, char *Name)
Definition: glue.c:813
INTSTATUS IntUnregisterEventInjectionHandler(void)
Definition: glue.c:610
void IntSpinLockAcquire(void *SpinLock)
Definition: glue.c:833
INTSTATUS IntReleaseBuffer(void *Buffer, DWORD Size)
Definition: glue.c:1083
INTSTATUS IntRegisterMSRHandler(PFUNC_IntMSRViolationCallback Callback)
Definition: glue.c:519
INTRO_GUEST_TYPE
The type of the introspected operating system.
Definition: intro_types.h:2040
INTSTATUS IntRegisterIntroCallHandler(PFUNC_IntIntroCallCallback Callback)
Definition: glue.c:741
uint32_t DWORD
Definition: intro_types.h:49
INTSTATUS(* PFUNC_IntIntroCallCallback)(void *GuestHandle, QWORD Rip, DWORD Cpu)
Definition: glueiface.h:483
INTSTATUS IntSetVEInfoPage(DWORD CpuNumber, QWORD VeInfoGpa)
Definition: glue.c:1153
INTSTATUS IntSwitchEPT(DWORD NewEptIndex)
Definition: glue.c:1196
#define _At_(expr, arg)
Definition: intro_sal.h:23
#define _In_reads_bytes_(expr)
Definition: intro_sal.h:25
INTSTATUS IntUnregisterMSRHandler(void)
Definition: glue.c:528
INTSTATUS(* PFUNC_IntCrWriteCallback)(void *GuestHandle, DWORD Cr, DWORD CpuNumber, QWORD OldValue, QWORD NewValue, INTRO_ACTION *Action)
Definition: glueiface.h:543
INTSTATUS IntGetEPTPageProtection(DWORD EptIndex, QWORD Gpa, BYTE *Read, BYTE *Write, BYTE *Execute)
Definition: glue.c:659
INTSTATUS IntDestroyEPT(DWORD EptIndex)
Definition: glue.c:1182
INTSTATUS IntGetAgentContent(DWORD AgentTag, BOOLEAN Is64, DWORD *Size, BYTE **Content)
Definition: glue.c:1066
INTSTATUS IntRegisterBreakpointHandler(PFUNC_IntBreakpointCallback Callback)
Definition: glue.c:583
#define _In_z_
Definition: intro_sal.h:17
INTSTATUS(* PFUNC_IntIntroTimerCallback)(void *GuestHandle)
Definition: glueiface.h:499
INTRO_ERROR_STATE
Error states.
Definition: intro_types.h:2433
#define _When_(expr, arg)
Definition: intro_sal.h:26
enum _IG_LOG_LEVEL IG_LOG_LEVEL
Controls the verbosity of the logs.
INTSTATUS IntInjectTrap(DWORD CpuNumber, BYTE TrapNumber, DWORD ErrorCode, QWORD Cr2)
Definition: glue.c:1030
BOOLEAN GlueIsScanEnginesApiAvailable(void)
Checks if the third party memory scanning engines are present.
Definition: glue.c:1284
INTSTATUS IntPhysMemGetTypeFromMtrrs(QWORD Gpa, IG_MEMTYPE *MemType)
Definition: glue.c:537
INTSTATUS IntUnregisterCrWriteHandler(void)
Definition: glue.c:574
__must_check INTSTATUS IntPhysMemMap(QWORD PhysAddress, DWORD Length, DWORD Flags, void **HostPtr)
Maps a guest physical address inside Introcore VA space.
Definition: glue.c:338
INTSTATUS IntRwSpinLockReleaseExclusive(void *SpinLock)
Definition: glue.c:908
INTSTATUS IntCreateEPT(DWORD *EptIndex)
Definition: glue.c:1168
IG_MEMTYPE
Memory type values.
Definition: glueiface.h:157
BOOLEAN GlueIsVeApiAvailable(void)
Checks if the virtualization exception API is implemented.
Definition: glue.c:1261
INTSTATUS IntNotifyIntroErrorState(INTRO_ERROR_STATE State, INTRO_ERROR_CONTEXT *Context)
Definition: glue.c:989
enum _INTRO_EVENT_TYPE INTRO_EVENT_TYPE
Event classes.
INTSTATUS IntSendMessage(char const *Message)
Sends an Introcore message.
Definition: glue.c:1130
INTSTATUS IntUnregisterIntroCallHandler(void)
Definition: glue.c:750
INTSTATUS IntRegisterEPTHandler(PFUNC_IntEPTViolationCallback Callback)
Definition: glue.c:723
INTSTATUS IntRegisterXcrWriteHandler(PFUNC_IntXcrWriteCallback Callback)
Definition: glue.c:795
INTSTATUS IntRegisterEventInjectionHandler(PFUNC_IntEventInjectionCallback Callback)
Definition: glue.c:601
#define __noreturn
Definition: introtypes.h:50
INTSTATUS IntRwSpinLockAcquireExclusive(void *SpinLock)
Definition: glue.c:890
INTSTATUS IntPhysMemUnmap(void **HostPtr)
Unmaps an address previously mapped with IntPhysMemMap.
Definition: glue.c:396
INTSTATUS IntToggleRepOptimization(BOOLEAN Enable)
Definition: glue.c:1098
BOOLEAN GlueIsSppApiAvailable(void)
Checks if the SPP APIs in GLUE_IFACE are implemented.
Definition: glue.c:705
INTSTATUS IntNotifyIntroDetectedOs(INTRO_GUEST_TYPE OsType, DWORD OsVersion, BOOLEAN Is64)
Wrapper over GLUE_IFACE.NotifyIntrospectionDetectedOs.
Definition: glue.c:955
INTSTATUS IntSetEPTPageConvertible(DWORD EptIndex, QWORD Address, BOOLEAN Convertible)
Definition: glue.c:1226
INTSTATUS IntUnregisterBreakpointHandler(void)
Definition: glue.c:592
INTSTATUS IntGlueInit(GLUE_IFACE const *GlueInterface, UPPER_IFACE const *UpperInterface)
Initializes the instances of GLUE_IFACE and UPPER_IFACE that will be used.
Definition: glue.c:101
INTSTATUS(* PFUNC_IntXcrWriteCallback)(void *GuestHandle, DWORD CpuNumber, INTRO_ACTION *Action)
Definition: glueiface.h:568
INTSTATUS IntSetSPPPageProtection(QWORD Gpa, QWORD Spp)
Definition: glue.c:695
INTSTATUS IntUnregisterEnginesResultCalback(void)
Thin wrapper over the optional GLUE_IFACE.UnregisterEnginesResultCalback API.
Definition: glue.c:640
INTSTATUS IntDisableMsrExit(DWORD Msr, BOOLEAN *OldValue)
Definition: glue.c:509