VMMR0.cpp revision e095310efd245e6d6dac0e28d920a4c82aa9888a
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * VMM - Host Context Ring 0.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Copyright (C) 2006-2007 Oracle Corporation
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * available from http://www.virtualbox.org. This file is free software;
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * you can redistribute it and/or modify it under the terms of the GNU
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * General Public License (GPL) as published by the Free Software
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync/*******************************************************************************
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsync* Header Files *
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync*******************************************************************************/
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsync#if defined(_MSC_VER) && defined(RT_ARCH_AMD64) /** @todo check this with with VC7! */
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync/*******************************************************************************
acca7ab818eb8c2832aa27e27ce53133fba927dbvboxsync* Internal Functions *
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync*******************************************************************************/
ae5fc6ddd3d2ccdb941b1aacd23f6791fecc3354vboxsync/*******************************************************************************
ae5fc6ddd3d2ccdb941b1aacd23f6791fecc3354vboxsync* Global Variables *
63a3c5be7ac89d0d5b3386988f8c2f78df0cacf6vboxsync*******************************************************************************/
63a3c5be7ac89d0d5b3386988f8c2f78df0cacf6vboxsync/** Drag in necessary library bits.
63a3c5be7ac89d0d5b3386988f8c2f78df0cacf6vboxsync * The runtime lives here (in VMMR0.r0) and VBoxDD*R0.r0 links against us. */
ae5fc6ddd3d2ccdb941b1aacd23f6791fecc3354vboxsync * Initialize the module.
ae5fc6ddd3d2ccdb941b1aacd23f6791fecc3354vboxsync * This is called when we're first loaded.
ae5fc6ddd3d2ccdb941b1aacd23f6791fecc3354vboxsync * @returns 0 on success.
ae5fc6ddd3d2ccdb941b1aacd23f6791fecc3354vboxsync * @returns VBox status on failure.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Initialize the GVMM, GMM, HWACCM, PGM (Darwin) and INTNET.
ed82223f8f7be1435bf9b203a0ee4fbdfc856dc8vboxsync /* bail out */
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync * Terminate the module.
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync * This is called when we're finally unloaded.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Terminate the internal network service.
221f7b41140948bedfb450353dcefb70c014e12avboxsync * PGM (Darwin) and HWACCM global cleanup.
97803398b9554900b4dd45f88b2eb2056e2c606bvboxsync * Destroy the GMM and GVMM instances.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Initaties the R0 driver for a particular VM instance.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @returns VBox status code.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @param pVM The VM instance in question.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @param uSvnRev The SVN revision of the ring-3 part.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @thread EMT.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Match the SVN revisions.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync LogRel(("VMMR0InitVM: Revision mismatch, r3=%d r0=%d\n", uSvnRev, VMMGetSvnRev()));
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync SUPR0Printf("VMMR0InitVM: Revision mismatch, r3=%d r0=%d\n", uSvnRev, VMMGetSvnRev());
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Register the EMT R0 logger instance for VCPU 0.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync# if 0 /* testing of the logger. */
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync LogCom(("vmmR0InitVM: before %p\n", RTLogDefaultInstance()));
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync LogCom(("vmmR0InitVM: pfnFlush=%p actual=%p\n", pR0Logger->Logger.pfnFlush, vmmR0LoggerFlush));
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync LogCom(("vmmR0InitVM: pfnLogger=%p actual=%p\n", pR0Logger->Logger.pfnLogger, vmmR0LoggerWrapper));
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync LogCom(("vmmR0InitVM: offScratch=%d fFlags=%#x fDestFlags=%#x\n", pR0Logger->Logger.offScratch, pR0Logger->Logger.fFlags, pR0Logger->Logger.fDestFlags));
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync RTLogSetDefaultInstanceThread(&pR0Logger->Logger, (uintptr_t)pVM->pSession);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync LogCom(("vmmR0InitVM: after %p reg\n", RTLogDefaultInstance()));
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync RTLogSetDefaultInstanceThread(NULL, pVM->pSession);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync LogCom(("vmmR0InitVM: after %p dereg\n", RTLogDefaultInstance()));
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync pR0Logger->Logger.pfnLogger("hello ring-0 logger\n");
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync LogCom(("vmmR0InitVM: returned succesfully from direct logger call.\n"));
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync LogCom(("vmmR0InitVM: returned succesfully from direct flush call.\n"));
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync RTLogSetDefaultInstanceThread(&pR0Logger->Logger, (uintptr_t)pVM->pSession);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync LogCom(("vmmR0InitVM: after %p reg2\n", RTLogDefaultInstance()));
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync pR0Logger->Logger.pfnLogger("hello ring-0 logger\n");
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync LogCom(("vmmR0InitVM: returned succesfully from direct logger call (2). offScratch=%d\n", pR0Logger->Logger.offScratch));
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync RTLogSetDefaultInstanceThread(NULL, pVM->pSession);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync LogCom(("vmmR0InitVM: after %p dereg2\n", RTLogDefaultInstance()));
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync RTLogLoggerEx(&pR0Logger->Logger, 0, ~0U, "hello ring-0 logger (RTLogLoggerEx)\n");
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync LogCom(("vmmR0InitVM: RTLogLoggerEx returned fine offScratch=%d\n", pR0Logger->Logger.offScratch));
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync RTLogSetDefaultInstanceThread(&pR0Logger->Logger, (uintptr_t)pVM->pSession);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync RTLogPrintf("hello ring-0 logger (RTLogPrintf)\n");
a0a3a26a4065b9401681a8c99a11bd83e08f94ccvboxsync LogCom(("vmmR0InitVM: RTLogPrintf returned fine offScratch=%d\n", pR0Logger->Logger.offScratch));
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync Log(("Switching to per-thread logging instance %p (key=%p)\n", &pR0Logger->Logger, pVM->pSession));
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync RTLogSetDefaultInstanceThread(&pR0Logger->Logger, (uintptr_t)pVM->pSession);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync#endif /* LOG_ENABLED */
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Initialize the per VM data for GVMM and GMM.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync// if (RT_SUCCESS(rc))
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync// rc = GMMR0InitPerVMData(pVM);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Init HWACCM, CPUM and PGM (Darwin only).
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync rc = CPUMR0Init(pVM); /** @todo rename to CPUMR0InitVM */
b14965bee0bfb359e6ce9db6beaa4add9935fe3cvboxsync /* bail out */
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync RTLogSetDefaultInstanceThread(NULL, (uintptr_t)pVM->pSession);
221f7b41140948bedfb450353dcefb70c014e12avboxsync * Terminates the R0 driver for a particular VM instance.
221f7b41140948bedfb450353dcefb70c014e12avboxsync * This is normally called by ring-3 as part of the VM termination process, but
221f7b41140948bedfb450353dcefb70c014e12avboxsync * may alternatively be called during the support driver session cleanup when
221f7b41140948bedfb450353dcefb70c014e12avboxsync * the VM object is destroyed (see GVMM).
221f7b41140948bedfb450353dcefb70c014e12avboxsync * @returns VBox status code.
221f7b41140948bedfb450353dcefb70c014e12avboxsync * @param pVM The VM instance in question.
221f7b41140948bedfb450353dcefb70c014e12avboxsync * @param pGVM Pointer to the global VM structure. Optional.
221f7b41140948bedfb450353dcefb70c014e12avboxsync * @thread EMT or session clean up thread.
221f7b41140948bedfb450353dcefb70c014e12avboxsync * Tell GVMM what we're up to and check that we only do this once.
221f7b41140948bedfb450353dcefb70c014e12avboxsync * Deregister the logger.
221f7b41140948bedfb450353dcefb70c014e12avboxsync RTLogSetDefaultInstanceThread(NULL, (uintptr_t)pVM->pSession);
221f7b41140948bedfb450353dcefb70c014e12avboxsync * Record return code statistics
221f7b41140948bedfb450353dcefb70c014e12avboxsync * @param pVM The VM handle.
221f7b41140948bedfb450353dcefb70c014e12avboxsync * @param pVCpu The VMCPU handle.
221f7b41140948bedfb450353dcefb70c014e12avboxsync * @param rc The status code.
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsyncstatic void vmmR0RecordRC(PVM pVM, PVMCPU pVCpu, int rc)
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * Collect statistics.
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetInterruptHyper);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetRingSwitchInt);
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetStaleSelector);
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetMMIOReadWrite);
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetMMIOPatchRead);
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetMMIOPatchWrite);
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetIOBlockEmulate);
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetPatchEmulate);
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetPatchIretIRQ);
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetRescheduleREM);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetTimerPending);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetInterruptPending);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPDMQueueFlush);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPGMPoolGrow);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPGMMapChunk);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPGMAllocHandy);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync case VMMCALLRING3_REM_REPLAY_HANDLER_NOTIFICATIONS:
e43d0b86db65e202efb63f0fc5fce1f981267a32vboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallVMSetError);
e43d0b86db65e202efb63f0fc5fce1f981267a32vboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallVMSetRuntimeError);
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetPATMDuplicateFn);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetPGMChangeMode);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetPGMFlushPending);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetPendingRequest);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync#endif /* VBOX_WITH_STATISTICS */
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Unused ring-0 entry point that used to be called from the interrupt gate.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Will be removed one of the next times we do a major SUPDrv version bump.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @returns VBox status code.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @param pVM The VM to operate on.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @param enmOperation Which operation to execute.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @param pvArg Argument to the operation.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @remarks Assume called with interrupts disabled.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVMMR0DECL(int) VMMR0EntryInt(PVM pVM, VMMR0OPERATION enmOperation, void *pvArg)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * We're returning VERR_NOT_SUPPORT here so we've got something else
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * than -1 which the interrupt gate glue code might return.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync Log(("operation %#x is not supported\n", enmOperation));
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * The Ring 0 entry point, called by the fast-ioctl path.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @param pVM The VM to operate on.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * The return code is stored in pVM->vmm.s.iLastGZRc.
5d6df5999c0e844db1af3c6def0a9abac5120d3bvboxsync * @param idCpu The Virtual CPU ID of the calling EMT.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @param enmOperation Which operation to execute.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @remarks Assume called with interrupts _enabled_.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVMMR0DECL(void) VMMR0EntryFast(PVM pVM, VMCPUID idCpu, VMMR0OPERATION enmOperation)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Switch to GC and run guest raw mode code.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Disable interrupts before doing the world switch.
2c6c9da3f26e8e769901a041f182037452cffafdvboxsync /* Safety precaution as hwaccm disables the switcher. */
48807baed22246206b9855f41d1fd106f0679b3avboxsync pVCpu->vmm.s.iLastGZRc = VERR_RAW_MODE_INVALID_SMP;
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync pVCpu->vmm.s.iLastGZRc = VERR_PGM_NO_CR3_SHADOW_ROOT;
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync /* We might need to disable VT-x if the active switcher turns off paging. */
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync /* Re-enable VT-x if previously turned off. */
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Run guest code using the available hardware acceleration technology.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Disable interrupts before we do anything interesting. On Windows we avoid
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * this by having the support driver raise the IRQL before calling us, this way
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * we hope to get away with page faults and later calling into the kernel.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync RTTHREADPREEMPTSTATE PreemptState = RTTHREADPREEMPTSTATE_INITIALIZER;
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync /* Lazy registration of ring 0 loggers. */
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync RTLogSetDefaultInstanceThread(&pR0Logger->Logger, (uintptr_t)pVM->pSession);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync rc = vmmR0CallRing3SetJmp(&pVCpu->vmm.s.CallRing3JmpBufR0, HWACCMR0RunGuestCode, pVM, pVCpu); /* this may resume code. */
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync /* System is about to go into suspend mode; go back to ring 3. */
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync /* No special action required for external interrupts, just return. */
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * For profiling.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Impossible.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Validates a session or VM session argument.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @returns true / false accordingly.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @param pVM The VM argument.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @param pSession The session argument.
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsyncDECLINLINE(bool) vmmR0IsValidSession(PVM pVM, PSUPDRVSESSION pClaimedSession, PSUPDRVSESSION pSession)
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync /* This must be set! */
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync return false;
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync /* Only one out of the two. */
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync return false;
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync * VMMR0EntryEx worker function, either called directly or when ever possible
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync * called thru a longjmp so we can exit safely on failure.
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync * @returns VBox status code.
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync * @param pVM The VM to operate on.
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync * @param idCpu Virtual CPU ID argument. Must be NIL_VMCPUID if pVM
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync * is NIL_RTR0PTR, and may be NIL_VMCPUID if it isn't
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync * @param enmOperation Which operation to execute.
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync * @param pReqHdr This points to a SUPVMMR0REQHDR packet. Optional.
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync * The support driver validates this if it's present.
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync * @param u64Arg Some simple constant argument.
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync * @param pSession The session of the caller.
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync * @remarks Assume called with interrupts _enabled_.
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsyncstatic int vmmR0EntryExWorker(PVM pVM, VMCPUID idCpu, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReqHdr, uint64_t u64Arg, PSUPDRVSESSION pSession)
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync * Common VM pointer validation.
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync SUPR0Printf("vmmR0EntryExWorker: Invalid pVM=%p! (op=%d)\n", pVM, enmOperation);
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync if (RT_UNLIKELY( pVM->enmVMState < VMSTATE_CREATING
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync SUPR0Printf("vmmR0EntryExWorker: Invalid pVM=%p:{enmVMState=%d, .pVMR0=%p}! (op=%d)\n",
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync if (RT_UNLIKELY(idCpu >= pVM->cCpus && idCpu != NIL_VMCPUID))
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync SUPR0Printf("vmmR0EntryExWorker: Invalid idCpu (%u vs cCpus=%u)\n", idCpu, pVM->cCpus);
ae5fc6ddd3d2ccdb941b1aacd23f6791fecc3354vboxsync SUPR0Printf("vmmR0EntryExWorker: Invalid idCpu=%u\n", idCpu);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * GVM requests
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync return GVMMR0CreateVMReq((PGVMMCREATEVMREQ)pReqHdr);
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync return GVMMR0SchedWakeUpAndPokeCpusReq(pVM, (PGVMMSCHEDWAKEUPANDPOKECPUSREQ)pReqHdr);
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync return GVMMR0QueryStatisticsReq(pVM, (PGVMMQUERYSTATISTICSSREQ)pReqHdr);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync return GVMMR0ResetStatisticsReq(pVM, (PGVMMRESETSTATISTICSSREQ)pReqHdr);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Initialize the R0 part of a VM instance.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Terminate the R0 part of a VM instance.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Attempt to enable hwacc mode and check the current setting.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Setup the hardware accelerated session.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Switch to RC to execute Hypervisor function.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync /* Safety precaution as HWACCM can disable the switcher. */
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync /* We might need to disable VT-x if the active switcher turns off paging. */
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync /* Re-enable VT-x if previously turned off. */
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync /** @todo dispatch interrupts? */
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * PGM wrappers.
0433783a793d5ced0dc7f9dcf102143b66e1cd2cvboxsync return PGMR0PhysAllocateHandyPages(pVM, &pVM->aCpus[idCpu]);
0433783a793d5ced0dc7f9dcf102143b66e1cd2cvboxsync return PGMR0PhysAllocateLargeHandyPage(pVM, &pVM->aCpus[idCpu]);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * GMM wrappers.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync return GMMR0InitialReservationReq(pVM, idCpu, (PGMMINITIALRESERVATIONREQ)pReqHdr);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync return GMMR0UpdateReservationReq(pVM, idCpu, (PGMMUPDATERESERVATIONREQ)pReqHdr);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync return GMMR0AllocatePagesReq(pVM, idCpu, (PGMMALLOCATEPAGESREQ)pReqHdr);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync return GMMR0FreePagesReq(pVM, idCpu, (PGMMFREEPAGESREQ)pReqHdr);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync return GMMR0FreeLargePageReq(pVM, idCpu, (PGMMFREELARGEPAGEREQ)pReqHdr);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync return GMMR0QueryHypervisorMemoryStatsReq(pVM, (PGMMMEMSTATSREQ)pReqHdr);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync return GMMR0QueryMemoryStatsReq(pVM, idCpu, (PGMMMEMSTATSREQ)pReqHdr);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync return GMMR0BalloonedPagesReq(pVM, idCpu, (PGMMBALLOONEDPAGESREQ)pReqHdr);
5d6df5999c0e844db1af3c6def0a9abac5120d3bvboxsync return GMMR0MapUnmapChunkReq(pVM, idCpu, (PGMMMAPUNMAPCHUNKREQ)pReqHdr);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync return GMMR0SeedChunk(pVM, idCpu, (RTR3PTR)u64Arg);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync return GMMR0RegisterSharedModuleReq(pVM, idCpu, (PGMMREGISTERSHAREDMODULEREQ)pReqHdr);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync return GMMR0UnregisterSharedModuleReq(pVM, idCpu, (PGMMUNREGISTERSHAREDMODULEREQ)pReqHdr);
b14965bee0bfb359e6ce9db6beaa4add9935fe3cvboxsync /* Select a valid VCPU context. */
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync /* Clear the VCPU context. */
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * A quick GCFGM mock-up.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync /** @todo GCFGM with proper access control, ring-3 management interface and all that. */
6abae205eac4f4a16f6ad5a2a71ed1f36d6a57b0vboxsync if (pVM || !pReqHdr || u64Arg || idCpu != NIL_VMCPUID)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync rc = GVMMR0SetConfig(pReq->pSession, &pReq->szName[0], pReq->u64Value);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync //if (rc == VERR_CFGM_VALUE_NOT_FOUND)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync // rc = GMMR0SetConfig(pReq->pSession, &pReq->szName[0], pReq->u64Value);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync rc = GVMMR0QueryConfig(pReq->pSession, &pReq->szName[0], &pReq->u64Value);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync //if (rc == VERR_CFGM_VALUE_NOT_FOUND)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync // rc = GMMR0QueryConfig(pReq->pSession, &pReq->szName[0], &pReq->u64Value);
5d6df5999c0e844db1af3c6def0a9abac5120d3bvboxsync * PDM Wrappers.
63a3c5be7ac89d0d5b3386988f8c2f78df0cacf6vboxsync if (!pVM || !pReqHdr || u64Arg || idCpu != NIL_VMCPUID)
63a3c5be7ac89d0d5b3386988f8c2f78df0cacf6vboxsync return PDMR0DriverCallReqHandler(pVM, (PPDMDRIVERCALLREQHANDLERREQ)pReqHdr);
63a3c5be7ac89d0d5b3386988f8c2f78df0cacf6vboxsync * Requests to the internal networking service.
dbed7f90d58f22958c5c9deb0479a8388838e3b1vboxsync if (u64Arg || !pReq || !vmmR0IsValidSession(pVM, pReq->pSession, pSession) || idCpu != NIL_VMCPUID)
dbed7f90d58f22958c5c9deb0479a8388838e3b1vboxsync if (u64Arg || !pReqHdr || !vmmR0IsValidSession(pVM, ((PINTNETIFCLOSEREQ)pReqHdr)->pSession, pSession) || idCpu != NIL_VMCPUID)
dbed7f90d58f22958c5c9deb0479a8388838e3b1vboxsync return IntNetR0IfCloseReq(pSession, (PINTNETIFCLOSEREQ)pReqHdr);
5d6df5999c0e844db1af3c6def0a9abac5120d3bvboxsync if (u64Arg || !pReqHdr || !vmmR0IsValidSession(pVM, ((PINTNETIFGETBUFFERPTRSREQ)pReqHdr)->pSession, pSession) || idCpu != NIL_VMCPUID)
63a3c5be7ac89d0d5b3386988f8c2f78df0cacf6vboxsync return IntNetR0IfGetBufferPtrsReq(pSession, (PINTNETIFGETBUFFERPTRSREQ)pReqHdr);
63a3c5be7ac89d0d5b3386988f8c2f78df0cacf6vboxsync if (u64Arg || !pReqHdr || !vmmR0IsValidSession(pVM, ((PINTNETIFSETPROMISCUOUSMODEREQ)pReqHdr)->pSession, pSession) || idCpu != NIL_VMCPUID)
63a3c5be7ac89d0d5b3386988f8c2f78df0cacf6vboxsync return IntNetR0IfSetPromiscuousModeReq(pSession, (PINTNETIFSETPROMISCUOUSMODEREQ)pReqHdr);
63a3c5be7ac89d0d5b3386988f8c2f78df0cacf6vboxsync if (u64Arg || !pReqHdr || !vmmR0IsValidSession(pVM, ((PINTNETIFSETMACADDRESSREQ)pReqHdr)->pSession, pSession) || idCpu != NIL_VMCPUID)
63a3c5be7ac89d0d5b3386988f8c2f78df0cacf6vboxsync return IntNetR0IfSetMacAddressReq(pSession, (PINTNETIFSETMACADDRESSREQ)pReqHdr);
63a3c5be7ac89d0d5b3386988f8c2f78df0cacf6vboxsync if (u64Arg || !pReqHdr || !vmmR0IsValidSession(pVM, ((PINTNETIFSETACTIVEREQ)pReqHdr)->pSession, pSession) || idCpu != NIL_VMCPUID)
63a3c5be7ac89d0d5b3386988f8c2f78df0cacf6vboxsync return IntNetR0IfSetActiveReq(pSession, (PINTNETIFSETACTIVEREQ)pReqHdr);
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync if (u64Arg || !pReqHdr || !vmmR0IsValidSession(pVM, ((PINTNETIFSENDREQ)pReqHdr)->pSession, pSession) || idCpu != NIL_VMCPUID)
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync return IntNetR0IfSendReq(pSession, (PINTNETIFSENDREQ)pReqHdr);
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync if (u64Arg || !pReqHdr || !vmmR0IsValidSession(pVM, ((PINTNETIFWAITREQ)pReqHdr)->pSession, pSession) || idCpu != NIL_VMCPUID)
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync return IntNetR0IfWaitReq(pSession, (PINTNETIFWAITREQ)pReqHdr);
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * For profiling.
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * For testing Ring-0 APIs invoked in this environment.
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync /** @todo make new test */
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync#if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * We're returning VERR_NOT_SUPPORT here so we've got something else
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * than -1 which the interrupt gate glue code might return.
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync Log(("operation %#x is not supported\n", enmOperation));
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * Argument for vmmR0EntryExWrapper containing the arguments for VMMR0EntryEx.
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync/** Pointer to a vmmR0EntryExWrapper argument package. */
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * This is just a longjmp wrapper function for VMMR0EntryEx calls.
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * @returns VBox status code.
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * @param pvArgs The argument package
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync return vmmR0EntryExWorker(((PVMMR0ENTRYEXARGS)pvArgs)->pVM,
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * The Ring 0 entry point, called by the support library (SUP).
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * @returns VBox status code.
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * @param pVM The VM to operate on.
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * @param idCpu Virtual CPU ID argument. Must be NIL_VMCPUID if pVM
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * is NIL_RTR0PTR, and may be NIL_VMCPUID if it isn't
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * @param enmOperation Which operation to execute.
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * @param pReq This points to a SUPVMMR0REQHDR packet. Optional.
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * @param u64Arg Some simple constant argument.
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * @param pSession The session of the caller.
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * @remarks Assume called with interrupts _enabled_.
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsyncVMMR0DECL(int) VMMR0EntryEx(PVM pVM, VMCPUID idCpu, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION pSession)
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * Requests that should only happen on the EMT thread will be
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * wrapped in a setjmp so we can assert without causing trouble.
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync /* These might/will be called before VMMR3Init. */
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync /* On the mac we might not have a valid jmp buf, so check these as well. */
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync /** @todo validate this EMT claim... GVM knows. */
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync return vmmR0CallRing3SetJmpEx(&pVCpu->vmm.s.CallRing3JmpBufR0, vmmR0EntryExWrapper, &Args);
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync return vmmR0EntryExWorker(pVM, idCpu, enmOperation, pReq, u64Arg, pSession);
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * Internal R0 logger worker: Flush logger.
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * @param pLogger The logger instance to flush.
d074b9bd5c1fffc376db9d56ff9d090fb9ced642vboxsync * @remark This function must be exported!
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Convert the pLogger into a VM handle and 'call' back to Ring-3.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * (This is a bit paranoid code.)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync PVMMR0LOGGER pR0Logger = (PVMMR0LOGGER)((uintptr_t)pLogger - RT_OFFSETOF(VMMR0LOGGER, Logger));
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync SUPR0Printf("vmmR0LoggerFlush: pLogger=%p!\n", pLogger);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync return; /* quietly */
8d7d8eab781262b9db094374b166806c03786fa2vboxsync SUPR0Printf("vmmR0LoggerFlush: pVM=%p! pVMR0=%p! pLogger=%p\n", pVM, pVM->pVMR0, pLogger);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Check that the jump buffer is armed.
ed82223f8f7be1435bf9b203a0ee4fbdfc856dc8vboxsync SUPR0Printf("vmmR0LoggerFlush: Jump buffer isn't armed!\n");
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync VMMRZCallRing3(pVM, pVCpu, VMMCALLRING3_VMM_LOGGER_FLUSH, 0);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Interal R0 logger worker: Custom prefix.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @returns Number of chars written.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @param pLogger The logger instance.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @param pchBuf The output buffer.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @param cchBuf The size of the buffer.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @param pvUser User argument (ignored).
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncVMMR0DECL(size_t) vmmR0LoggerPrefix(PRTLOGGER pLogger, char *pchBuf, size_t cchBuf, void *pvUser)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync PVMMR0LOGGER pR0Logger = (PVMMR0LOGGER)((uintptr_t)pLogger - RT_OFFSETOF(VMMR0LOGGER, Logger));
f632be0ea31134f1ce343e84c90d7984d2bf96b2vboxsync static const char s_szHex[17] = "0123456789abcdef";
b2e90826ea719b22452d1ff7b977d4f40995b428vboxsync * Disables flushing of the ring-0 debug log.
b2e90826ea719b22452d1ff7b977d4f40995b428vboxsync * @param pVCpu The shared virtual cpu structure.
e43d0b86db65e202efb63f0fc5fce1f981267a32vboxsync pVCpu->vmm.s.pR0LoggerR0->fFlushingDisabled = true;
e43d0b86db65e202efb63f0fc5fce1f981267a32vboxsync * Enables flushing of the ring-0 debug log.
b2e90826ea719b22452d1ff7b977d4f40995b428vboxsync * @param pVCpu The shared virtual cpu structure.
e43d0b86db65e202efb63f0fc5fce1f981267a32vboxsync pVCpu->vmm.s.pR0LoggerR0->fFlushingDisabled = false;
b2e90826ea719b22452d1ff7b977d4f40995b428vboxsync * Jump back to ring-3 if we're the EMT and the longjmp is armed.
db07105a44f53e9e2377ade02cd3dbe482647cb9vboxsync * @returns true if the breakpoint should be hit, false if it should be ignored.
b2e90826ea719b22452d1ff7b977d4f40995b428vboxsync return true;
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync int rc = VMMRZCallRing3(pVM, pVCpu, VMMCALLRING3_VM_R0_ASSERTION, 0);
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync return true;
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync return false;
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Override this so we can push it up to ring-3.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @param pszExpr Expression. Can be NULL.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @param uLine Location line number.
a0a3a26a4065b9401681a8c99a11bd83e08f94ccvboxsync * @param pszFile Location file name.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * @param pszFunction Location function name.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsyncDECLEXPORT(void) RTCALL RTAssertMsg1Weak(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction)
f3abe19bdaeea1b354674327ee95707281a6ad83vboxsync * To the log.
78df65edff21c11c537f38e736707ea434ab5623vboxsync "Expression: %s\n"
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync "Location : %s(%d) %s\n",
78df65edff21c11c537f38e736707ea434ab5623vboxsync * To the global VMM buffer.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync RTStrPrintf(pVM->vmm.s.szRing0AssertMsg1, sizeof(pVM->vmm.s.szRing0AssertMsg1),
78df65edff21c11c537f38e736707ea434ab5623vboxsync "\n!!R0-Assertion Failed!!\n"
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync "Expression: %s\n"
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync "Location : %s(%d) %s\n",
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Continue the normal way.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync RTAssertMsg1(pszExpr, uLine, pszFile, pszFunction);
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Callback for RTLogFormatV which writes to the ring-3 log port.
63a3c5be7ac89d0d5b3386988f8c2f78df0cacf6vboxsync * See PFNLOGOUTPUT() for details.
63a3c5be7ac89d0d5b3386988f8c2f78df0cacf6vboxsyncstatic DECLCALLBACK(size_t) rtLogOutput(void *pv, const char *pachChars, size_t cbChars)
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync * Override this so we can push it up to ring-3.
ed82223f8f7be1435bf9b203a0ee4fbdfc856dc8vboxsync * @param pszFormat The format string.
ed82223f8f7be1435bf9b203a0ee4fbdfc856dc8vboxsync * @param va Arguments.
ed82223f8f7be1435bf9b203a0ee4fbdfc856dc8vboxsyncDECLEXPORT(void) RTCALL RTAssertMsg2WeakV(const char *pszFormat, va_list va)
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync * Push the message to the logger.
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync PRTLOGGER pLog = RTLogDefaultInstance(); /** @todo we want this for release as well! */
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync RTLogFormatV(rtLogOutput, pLog, pszFormat, vaCopy);
23ff0a80f28ba27da3cb458face82665fe65e96cvboxsync * Push it to the global VMM buffer.
30a23dfc653298a09d77d3045cf873b1bd6ddecfvboxsync RTStrPrintfV(pVM->vmm.s.szRing0AssertMsg2, sizeof(pVM->vmm.s.szRing0AssertMsg2), pszFormat, vaCopy);
773930cfb10036a8562bad8590f1d9377484c578vboxsync * Continue the normal way.