VirtualBox

source: vbox/trunk/src/VBox/VMM/include/VMMInternal.h@ 87819

Last change on this file since 87819 was 87819, checked in by vboxsync, 4 years ago

VMM: Disabled the EMT yield timer as it is out dated (multi core CPUs) and will be pointless when timers move off the EMTs. bugref:9943

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Revision
File size: 21.6 KB
Line 
1/* $Id: VMMInternal.h 87819 2021-02-20 10:24:03Z vboxsync $ */
2/** @file
3 * VMM - Internal header file.
4 */
5
6/*
7 * Copyright (C) 2006-2020 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef VMM_INCLUDED_SRC_include_VMMInternal_h
19#define VMM_INCLUDED_SRC_include_VMMInternal_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24#include <VBox/cdefs.h>
25#include <VBox/sup.h>
26#include <VBox/vmm/stam.h>
27#include <VBox/vmm/vmm.h>
28#include <VBox/log.h>
29#include <iprt/critsect.h>
30
31#if !defined(IN_VMM_R3) && !defined(IN_VMM_R0) && !defined(IN_VMM_RC)
32# error "Not in VMM! This is an internal header!"
33#endif
34#if HC_ARCH_BITS == 32
35# error "32-bit hosts are no longer supported. Go back to 6.0 or earlier!"
36#endif
37
38
39
40/** @defgroup grp_vmm_int Internals
41 * @ingroup grp_vmm
42 * @internal
43 * @{
44 */
45
46/** @def VBOX_WITH_RC_RELEASE_LOGGING
47 * Enables RC release logging. */
48#define VBOX_WITH_RC_RELEASE_LOGGING
49
50/** @def VBOX_WITH_R0_LOGGING
51 * Enables Ring-0 logging (non-release).
52 *
53 * Ring-0 logging isn't 100% safe yet (thread id reuse / process exit cleanup),
54 * so you have to sign up here by adding your defined(DEBUG_<userid>) to the
55 * \#if, or by adding VBOX_WITH_R0_LOGGING to your LocalConfig.kmk.
56 */
57#if defined(DEBUG_sandervl) || defined(DEBUG_frank) || defined(DEBUG_ramshankar) || defined(DOXYGEN_RUNNING)
58# define VBOX_WITH_R0_LOGGING
59#endif
60
61/** @def VBOX_STRICT_VMM_STACK
62 * Enables VMM stack guard pages to catch stack over- and underruns. */
63#if defined(VBOX_STRICT) || defined(DOXYGEN_RUNNING)
64# define VBOX_STRICT_VMM_STACK
65#endif
66
67
68/**
69 * The ring-0 logger instance wrapper.
70 *
71 * We need to be able to find the VM handle from the logger instance, so we wrap
72 * it in this structure.
73 */
74typedef struct VMMR0LOGGER
75{
76 /** Pointer to Pointer to the VM. */
77 R0PTRTYPE(PVMCC) pVM;
78 /** Size of the allocated logger instance (Logger). */
79 uint32_t cbLogger;
80 /** Flag indicating whether we've create the logger Ring-0 instance yet. */
81 bool fCreated;
82 /** Flag indicating whether we've disabled flushing (world switch) or not. */
83 bool fFlushingDisabled;
84 /** Flag indicating whether we've registered the instance already. */
85 bool fRegistered;
86 bool a8Alignment;
87 /** The CPU ID. */
88 VMCPUID idCpu;
89#if HC_ARCH_BITS == 64
90 uint32_t u32Alignment;
91#endif
92 /** The ring-0 logger instance. This extends beyond the size. */
93 RTLOGGER Logger;
94} VMMR0LOGGER;
95/** Pointer to a ring-0 logger instance wrapper. */
96typedef VMMR0LOGGER *PVMMR0LOGGER;
97
98
99/**
100 * Jump buffer for the setjmp/longjmp like constructs used to
101 * quickly 'call' back into Ring-3.
102 */
103typedef struct VMMR0JMPBUF
104{
105 /** Traditional jmp_buf stuff
106 * @{ */
107#if HC_ARCH_BITS == 32
108 uint32_t ebx;
109 uint32_t esi;
110 uint32_t edi;
111 uint32_t ebp;
112 uint32_t esp;
113 uint32_t eip;
114 uint32_t eflags;
115#endif
116#if HC_ARCH_BITS == 64
117 uint64_t rbx;
118# ifdef RT_OS_WINDOWS
119 uint64_t rsi;
120 uint64_t rdi;
121# endif
122 uint64_t rbp;
123 uint64_t r12;
124 uint64_t r13;
125 uint64_t r14;
126 uint64_t r15;
127 uint64_t rsp;
128 uint64_t rip;
129# ifdef RT_OS_WINDOWS
130 uint128_t xmm6;
131 uint128_t xmm7;
132 uint128_t xmm8;
133 uint128_t xmm9;
134 uint128_t xmm10;
135 uint128_t xmm11;
136 uint128_t xmm12;
137 uint128_t xmm13;
138 uint128_t xmm14;
139 uint128_t xmm15;
140# endif
141 uint64_t rflags;
142#endif
143 /** @} */
144
145 /** Flag that indicates that we've done a ring-3 call. */
146 bool fInRing3Call;
147 /** The number of bytes we've saved. */
148 uint32_t cbSavedStack;
149 /** Pointer to the buffer used to save the stack.
150 * This is assumed to be 8KB. */
151 RTR0PTR pvSavedStack;
152 /** Esp we we match against esp on resume to make sure the stack wasn't relocated. */
153 RTHCUINTREG SpCheck;
154 /** The esp we should resume execution with after the restore. */
155 RTHCUINTREG SpResume;
156 /** ESP/RSP at the time of the jump to ring 3. */
157 RTHCUINTREG SavedEsp;
158 /** EBP/RBP at the time of the jump to ring 3. */
159 RTHCUINTREG SavedEbp;
160 /** EIP/RIP within vmmR0CallRing3LongJmp for assisting unwinding. */
161 RTHCUINTREG SavedEipForUnwind;
162 /** Unwind: The vmmR0CallRing3SetJmp return address value. */
163 RTHCUINTREG UnwindRetPcValue;
164 /** Unwind: The vmmR0CallRing3SetJmp return address stack location. */
165 RTHCUINTREG UnwindRetPcLocation;
166#if HC_ARCH_BITS == 32
167 /** Alignment padding. */
168 uint32_t uPadding;
169#endif
170
171 /** Stats: Max amount of stack used. */
172 uint32_t cbUsedMax;
173 /** Stats: Average stack usage. (Avg = cbUsedTotal / cUsedTotal) */
174 uint32_t cbUsedAvg;
175 /** Stats: Total amount of stack used. */
176 uint64_t cbUsedTotal;
177 /** Stats: Number of stack usages. */
178 uint64_t cUsedTotal;
179} VMMR0JMPBUF;
180/** Pointer to a ring-0 jump buffer. */
181typedef VMMR0JMPBUF *PVMMR0JMPBUF;
182
183
184/**
185 * VMM Data (part of VM)
186 */
187typedef struct VMM
188{
189 /** Whether we should use the periodic preemption timers. */
190 bool fUsePeriodicPreemptionTimers;
191 /** Alignment padding. */
192 bool afPadding0[7];
193
194#if 0 /* pointless when timers doesn't run on EMT */
195 /** The EMT yield timer. */
196 TMTIMERHANDLE hYieldTimer;
197 /** The period to the next timeout when suspended or stopped.
198 * This is 0 when running. */
199 uint32_t cYieldResumeMillies;
200 /** The EMT yield timer interval (milliseconds). */
201 uint32_t cYieldEveryMillies;
202 /** The timestamp of the previous yield. (nano) */
203 uint64_t u64LastYield;
204#endif
205
206 /** @name EMT Rendezvous
207 * @{ */
208 /** Semaphore to wait on upon entering ordered execution. */
209 R3PTRTYPE(PRTSEMEVENT) pahEvtRendezvousEnterOrdered;
210 /** Semaphore to wait on upon entering for one-by-one execution. */
211 RTSEMEVENT hEvtRendezvousEnterOneByOne;
212 /** Semaphore to wait on upon entering for all-at-once execution. */
213 RTSEMEVENTMULTI hEvtMulRendezvousEnterAllAtOnce;
214 /** Semaphore to wait on when done. */
215 RTSEMEVENTMULTI hEvtMulRendezvousDone;
216 /** Semaphore the VMMR3EmtRendezvous caller waits on at the end. */
217 RTSEMEVENT hEvtRendezvousDoneCaller;
218 /** Semaphore to wait on upon recursing. */
219 RTSEMEVENTMULTI hEvtMulRendezvousRecursionPush;
220 /** Semaphore to wait on after done with recursion (caller restoring state). */
221 RTSEMEVENTMULTI hEvtMulRendezvousRecursionPop;
222 /** Semaphore the initiator waits on while the EMTs are getting into position
223 * on hEvtMulRendezvousRecursionPush. */
224 RTSEMEVENT hEvtRendezvousRecursionPushCaller;
225 /** Semaphore the initiator waits on while the EMTs sitting on
226 * hEvtMulRendezvousRecursionPop wakes up and leave. */
227 RTSEMEVENT hEvtRendezvousRecursionPopCaller;
228 /** Callback. */
229 R3PTRTYPE(PFNVMMEMTRENDEZVOUS) volatile pfnRendezvous;
230 /** The user argument for the callback. */
231 RTR3PTR volatile pvRendezvousUser;
232 /** Flags. */
233 volatile uint32_t fRendezvousFlags;
234 /** The number of EMTs that has entered. */
235 volatile uint32_t cRendezvousEmtsEntered;
236 /** The number of EMTs that has done their job. */
237 volatile uint32_t cRendezvousEmtsDone;
238 /** The number of EMTs that has returned. */
239 volatile uint32_t cRendezvousEmtsReturned;
240 /** The status code. */
241 volatile int32_t i32RendezvousStatus;
242 /** Spin lock. */
243 volatile uint32_t u32RendezvousLock;
244 /** The recursion depth. */
245 volatile uint32_t cRendezvousRecursions;
246 /** The number of EMTs that have entered the recursion routine. */
247 volatile uint32_t cRendezvousEmtsRecursingPush;
248 /** The number of EMTs that have leaft the recursion routine. */
249 volatile uint32_t cRendezvousEmtsRecursingPop;
250 /** Triggers rendezvous recursion in the other threads. */
251 volatile bool fRendezvousRecursion;
252
253 /** @} */
254
255 /** RTThreadPreemptIsPendingTrusty() result, set by vmmR0InitVM() for
256 * release logging purposes. */
257 bool fIsPreemptPendingApiTrusty : 1;
258 /** The RTThreadPreemptIsPossible() result, set by vmmR0InitVM() for
259 * release logging purposes. */
260 bool fIsPreemptPossible : 1;
261
262 bool afAlignment2[2]; /**< Alignment padding. */
263
264 /** Buffer for storing the standard assertion message for a ring-0 assertion.
265 * Used for saving the assertion message text for the release log and guru
266 * meditation dump. */
267 char szRing0AssertMsg1[512];
268 /** Buffer for storing the custom message for a ring-0 assertion. */
269 char szRing0AssertMsg2[256];
270
271 /** Number of VMMR0_DO_HM_RUN or VMMR0_DO_NEM_RUN calls. */
272 STAMCOUNTER StatRunGC;
273
274 /** Statistics for each of the RC/R0 return codes.
275 * @{ */
276 STAMCOUNTER StatRZRetNormal;
277 STAMCOUNTER StatRZRetInterrupt;
278 STAMCOUNTER StatRZRetInterruptHyper;
279 STAMCOUNTER StatRZRetGuestTrap;
280 STAMCOUNTER StatRZRetRingSwitch;
281 STAMCOUNTER StatRZRetRingSwitchInt;
282 STAMCOUNTER StatRZRetStaleSelector;
283 STAMCOUNTER StatRZRetIRETTrap;
284 STAMCOUNTER StatRZRetEmulate;
285 STAMCOUNTER StatRZRetPatchEmulate;
286 STAMCOUNTER StatRZRetIORead;
287 STAMCOUNTER StatRZRetIOWrite;
288 STAMCOUNTER StatRZRetIOCommitWrite;
289 STAMCOUNTER StatRZRetMMIORead;
290 STAMCOUNTER StatRZRetMMIOWrite;
291 STAMCOUNTER StatRZRetMMIOCommitWrite;
292 STAMCOUNTER StatRZRetMMIOPatchRead;
293 STAMCOUNTER StatRZRetMMIOPatchWrite;
294 STAMCOUNTER StatRZRetMMIOReadWrite;
295 STAMCOUNTER StatRZRetMSRRead;
296 STAMCOUNTER StatRZRetMSRWrite;
297 STAMCOUNTER StatRZRetLDTFault;
298 STAMCOUNTER StatRZRetGDTFault;
299 STAMCOUNTER StatRZRetIDTFault;
300 STAMCOUNTER StatRZRetTSSFault;
301 STAMCOUNTER StatRZRetCSAMTask;
302 STAMCOUNTER StatRZRetSyncCR3;
303 STAMCOUNTER StatRZRetMisc;
304 STAMCOUNTER StatRZRetPatchInt3;
305 STAMCOUNTER StatRZRetPatchPF;
306 STAMCOUNTER StatRZRetPatchGP;
307 STAMCOUNTER StatRZRetPatchIretIRQ;
308 STAMCOUNTER StatRZRetRescheduleREM;
309 STAMCOUNTER StatRZRetToR3Total;
310 STAMCOUNTER StatRZRetToR3FF;
311 STAMCOUNTER StatRZRetToR3Unknown;
312 STAMCOUNTER StatRZRetToR3TMVirt;
313 STAMCOUNTER StatRZRetToR3HandyPages;
314 STAMCOUNTER StatRZRetToR3PDMQueues;
315 STAMCOUNTER StatRZRetToR3Rendezvous;
316 STAMCOUNTER StatRZRetToR3Timer;
317 STAMCOUNTER StatRZRetToR3DMA;
318 STAMCOUNTER StatRZRetToR3CritSect;
319 STAMCOUNTER StatRZRetToR3Iem;
320 STAMCOUNTER StatRZRetToR3Iom;
321 STAMCOUNTER StatRZRetTimerPending;
322 STAMCOUNTER StatRZRetInterruptPending;
323 STAMCOUNTER StatRZRetCallRing3;
324 STAMCOUNTER StatRZRetPATMDuplicateFn;
325 STAMCOUNTER StatRZRetPGMChangeMode;
326 STAMCOUNTER StatRZRetPendingRequest;
327 STAMCOUNTER StatRZRetPGMFlushPending;
328 STAMCOUNTER StatRZRetPatchTPR;
329 STAMCOUNTER StatRZCallPDMCritSectEnter;
330 STAMCOUNTER StatRZCallPDMLock;
331 STAMCOUNTER StatRZCallLogFlush;
332 STAMCOUNTER StatRZCallPGMPoolGrow;
333 STAMCOUNTER StatRZCallPGMMapChunk;
334 STAMCOUNTER StatRZCallPGMAllocHandy;
335 STAMCOUNTER StatRZCallVMSetError;
336 STAMCOUNTER StatRZCallVMSetRuntimeError;
337 STAMCOUNTER StatRZCallPGMLock;
338 /** @} */
339} VMM;
340/** Pointer to VMM. */
341typedef VMM *PVMM;
342
343
344/**
345 * VMMCPU Data (part of VMCPU)
346 */
347typedef struct VMMCPU
348{
349 /** The last RC/R0 return code. */
350 int32_t iLastGZRc;
351 /** Alignment padding. */
352 uint32_t u32Padding0;
353
354 /** VMM stack, pointer to the top of the stack in R3.
355 * Stack is allocated from the hypervisor heap and is page aligned
356 * and always writable in RC. */
357 R3PTRTYPE(uint8_t *) pbEMTStackR3;
358
359 /** Pointer to the R0 logger instance - R3 Ptr.
360 * This is NULL if logging is disabled. */
361 R3PTRTYPE(PVMMR0LOGGER) pR0LoggerR3;
362 /** Pointer to the R0 logger instance - R0 Ptr.
363 * This is NULL if logging is disabled. */
364 R0PTRTYPE(PVMMR0LOGGER) pR0LoggerR0;
365
366 /** Pointer to the R0 release logger instance - R3 Ptr.
367 * This is NULL if logging is disabled. */
368 R3PTRTYPE(PVMMR0LOGGER) pR0RelLoggerR3;
369 /** Pointer to the R0 release instance - R0 Ptr.
370 * This is NULL if logging is disabled. */
371 R0PTRTYPE(PVMMR0LOGGER) pR0RelLoggerR0;
372
373 /** Thread context switching hook (ring-0). */
374 RTTHREADCTXHOOK hCtxHook;
375
376 /** @name Rendezvous
377 * @{ */
378 /** Whether the EMT is executing a rendezvous right now. For detecting
379 * attempts at recursive rendezvous. */
380 bool volatile fInRendezvous;
381 bool afPadding1[10];
382 /** @} */
383
384 /** Whether we can HLT in VMMR0 rather than having to return to EM.
385 * Updated by vmR3SetHaltMethodU(). */
386 bool fMayHaltInRing0;
387 /** The minimum delta for which we can HLT in ring-0 for.
388 * The deadlines we can calculate are from TM, so, if it's too close
389 * we should just return to ring-3 and run the timer wheel, no point
390 * in spinning in ring-0.
391 * Updated by vmR3SetHaltMethodU(). */
392 uint32_t cNsSpinBlockThreshold;
393 /** Number of ring-0 halts (used for depreciating following values). */
394 uint32_t cR0Halts;
395 /** Number of ring-0 halts succeeding (VINF_SUCCESS) recently. */
396 uint32_t cR0HaltsSucceeded;
397 /** Number of ring-0 halts failing (VINF_EM_HALT) recently. */
398 uint32_t cR0HaltsToRing3;
399 /** Padding */
400 uint32_t u32Padding2;
401
402 /** @name Raw-mode context tracing data.
403 * @{ */
404 SUPDRVTRACERUSRCTX TracerCtx;
405 /** @} */
406
407 /** Alignment padding, making sure u64CallRing3Arg and CallRing3JmpBufR0 are nicely aligned. */
408 uint32_t au32Padding3[1];
409
410 /** @name Call Ring-3
411 * Formerly known as host calls.
412 * @{ */
413 /** The disable counter. */
414 uint32_t cCallRing3Disabled;
415 /** The pending operation. */
416 VMMCALLRING3 enmCallRing3Operation;
417 /** The result of the last operation. */
418 int32_t rcCallRing3;
419 /** The argument to the operation. */
420 uint64_t u64CallRing3Arg;
421 /** The Ring-0 notification callback. */
422 R0PTRTYPE(PFNVMMR0CALLRING3NOTIFICATION) pfnCallRing3CallbackR0;
423 /** The Ring-0 notification callback user argument. */
424 R0PTRTYPE(void *) pvCallRing3CallbackUserR0;
425 /** The Ring-0 jmp buffer.
426 * @remarks The size of this type isn't stable in assembly, so don't put
427 * anything that needs to be accessed from assembly after it. */
428 VMMR0JMPBUF CallRing3JmpBufR0;
429 /** @} */
430
431 STAMPROFILE StatR0HaltBlock;
432 STAMPROFILE StatR0HaltBlockOnTime;
433 STAMPROFILE StatR0HaltBlockOverslept;
434 STAMPROFILE StatR0HaltBlockInsomnia;
435 STAMCOUNTER StatR0HaltExec;
436 STAMCOUNTER StatR0HaltExecFromBlock;
437 STAMCOUNTER StatR0HaltExecFromSpin;
438 STAMCOUNTER StatR0HaltToR3FromSpin;
439} VMMCPU;
440AssertCompileMemberAlignment(VMMCPU, TracerCtx, 8);
441/** Pointer to VMMCPU. */
442typedef VMMCPU *PVMMCPU;
443
444
445
446RT_C_DECLS_BEGIN
447
448int vmmInitFormatTypes(void);
449void vmmTermFormatTypes(void);
450uint32_t vmmGetBuildType(void);
451
452#ifdef IN_RING3
453int vmmR3SwitcherInit(PVM pVM);
454void vmmR3SwitcherRelocate(PVM pVM, RTGCINTPTR offDelta);
455#endif /* IN_RING3 */
456
457#ifdef IN_RING0
458
459/**
460 * World switcher assembly routine.
461 * It will call VMMRCEntry().
462 *
463 * @returns return code from VMMRCEntry().
464 * @param pVM The cross context VM structure.
465 * @param uArg See VMMRCEntry().
466 * @internal
467 */
468DECLASM(int) vmmR0WorldSwitch(PVM pVM, unsigned uArg);
469
470/**
471 * Callback function for vmmR0CallRing3SetJmp.
472 *
473 * @returns VBox status code.
474 * @param pVM The cross context VM structure.
475 */
476typedef DECLCALLBACKTYPE(int, FNVMMR0SETJMP,(PVMCC pVM, PVMCPUCC pVCpu));
477/** Pointer to FNVMMR0SETJMP(). */
478typedef FNVMMR0SETJMP *PFNVMMR0SETJMP;
479
480/**
481 * The setjmp variant used for calling Ring-3.
482 *
483 * This differs from the normal setjmp in that it will resume VMMRZCallRing3 if we're
484 * in the middle of a ring-3 call. Another differences is the function pointer and
485 * argument. This has to do with resuming code and the stack frame of the caller.
486 *
487 * @returns VINF_SUCCESS on success or whatever is passed to vmmR0CallRing3LongJmp.
488 * @param pJmpBuf The jmp_buf to set.
489 * @param pfn The function to be called when not resuming.
490 * @param pVM The cross context VM structure.
491 * @param pVCpu The cross context virtual CPU structure of the calling EMT.
492 */
493DECLASM(int) vmmR0CallRing3SetJmp(PVMMR0JMPBUF pJmpBuf, PFNVMMR0SETJMP pfn, PVM pVM, PVMCPU pVCpu);
494
495
496/**
497 * Callback function for vmmR0CallRing3SetJmp2.
498 *
499 * @returns VBox status code.
500 * @param pvUser The user argument.
501 */
502typedef DECLCALLBACKTYPE(int, FNVMMR0SETJMP2,(PGVM pGVM, VMCPUID idCpu));
503/** Pointer to FNVMMR0SETJMP2(). */
504typedef FNVMMR0SETJMP2 *PFNVMMR0SETJMP2;
505
506/**
507 * Same as vmmR0CallRing3SetJmp except for the function signature.
508 *
509 * @returns VINF_SUCCESS on success or whatever is passed to vmmR0CallRing3LongJmp.
510 * @param pJmpBuf The jmp_buf to set.
511 * @param pfn The function to be called when not resuming.
512 * @param pGVM The ring-0 VM structure.
513 * @param idCpu The ID of the calling EMT.
514 */
515DECLASM(int) vmmR0CallRing3SetJmp2(PVMMR0JMPBUF pJmpBuf, PFNVMMR0SETJMP2 pfn, PGVM pGVM, VMCPUID idCpu);
516
517
518/**
519 * Callback function for vmmR0CallRing3SetJmpEx.
520 *
521 * @returns VBox status code.
522 * @param pvUser The user argument.
523 */
524typedef DECLCALLBACKTYPE(int, FNVMMR0SETJMPEX,(void *pvUser));
525/** Pointer to FNVMMR0SETJMPEX(). */
526typedef FNVMMR0SETJMPEX *PFNVMMR0SETJMPEX;
527
528/**
529 * Same as vmmR0CallRing3SetJmp except for the function signature.
530 *
531 * @returns VINF_SUCCESS on success or whatever is passed to vmmR0CallRing3LongJmp.
532 * @param pJmpBuf The jmp_buf to set.
533 * @param pfn The function to be called when not resuming.
534 * @param pvUser The argument of that function.
535 */
536DECLASM(int) vmmR0CallRing3SetJmpEx(PVMMR0JMPBUF pJmpBuf, PFNVMMR0SETJMPEX pfn, void *pvUser);
537
538
539/**
540 * Worker for VMMRZCallRing3.
541 * This will save the stack and registers.
542 *
543 * @returns rc.
544 * @param pJmpBuf Pointer to the jump buffer.
545 * @param rc The return code.
546 */
547DECLASM(int) vmmR0CallRing3LongJmp(PVMMR0JMPBUF pJmpBuf, int rc);
548
549/**
550 * Internal R0 logger worker: Logger wrapper.
551 */
552VMMR0DECL(void) vmmR0LoggerWrapper(const char *pszFormat, ...);
553
554/**
555 * Internal R0 logger worker: Flush logger.
556 *
557 * @param pLogger The logger instance to flush.
558 * @remark This function must be exported!
559 */
560VMMR0DECL(void) vmmR0LoggerFlush(PRTLOGGER pLogger);
561
562/**
563 * Internal R0 logger worker: Custom prefix.
564 *
565 * @returns Number of chars written.
566 *
567 * @param pLogger The logger instance.
568 * @param pchBuf The output buffer.
569 * @param cchBuf The size of the buffer.
570 * @param pvUser User argument (ignored).
571 */
572VMMR0DECL(size_t) vmmR0LoggerPrefix(PRTLOGGER pLogger, char *pchBuf, size_t cchBuf, void *pvUser);
573
574# ifdef VBOX_WITH_TRIPLE_FAULT_HACK
575int vmmR0TripleFaultHackInit(void);
576void vmmR0TripleFaultHackTerm(void);
577# endif
578
579#endif /* IN_RING0 */
580
581RT_C_DECLS_END
582
583/** @} */
584
585#endif /* !VMM_INCLUDED_SRC_include_VMMInternal_h */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette