0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * VMM - The Virtual Machine Monitor.
c1d279fc0865b91a40b30eda02ed14f6533fe1a4vboxsync * Copyright (C) 2006-2015 Oracle Corporation
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * available from http://www.virtualbox.org. This file is free software;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * you can redistribute it and/or modify it under the terms of the GNU
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * General Public License (GPL) as published by the Free Software
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The contents of this file may alternatively be used under the terms
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * of the Common Development and Distribution License Version 1.0
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * VirtualBox OSE distribution, in which case the provisions of the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * CDDL are applicable instead of those of the GPL.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * You may elect to license modified versions of this file under the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * terms and conditions of either the GPL or the CDDL or both.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @defgroup grp_vmm The Virtual Machine Monitor API
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * World switcher identifiers.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The usual invalid 0. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Switcher for 32-bit host to 32-bit shadow paging. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Switcher for 32-bit host paging to PAE shadow paging. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Switcher for 32-bit host paging to AMD64 shadow paging. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Switcher for PAE host to 32-bit shadow paging. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Switcher for PAE host to PAE shadow paging. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Switcher for PAE host paging to AMD64 shadow paging. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Switcher for AMD64 host paging to 32-bit shadow paging. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Switcher for AMD64 host paging to PAE shadow paging. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Switcher for AMD64 host paging to AMD64 shadow paging. */
ae20b83f0c94402a3e3ac021c3d4e5f827e4905cvboxsync /** Stub switcher for 32-bit and PAE. */
ae20b83f0c94402a3e3ac021c3d4e5f827e4905cvboxsync /** Stub switcher for AMD64. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Used to make a count for array declarations and suchlike. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The usual 32-bit paranoia. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * VMMRZCallRing3 operations.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Invalid operation. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Acquire the PDM lock. */
afa761a969c8883e5ea370e898d40ce053fbcb22vboxsync /** Acquire the critical section specified as argument. */
8c7f1eb426ed2259c4ed882d80af2666b2490867vboxsync /** Enter the R/W critical section (in argument) exclusively. */
8c7f1eb426ed2259c4ed882d80af2666b2490867vboxsync /** Enter the R/W critical section (in argument) shared. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Acquire the PGM lock. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Grow the PGM shadow page pool. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Maps a chunk into ring-3. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Allocates more handy pages. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Allocates a large (2MB) page. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Acquire the MM hypervisor heap lock. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Replay the REM handler notifications. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Flush the GC/R0 logger. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Set the VM error message. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Set the VM runtime error message. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Signal a ring 0 assertion. */
081c3b36a07589055ec98579ea9d22d2074c8164vboxsync /** Ring switch to force preemption. This is also used by PDMCritSect to
081c3b36a07589055ec98579ea9d22d2074c8164vboxsync * handle VERR_INTERRUPTED in kernel context. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Sync the FTM state with the standby node. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The usual 32-bit hack. */
c618f4d0eeea6061ff8270e8f7023a999bd0bb91vboxsync * VMMRZCallRing3 notification callback.
aed81459e71ba16e05b7155dc0ef77e644951807vboxsync * @returns VBox status code.
c618f4d0eeea6061ff8270e8f7023a999bd0bb91vboxsync * @param pVCpu Pointer to the VMCPU.
c618f4d0eeea6061ff8270e8f7023a999bd0bb91vboxsync * @param enmOperation The operation causing the ring-3 jump.
c618f4d0eeea6061ff8270e8f7023a999bd0bb91vboxsync * @param pvUser The user argument.
aed81459e71ba16e05b7155dc0ef77e644951807vboxsynctypedef DECLCALLBACK(int) FNVMMR0CALLRING3NOTIFICATION(PVMCPU pVCpu, VMMCALLRING3 enmOperation, void *pvUser);
c618f4d0eeea6061ff8270e8f7023a999bd0bb91vboxsync/** Pointer to a FNRTMPNOTIFICATION(). */
c618f4d0eeea6061ff8270e8f7023a999bd0bb91vboxsynctypedef FNVMMR0CALLRING3NOTIFICATION *PFNVMMR0CALLRING3NOTIFICATION;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Rendezvous callback.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox strict status code - EM scheduling. Do not return
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * informational status code other than the ones used by EM for
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * scheduling.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pVM The VM handle.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pVCpu The handle of the calling virtual CPU.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pvUser The user argument.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef DECLCALLBACK(VBOXSTRICTRC) FNVMMEMTRENDEZVOUS(PVM pVM, PVMCPU pVCpu, void *pvUser);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a rendezvous callback function. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Method table that the VMM uses to call back the user of the VMM.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Magic value (VMM2USERMETHODS_MAGIC). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Structure version (VMM2USERMETHODS_VERSION). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Save the VM state.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @returns VBox status code.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @param pThis Pointer to the callback method table.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * @param pUVM The user mode VM handle.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @remarks This member shall be set to NULL if the operation is not
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * supported.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync DECLR3CALLBACKMEMBER(int, pfnSaveState,(PCVMM2USERMETHODS pThis, PUVM pUVM));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** @todo Move pfnVMAtError and pfnCFGMConstructor here? */
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * EMT initialization notification callback.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * This is intended for doing per-thread initialization for EMTs (like COM
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * @param pThis Pointer to the callback method table.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * @param pUVM The user mode VM handle.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * @param pUVCpu The user mode virtual CPU handle.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * @remarks This is optional and shall be set to NULL if not wanted.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync DECLR3CALLBACKMEMBER(void, pfnNotifyEmtInit,(PCVMM2USERMETHODS pThis, PUVM pUVM, PUVMCPU pUVCpu));
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * EMT termination notification callback.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * This is intended for doing per-thread cleanups for EMTs (like COM).
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * @param pThis Pointer to the callback method table.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * @param pUVM The user mode VM handle.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * @param pUVCpu The user mode virtual CPU handle.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * @remarks This is optional and shall be set to NULL if not wanted.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync DECLR3CALLBACKMEMBER(void, pfnNotifyEmtTerm,(PCVMM2USERMETHODS pThis, PUVM pUVM, PUVMCPU pUVCpu));
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * PDM thread initialization notification callback.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * This is intended for doing per-thread initialization (like COM init).
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * @param pThis Pointer to the callback method table.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * @param pUVM The user mode VM handle.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * @remarks This is optional and shall be set to NULL if not wanted.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync DECLR3CALLBACKMEMBER(void, pfnNotifyPdmtInit,(PCVMM2USERMETHODS pThis, PUVM pUVM));
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * EMT termination notification callback.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * This is intended for doing per-thread cleanups for EMTs (like COM).
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * @param pThis Pointer to the callback method table.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * @param pUVM The user mode VM handle.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync * @remarks This is optional and shall be set to NULL if not wanted.
486d3fda5cadcf6d8357df872455cdd8796b3556vboxsync DECLR3CALLBACKMEMBER(void, pfnNotifyPdmtTerm,(PCVMM2USERMETHODS pThis, PUVM pUVM));
aafa3e3a526c178adf4947048684ed4590a16981vboxsync * Notification callback that that a VM reset will be turned into a power off.
aafa3e3a526c178adf4947048684ed4590a16981vboxsync * @param pThis Pointer to the callback method table.
aafa3e3a526c178adf4947048684ed4590a16981vboxsync * @param pUVM The user mode VM handle.
aafa3e3a526c178adf4947048684ed4590a16981vboxsync * @remarks This is optional and shall be set to NULL if not wanted.
aafa3e3a526c178adf4947048684ed4590a16981vboxsync DECLR3CALLBACKMEMBER(void, pfnNotifyResetTurnedIntoPowerOff,(PCVMM2USERMETHODS pThis, PUVM pUVM));
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Magic value (VMM2USERMETHODS_MAGIC) marking the end of the structure. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Magic value of the VMM2USERMETHODS (Franz Kafka). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** The VMM2USERMETHODS structure version. */
aafa3e3a526c178adf4947048684ed4590a16981vboxsync#define VMM2USERMETHODS_VERSION UINT32_C(0x00020001)
ead20681ed6c34b0fc835c3e6c19b8034856653avboxsync * Checks whether we've armed the ring-0 long jump machinery.
ead20681ed6c34b0fc835c3e6c19b8034856653avboxsync * @returns @c true / @c false
ead20681ed6c34b0fc835c3e6c19b8034856653avboxsync * @param pVCpu The caller's cross context virtual CPU structure.
ead20681ed6c34b0fc835c3e6c19b8034856653avboxsync * @thread EMT
ead20681ed6c34b0fc835c3e6c19b8034856653avboxsync * @sa VMMR0IsLongJumpArmed
ead20681ed6c34b0fc835c3e6c19b8034856653avboxsync# define VMMIsLongJumpArmed(a_pVCpu) VMMR0IsLongJumpArmed(a_pVCpu)
e218a78cf91e0a6e295bffe1998e96b308c5a13avboxsyncVMMDECL(PVMCPU) VMMGetCpuById(PVM pVM, VMCPUID idCpu);
e218a78cf91e0a6e295bffe1998e96b308c5a13avboxsyncVMMR3DECL(PVMCPU) VMMR3GetCpuByIdU(PUVM pVM, VMCPUID idCpu);
fa35e2dfd910e18dbb7f136bfe56030e5116d51cvboxsyncVMM_INT_DECL(int) VMMPatchHypercall(PVM pVM, void *pvBuf, size_t cbBuf, size_t *pcbWritten);
66d96ba0c4c722996a3a1e6d92403a14a27db1b4vboxsyncVMM_INT_DECL(void) VMMHypercallsEnable(PVMCPU pVCpu);
66d96ba0c4c722996a3a1e6d92403a14a27db1b4vboxsyncVMM_INT_DECL(void) VMMHypercallsDisable(PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @defgroup grp_vmm_r3 The VMM Host Context Ring 3 API
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3_INT_DECL(int) VMMR3InitCompleted(PVM pVM, VMINITCOMPLETED enmWhat);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3_INT_DECL(void) VMMR3Relocate(PVM pVM, RTGCINTPTR offDelta);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(const char *) VMMR3GetRZAssertMsg1(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(const char *) VMMR3GetRZAssertMsg2(PVM pVM);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3_INT_DECL(int) VMMR3SelectSwitcher(PVM pVM, VMMSWITCHER enmSwitcher);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3_INT_DECL(RTR0PTR) VMMR3GetHostToGuestSwitcher(PVM pVM, VMMSWITCHER enmSwitcher);
1b28537ff3aabbe3afa3fa15cc0436384ff1c827vboxsyncVMMR3_INT_DECL(int) VMMR3HmRunGC(PVM pVM, PVMCPU pVCpu);
a000f6190af85455eefaa1097deaeea087cfc5e5vboxsyncVMMR3_INT_DECL(int) VMMR3RawRunGC(PVM pVM, PVMCPU pVCpu);
a000f6190af85455eefaa1097deaeea087cfc5e5vboxsyncVMMR3DECL(int) VMMR3ResumeHyper(PVM pVM, PVMCPU pVCpu);
a000f6190af85455eefaa1097deaeea087cfc5e5vboxsyncVMMR3_INT_DECL(int) VMMR3GetImportRC(PVM pVM, const char *pszSymbol, PRTRCPTR pRCPtrValue);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) VMMR3CallRC(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, ...);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) VMMR3CallRCV(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, va_list args);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) VMMR3CallR0(PVM pVM, uint32_t uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(void) VMMR3FatalDump(PVM pVM, PVMCPU pVCpu, int rcErr);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3_INT_DECL(void) VMMR3SendSipi(PVM pVM, VMCPUID idCpu, uint32_t uVector);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3_INT_DECL(void) VMMR3SendInitIpi(PVM pVM, VMCPUID idCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) VMMR3RegisterPatchMemory(PVM pVM, RTGCPTR pPatchMem, unsigned cbPatchMem);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) VMMR3DeregisterPatchMemory(PVM pVM, RTGCPTR pPatchMem, unsigned cbPatchMem);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3DECL(int) VMMR3EmtRendezvous(PVM pVM, uint32_t fFlags, PFNVMMEMTRENDEZVOUS pfnRendezvous, void *pvUser);
90bb13bdf70379f91f6aeb334f70287a5096fb02vboxsyncVMMR3_INT_DECL(bool) VMMR3EmtRendezvousSetDisabled(PVMCPU pVCpu, bool fDisabled);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @defgroup grp_VMMR3EmtRendezvous_fFlags VMMR3EmtRendezvous flags
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Execution type mask. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define VMMEMTRENDEZVOUS_FLAGS_TYPE_MASK UINT32_C(0x00000007)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Invalid execution type. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define VMMEMTRENDEZVOUS_FLAGS_TYPE_INVALID UINT32_C(0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Let the EMTs execute the callback one by one (in no particular order). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define VMMEMTRENDEZVOUS_FLAGS_TYPE_ONE_BY_ONE UINT32_C(1)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Let all the EMTs execute the callback at the same time. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define VMMEMTRENDEZVOUS_FLAGS_TYPE_ALL_AT_ONCE UINT32_C(2)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Only execute the callback on one EMT (no particular one). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define VMMEMTRENDEZVOUS_FLAGS_TYPE_ONCE UINT32_C(3)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Let the EMTs execute the callback one by one in ascending order. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define VMMEMTRENDEZVOUS_FLAGS_TYPE_ASCENDING UINT32_C(4)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Let the EMTs execute the callback one by one in descending order. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define VMMEMTRENDEZVOUS_FLAGS_TYPE_DESCENDING UINT32_C(5)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Stop after the first error.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This is not valid for any execution type where more than one EMT is active
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * at a time. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define VMMEMTRENDEZVOUS_FLAGS_STOP_ON_ERROR UINT32_C(0x00000008)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** The valid flags. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define VMMEMTRENDEZVOUS_FLAGS_VALID_MASK UINT32_C(0x0000000f)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3_INT_DECL(int) VMMR3EmtRendezvousFF(PVM pVM, PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMR3_INT_DECL(int) VMMR3ReadR0Stack(PVM pVM, VMCPUID idCpu, RTHCUINTPTR R0Addr, void *pvBuf, size_t cbRead);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* IN_RING3 */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @defgroup grp_vmm_r0 The VMM Host Context Ring 0 API
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The VMMR0Entry() codes.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Run guest context. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Run guest code using the available hardware acceleration technology. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Official NOP that we use for profiling. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Official slow iocl NOP that we use for profiling. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Ask the GVMM to create a new VM. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Ask the GVMM to destroy the VM. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GVMMR0SchedHalt(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GVMMR0SchedWakeUp(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GVMMR0SchedPoke(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GVMMR0SchedWakeUpAndPokeCpus(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GVMMR0SchedPoll(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GVMMR0QueryStatistics(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GVMMR0ResetStatistics(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GVMMR0RegisterVCpu(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call VMMR0 Per VM Init. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call VMMR0 Per VM Termination. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Setup the hardware accelerated raw-mode session. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Attempt to enable or disable hardware accelerated raw-mode. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Calls function in the hypervisor.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The caller must setup the hypervisor context so the call will be performed.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * The difference between VMMR0_DO_RUN_GC and this one is the handling of
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * the return GC code. The return code will not be interpreted by this operation.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call PGMR0PhysAllocateHandyPages(). */
4f007e159d64d64366398032617896c3a982fa42vboxsync /** Call PGMR0PhysFlushHandyPages(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call PGMR0AllocateLargePage(). */
e2bd93b4f9c38c9b01eb960ba7bc1fc9c4d38ce8vboxsync /** Call PGMR0PhysSetupIommu(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GMMR0InitialReservation(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GMMR0UpdateReservation(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GMMR0AllocatePages(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GMMR0FreePages(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GMMR0FreeLargePage(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GMMR0QueryHypervisorMemoryStatsReq(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GMMR0QueryMemoryStatsReq(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GMMR0BalloonedPages(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GMMR0MapUnmapChunk(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GMMR0SeedChunk(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GMMR0RegisterSharedModule. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GMMR0UnregisterSharedModule. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GMMR0ResetSharedModules. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GMMR0CheckSharedModules. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call GMMR0FindDuplicatePage. */
4d4f336b656d46f8d301603114bb99ce635aafc0vboxsync /** Call GMMR0QueryStatistics(). */
4d4f336b656d46f8d301603114bb99ce635aafc0vboxsync /** Call GMMR0ResetStatistics(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Set a GVMM or GMM configuration value. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Query a GVMM or GMM configuration value. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call PDMR0DriverCallReqHandler. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call PDMR0DeviceCallReqHandler. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The start of the R0 service operations. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call IntNetR0Open(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call IntNetR0IfClose(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call IntNetR0IfGetBufferPtrs(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call IntNetR0IfSetPromiscuousMode(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call IntNetR0IfSetMacAddress(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call IntNetR0IfSetActive(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call IntNetR0IfSend(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call IntNetR0IfWait(). */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Call IntNetR0IfAbortWait(). */
0547b5d21ca43e39c3b6fba8cd9988b1338d61d0vboxsync /** Forward call to the PCI driver */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The end of the R0 service operations. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Official call we use for testing Ring-0 APIs. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** Test the 32->64 bits switcher. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The usual 32-bit type blow up. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Request buffer for VMMR0_DO_GCFGM_SET_VALUE and VMMR0_DO_GCFGM_QUERY_VALUE.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @todo Move got GCFGM.h when it's implemented.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The request header.*/
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The support driver session handle. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The value.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This is input for the set request and output for the query. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync /** The variable name.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This is fixed sized just to make things simple for the mock-up. */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** Pointer to a VMMR0_DO_GCFGM_SET_VALUE and VMMR0_DO_GCFGM_QUERY_VALUE request buffer.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @todo Move got GCFGM.h when it's implemented.
9577536266a8da7dbbe29fd3be840cbfc0dc9721vboxsyncVMMR0DECL(int) VMMR0EntryInt(PVM pVM, VMMR0OPERATION enmOperation, void *pvArg);
9577536266a8da7dbbe29fd3be840cbfc0dc9721vboxsyncVMMR0DECL(void) VMMR0EntryFast(PVM pVM, VMCPUID idCpu, VMMR0OPERATION enmOperation);
9577536266a8da7dbbe29fd3be840cbfc0dc9721vboxsyncVMMR0DECL(int) VMMR0EntryEx(PVM pVM, VMCPUID idCpu, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION);
3d4d663e8a1ee0b014b577aa90f3b6eba964b184vboxsyncVMMR0_INT_DECL(int) VMMR0TermVM(PVM pVM, PGVM pGVM);
ead20681ed6c34b0fc835c3e6c19b8034856653avboxsyncVMMR0_INT_DECL(bool) VMMR0IsLongJumpArmed(PVMCPU pVCpu);
0b70b2329a24edb70aa57ffc3503453e319e00cevboxsyncVMMR0_INT_DECL(bool) VMMR0IsInRing3LongJump(PVMCPU pVCpu);
267bc3f874798b1f7b44c9c2451a65251a3a0274vboxsyncVMMR0_INT_DECL(int) VMMR0ThreadCtxHooksCreate(PVMCPU pVCpu);
267bc3f874798b1f7b44c9c2451a65251a3a0274vboxsyncVMMR0_INT_DECL(void) VMMR0ThreadCtxHooksRelease(PVMCPU pVCpu);
267bc3f874798b1f7b44c9c2451a65251a3a0274vboxsyncVMMR0_INT_DECL(bool) VMMR0ThreadCtxHooksAreCreated(PVMCPU pVCpu);
267bc3f874798b1f7b44c9c2451a65251a3a0274vboxsyncVMMR0_INT_DECL(int) VMMR0ThreadCtxHooksRegister(PVMCPU pVCpu, PFNRTTHREADCTXHOOK pfnHook);
267bc3f874798b1f7b44c9c2451a65251a3a0274vboxsyncVMMR0_INT_DECL(void) VMMR0ThreadCtxHooksDeregister(PVMCPU pVCpu);
267bc3f874798b1f7b44c9c2451a65251a3a0274vboxsyncVMMR0_INT_DECL(bool) VMMR0ThreadCtxHooksAreRegistered(PVMCPU pVCpu);
3d4d663e8a1ee0b014b577aa90f3b6eba964b184vboxsyncVMMR0_INT_DECL(void) VMMR0LogFlushDisable(PVMCPU pVCpu);
3d4d663e8a1ee0b014b577aa90f3b6eba964b184vboxsyncVMMR0_INT_DECL(void) VMMR0LogFlushEnable(PVMCPU pVCpu);
3d4d663e8a1ee0b014b577aa90f3b6eba964b184vboxsyncVMMR0_INT_DECL(bool) VMMR0IsLogFlushDisabled(PVMCPU pVCpu);
0b70b2329a24edb70aa57ffc3503453e319e00cevboxsync# define VMMR0LogFlushDisable(pVCpu) do { } while(0)
b5b0f33fccccfe452c218343ff7ac78da470d3d6vboxsync# endif /* LOG_ENABLED */
b5b0f33fccccfe452c218343ff7ac78da470d3d6vboxsync#endif /* IN_RING0 */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @defgroup grp_vmm_rc The VMM Raw-Mode Context API
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMRCDECL(int) VMMGCEntry(PVM pVM, unsigned uOperation, unsigned uArg, ...);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* IN_RC */
c1d279fc0865b91a40b30eda02ed14f6533fe1a4vboxsync#if defined(IN_RC) || defined(IN_RING0) || defined(DOXYGEN_RUNNING)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @defgroup grp_vmm_rz The VMM Raw-Mode and Ring-0 Context API
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMRZDECL(int) VMMRZCallRing3(PVM pVM, PVMCPU pVCpu, VMMCALLRING3 enmOperation, uint64_t uArg);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMRZDECL(int) VMMRZCallRing3NoCpu(PVM pVM, VMMCALLRING3 enmOperation, uint64_t uArg);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMRZDECL(void) VMMRZCallRing3Disable(PVMCPU pVCpu);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncVMMRZDECL(bool) VMMRZCallRing3IsEnabled(PVMCPU pVCpu);
89f5aff9eff63826c9b171cc7fdb9dc1513fa09dvboxsyncVMMRZDECL(int) VMMRZCallRing3SetNotification(PVMCPU pVCpu, R0PTRTYPE(PFNVMMR0CALLRING3NOTIFICATION) pfnCallback, RTR0PTR pvUser);
c618f4d0eeea6061ff8270e8f7023a999bd0bb91vboxsyncVMMRZDECL(void) VMMRZCallRing3RemoveNotification(PVMCPU pVCpu);