Send string messages and tracing for logging and monitoring.
1215{
1220
1221
1222
1223
1225
1226#if UseWPPTracing
1227
1229 {
1230 HypervisorTraceLevelMessage(
1232 HVFS_LOG_INFO,
1233 "%s",
1234 LogMessage);
1235 }
1237 {
1238 HypervisorTraceLevelMessage(
1240 HVFS_LOG_WARNING,
1241 "%s",
1242 LogMessage);
1243 }
1245 {
1246 HypervisorTraceLevelMessage(
1248 HVFS_LOG_ERROR,
1249 "%s",
1250 LogMessage);
1251 }
1252 else
1253 {
1254 HypervisorTraceLevelMessage(
1256 HVFS_LOG,
1257 "%s",
1258 LogMessage);
1259 }
1260
1261#else
1262 if (IsImmediateMessage)
1263 {
1265 }
1266 else
1267 {
1268
1269
1270
1271
1272 if (IsVmxRootMode)
1273 {
1274
1275
1276
1277 Index = 1;
1279 }
1280 else
1281 {
1282
1283
1284
1285 Index = 0;
1286
1287
1288
1289
1291 }
1292
1293
1294
1296
1297
1298
1299
1301 {
1302
1303
1304
1305
1310
1311
1312
1313
1316 }
1317
1318
1319
1320
1323 LogMessage,
1324 BufferLen);
1325
1326
1327
1328
1330
1331
1332
1333
1334 if (IsVmxRootMode)
1335 {
1337 }
1338 else
1339 {
1340
1341
1342
1344 }
1345
1346 return Result;
1347 }
1348#endif
1349}
_Use_decl_annotations_ BOOLEAN LogCallbackSendBuffer(UINT32 OperationCode, PVOID Buffer, UINT32 BufferLength, BOOLEAN Priority)
Save buffer to the pool.
Definition Logging.c:350
volatile LONG g_VmxRootLoggingLockForNonImmBuffers
Vmx-root lock for logging.
Definition Logging.h:116
VOID SpinlockLock(volatile LONG *Lock)
Tries to get the lock and won't return until successfully get the lock.
Definition Spinlock.c:53
VOID SpinlockUnlock(volatile LONG *Lock)
Release the lock.
Definition Spinlock.c:162
#define TRACE_LEVEL_WARNING
Definition Trace.h:32
#define TRACE_LEVEL_NONE
Definition Trace.h:29
#define TRACE_LEVEL_ERROR
Definition Trace.h:31
#define TRACE_LEVEL_INFORMATION
Definition Trace.h:33