vmm.h revision 362d7d46d58851d6f8a546b863b58b60c51afdae
ece9652d971886b99a269656ea4782319637e75avboxsync * VMM - The Virtual Machine Monitor.
ece9652d971886b99a269656ea4782319637e75avboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
ece9652d971886b99a269656ea4782319637e75avboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
ece9652d971886b99a269656ea4782319637e75avboxsync * available from http://www.virtualbox.org. This file is free software;
ece9652d971886b99a269656ea4782319637e75avboxsync * you can redistribute it and/or modify it under the terms of the GNU
ece9652d971886b99a269656ea4782319637e75avboxsync * General Public License (GPL) as published by the Free Software
ece9652d971886b99a269656ea4782319637e75avboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
ece9652d971886b99a269656ea4782319637e75avboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
ece9652d971886b99a269656ea4782319637e75avboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
ece9652d971886b99a269656ea4782319637e75avboxsync * The contents of this file may alternatively be used under the terms
ece9652d971886b99a269656ea4782319637e75avboxsync * of the Common Development and Distribution License Version 1.0
ece9652d971886b99a269656ea4782319637e75avboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
ece9652d971886b99a269656ea4782319637e75avboxsync * VirtualBox OSE distribution, in which case the provisions of the
ece9652d971886b99a269656ea4782319637e75avboxsync * CDDL are applicable instead of those of the GPL.
ece9652d971886b99a269656ea4782319637e75avboxsync * You may elect to license modified versions of this file under the
ece9652d971886b99a269656ea4782319637e75avboxsync * terms and conditions of either the GPL or the CDDL or both.
ece9652d971886b99a269656ea4782319637e75avboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
ece9652d971886b99a269656ea4782319637e75avboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
e7f5b62e52275099a4d14501306063e23876b771vboxsync * additional information or have any questions.
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync/** @defgroup grp_vmm The Virtual Machine Monitor API
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync * World switcher identifiers.
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** The usual invalid 0. */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Switcher for 32-bit host to 32-bit shadow paging. */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Switcher for 32-bit host paging to PAE shadow paging. */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Switcher for 32-bit host paging to AMD64 shadow paging. */
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync /** Switcher for PAE host to 32-bit shadow paging. */
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync /** Switcher for PAE host to PAE shadow paging. */
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync /** Switcher for PAE host paging to AMD64 shadow paging. */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Switcher for AMD64 host paging to PAE shadow paging. */
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Switcher for AMD64 host paging to AMD64 shadow paging. */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Used to make a count for array declarations and suchlike. */
ece9652d971886b99a269656ea4782319637e75avboxsync /** The usual 32-bit paranoia. */
ece9652d971886b99a269656ea4782319637e75avboxsync * VMMGCCallHost operations.
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Invalid operation. */
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Acquire the PDM lock. */
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Call PDMR3QueueFlushWorker. */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Acquire the PGM lock. */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Grow the PGM shadow page pool. */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Maps a chunk into ring-3. */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Allocates more handy pages. */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Dynamically allocate physical guest RAM. */
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Replay the REM handler notifications. */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Flush the GC/R0 logger. */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Set the VM error message. */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Set the VM runtime error message. */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Signal a ring 0 hypervisor assertion. */
0be1c98f1388ddc063a7e830f53e2018f658b348vboxsync /** The usual 32-bit hack. */
f910333674d7dd65ca746ec010ef354fd239cea4vboxsync/** @defgroup grp_vmm_r3 The VMM Host Context Ring 3 API
e7f5b62e52275099a4d14501306063e23876b771vboxsync * @ingroup grp_vmm
f910333674d7dd65ca746ec010ef354fd239cea4vboxsyncVMMR3DECL(void) VMMR3Relocate(PVM pVM, RTGCINTPTR offDelta);
f910333674d7dd65ca746ec010ef354fd239cea4vboxsyncVMMR3DECL(const char *) VMMR3GetGCAssertMsg1(PVM pVM);
f910333674d7dd65ca746ec010ef354fd239cea4vboxsyncVMMR3DECL(const char *) VMMR3GetGCAssertMsg2(PVM pVM);
e7f5b62e52275099a4d14501306063e23876b771vboxsyncVMMR3DECL(int) VMMR3GetImportGC(PVM pVM, const char *pszSymbol, PRTGCPTR pGCPtrValue);
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsyncVMMR3DECL(int) VMMR3SelectSwitcher(PVM pVM, VMMSWITCHER enmSwitcher);
f910333674d7dd65ca746ec010ef354fd239cea4vboxsyncVMMR3DECL(int) VMMR3CallGC(PVM pVM, RTRCPTR GCPtrEntry, unsigned cArgs, ...);
f910333674d7dd65ca746ec010ef354fd239cea4vboxsyncVMMR3DECL(int) VMMR3CallGCV(PVM pVM, RTRCPTR GCPtrEntry, unsigned cArgs, va_list args);
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsyncVMMR3DECL(RTNATIVETHREAD) VMMR3LockGetOwner(PVM pVM);
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync#endif /* IN_RING3 */
17ffb722f368828e2c8b00f3afd6f4cfad279655vboxsync/** @defgroup grp_vmm_r0 The VMM Host Context Ring 0 API
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync * @ingroup grp_vmm
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync * The VMMR0Entry() codes.
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync /** Run guest context. */
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync /** Run guest code using the available hardware acceleration technology. */
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync /** Official NOP that we use for profiling. */
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync /** Official slow iocl NOP that we use for profiling. */
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync /** Ask the GVMM to create a new VM. */
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync /** Ask the GVMM to destroy the VM. */
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync /** Call GVMMR0SchedHalt(). */
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync /** Call GVMMR0SchedWakeUp(). */
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Call GVMMR0SchedPoll(). */
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Call GVMMR0QueryStatistics(). */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Call GVMMR0ResetStatistics(). */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Call VMMR0 Per VM Init. */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Call VMMR0 Per VM Termination. */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Setup the hardware accelerated raw-mode session. */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Attempt to enable or disable hardware accelerated raw-mode. */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Calls function in the hypervisor.
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync * The caller must setup the hypervisor context so the call will be performed.
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync * The difference between VMMR0_DO_RUN_GC and this one is the handling of
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync * the return GC code. The return code will not be interpreted by this operation.
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Call PGMR0PhysAllocateHandyPages(). */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Call GMMR0InitialReservation(). */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Call GMMR0UpdateReservation(). */
1cc6d0ca9b70d90116a4fb8f7e60869cc98ad57cvboxsync /** Call GMMR0AllocatePages(). */
1cc6d0ca9b70d90116a4fb8f7e60869cc98ad57cvboxsync /** Call GMMR0FreePages(). */
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync /** Call GMMR0BalloonedPages(). */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Call GMMR0DeflatedBalloon(). */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Call GMMR0MapUnmapChunk(). */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Call GMMR0SeedChunk(). */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Set a GVMM or GMM configuration value. */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Query a GVMM or GMM configuration value. */
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** The start of the R0 service operations. */
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Call INTNETR0Open(). */
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Call INTNETR0IfClose(). */
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Call INTNETR0IfGetRing3Buffer(). */
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Call INTNETR0IfSetPromiscuousMode(). */
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync /** Call INTNETR0IfSetMacAddress(). */
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Call INTNETR0IfSetActive(). */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Call INTNETR0IfSend(). */
ece9652d971886b99a269656ea4782319637e75avboxsync /** Call INTNETR0IfWait(). */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** The end of the R0 service operations. */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Official call we use for testing Ring-0 APIs. */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** The usual 32-bit type blow up. */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync * Request buffer for VMMR0_DO_GCFGM_SET_VALUE and VMMR0_DO_GCFGM_QUERY_VALUE.
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync * @todo Move got GCFGM.h when it's implemented.
ece9652d971886b99a269656ea4782319637e75avboxsync /** The request header.*/
ece9652d971886b99a269656ea4782319637e75avboxsync /** The support driver session handle. */
ece9652d971886b99a269656ea4782319637e75avboxsync /** The value.
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync * This is input for the set request and output for the query. */
ece9652d971886b99a269656ea4782319637e75avboxsync /** The variable name.
ece9652d971886b99a269656ea4782319637e75avboxsync * This is fixed sized just to make things simple for the mock-up. */
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync/** Pointer to a VMMR0_DO_GCFGM_SET_VALUE and VMMR0_DO_GCFGM_QUERY_VALUE request buffer.
e7f5b62e52275099a4d14501306063e23876b771vboxsync * @todo Move got GCFGM.h when it's implemented.
992ef02987d71b2b9f73a50265997c7f8e384886vboxsyncVMMR0DECL(int) VMMR0EntryInt(PVM pVM, VMMR0OPERATION enmOperation, void *pvArg);
992ef02987d71b2b9f73a50265997c7f8e384886vboxsyncVMMR0DECL(void) VMMR0EntryFast(PVM pVM, VMMR0OPERATION enmOperation);
992ef02987d71b2b9f73a50265997c7f8e384886vboxsyncVMMR0DECL(int) VMMR0EntryEx(PVM pVM, VMMR0OPERATION enmOperation, PSUPVMMR0REQHDR pReq, uint64_t u64Arg, PSUPDRVSESSION);
992ef02987d71b2b9f73a50265997c7f8e384886vboxsyncVMMR0DECL(int) VMMR0CallHost(PVM pVM, VMMCALLHOST enmOperation, uint64_t uArg);
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync/** @defgroup grp_vmm_rc The VMM Raw-Mode Context API
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync * @ingroup grp_vmm
992ef02987d71b2b9f73a50265997c7f8e384886vboxsyncVMMRCDECL(int) VMMGCEntry(PVM pVM, unsigned uOperation, unsigned uArg, ...);
992ef02987d71b2b9f73a50265997c7f8e384886vboxsyncVMMRCDECL(int) VMMGCCallHost(PVM pVM, VMMCALLHOST enmOperation, uint64_t uArg);
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync#endif /* IN_RC */