vmm.h revision 362d7d46d58851d6f8a546b863b58b60c51afdae
ece9652d971886b99a269656ea4782319637e75avboxsync/** @file
ece9652d971886b99a269656ea4782319637e75avboxsync * VMM - The Virtual Machine Monitor.
ece9652d971886b99a269656ea4782319637e75avboxsync */
ece9652d971886b99a269656ea4782319637e75avboxsync
ece9652d971886b99a269656ea4782319637e75avboxsync/*
ece9652d971886b99a269656ea4782319637e75avboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
ece9652d971886b99a269656ea4782319637e75avboxsync *
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 *
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 *
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 *
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.
ece9652d971886b99a269656ea4782319637e75avboxsync */
ece9652d971886b99a269656ea4782319637e75avboxsync
ece9652d971886b99a269656ea4782319637e75avboxsync#ifndef ___VBox_vmm_h
ece9652d971886b99a269656ea4782319637e75avboxsync#define ___VBox_vmm_h
ece9652d971886b99a269656ea4782319637e75avboxsync
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync#include <VBox/cdefs.h>
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync#include <VBox/types.h>
aafe9fe588edab292546a0e4c1f7eb377fd35df4vboxsync#include <VBox/vmapi.h>
aafe9fe588edab292546a0e4c1f7eb377fd35df4vboxsync#include <VBox/sup.h>
aafe9fe588edab292546a0e4c1f7eb377fd35df4vboxsync#include <iprt/stdarg.h>
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync__BEGIN_DECLS
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync/** @defgroup grp_vmm The Virtual Machine Monitor API
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync * @{
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync/**
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync * World switcher identifiers.
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsynctypedef enum VMMSWITCHER
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync{
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** The usual invalid 0. */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync VMMSWITCHER_INVALID = 0,
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Switcher for 32-bit host to 32-bit shadow paging. */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync VMMSWITCHER_32_TO_32,
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Switcher for 32-bit host paging to PAE shadow paging. */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMSWITCHER_32_TO_PAE,
ece9652d971886b99a269656ea4782319637e75avboxsync /** Switcher for 32-bit host paging to AMD64 shadow paging. */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMSWITCHER_32_TO_AMD64,
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync /** Switcher for PAE host to 32-bit shadow paging. */
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync VMMSWITCHER_PAE_TO_32,
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync /** Switcher for PAE host to PAE shadow paging. */
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync VMMSWITCHER_PAE_TO_PAE,
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync /** Switcher for PAE host paging to AMD64 shadow paging. */
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync VMMSWITCHER_PAE_TO_AMD64,
ece9652d971886b99a269656ea4782319637e75avboxsync /** Switcher for AMD64 host paging to PAE shadow paging. */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMSWITCHER_AMD64_TO_PAE,
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Switcher for AMD64 host paging to AMD64 shadow paging. */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync VMMSWITCHER_AMD64_TO_AMD64,
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Used to make a count for array declarations and suchlike. */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMSWITCHER_MAX,
ece9652d971886b99a269656ea4782319637e75avboxsync /** The usual 32-bit paranoia. */
e7f5b62e52275099a4d14501306063e23876b771vboxsync VMMSWITCHER_32BIT_HACK = 0x7fffffff
e7f5b62e52275099a4d14501306063e23876b771vboxsync} VMMSWITCHER;
e7f5b62e52275099a4d14501306063e23876b771vboxsync
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync/**
ece9652d971886b99a269656ea4782319637e75avboxsync * VMMGCCallHost operations.
e7f5b62e52275099a4d14501306063e23876b771vboxsync */
ece9652d971886b99a269656ea4782319637e75avboxsynctypedef enum VMMCALLHOST
ece9652d971886b99a269656ea4782319637e75avboxsync{
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Invalid operation. */
e7f5b62e52275099a4d14501306063e23876b771vboxsync VMMCALLHOST_INVALID = 0,
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Acquire the PDM lock. */
e7f5b62e52275099a4d14501306063e23876b771vboxsync VMMCALLHOST_PDM_LOCK,
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Call PDMR3QueueFlushWorker. */
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync VMMCALLHOST_PDM_QUEUE_FLUSH,
ece9652d971886b99a269656ea4782319637e75avboxsync /** Acquire the PGM lock. */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMCALLHOST_PGM_LOCK,
ece9652d971886b99a269656ea4782319637e75avboxsync /** Grow the PGM shadow page pool. */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMCALLHOST_PGM_POOL_GROW,
ece9652d971886b99a269656ea4782319637e75avboxsync /** Maps a chunk into ring-3. */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMCALLHOST_PGM_MAP_CHUNK,
ece9652d971886b99a269656ea4782319637e75avboxsync /** Allocates more handy pages. */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMCALLHOST_PGM_ALLOCATE_HANDY_PAGES,
ece9652d971886b99a269656ea4782319637e75avboxsync#ifndef VBOX_WITH_NEW_PHYS_CODE
ece9652d971886b99a269656ea4782319637e75avboxsync /** Dynamically allocate physical guest RAM. */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMCALLHOST_PGM_RAM_GROW_RANGE,
e7f5b62e52275099a4d14501306063e23876b771vboxsync#endif
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Replay the REM handler notifications. */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMCALLHOST_REM_REPLAY_HANDLER_NOTIFICATIONS,
ece9652d971886b99a269656ea4782319637e75avboxsync /** Flush the GC/R0 logger. */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMCALLHOST_VMM_LOGGER_FLUSH,
ece9652d971886b99a269656ea4782319637e75avboxsync /** Set the VM error message. */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMCALLHOST_VM_SET_ERROR,
ece9652d971886b99a269656ea4782319637e75avboxsync /** Set the VM runtime error message. */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMCALLHOST_VM_SET_RUNTIME_ERROR,
ece9652d971886b99a269656ea4782319637e75avboxsync /** Signal a ring 0 hypervisor assertion. */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMCALLHOST_VM_R0_HYPER_ASSERTION,
0be1c98f1388ddc063a7e830f53e2018f658b348vboxsync /** The usual 32-bit hack. */
0be1c98f1388ddc063a7e830f53e2018f658b348vboxsync VMMCALLHOST_32BIT_HACK = 0x7fffffff
0be1c98f1388ddc063a7e830f53e2018f658b348vboxsync} VMMCALLHOST;
f910333674d7dd65ca746ec010ef354fd239cea4vboxsync
e7f5b62e52275099a4d14501306063e23876b771vboxsyncRTRCPTR VMMGetStackRC(PVM pVM);
79c6e4760808b57244846404a5a799fedba4353bvboxsyncVMCPUID VMMGetCpuId(PVM pVM);
0be1c98f1388ddc063a7e830f53e2018f658b348vboxsyncVMMDECL(uint32_t) VMMGetSvnRev(void);
f910333674d7dd65ca746ec010ef354fd239cea4vboxsync
f910333674d7dd65ca746ec010ef354fd239cea4vboxsync
f910333674d7dd65ca746ec010ef354fd239cea4vboxsync#ifdef IN_RING3
f910333674d7dd65ca746ec010ef354fd239cea4vboxsync/** @defgroup grp_vmm_r3 The VMM Host Context Ring 3 API
e7f5b62e52275099a4d14501306063e23876b771vboxsync * @ingroup grp_vmm
0be1c98f1388ddc063a7e830f53e2018f658b348vboxsync * @{
e7f5b62e52275099a4d14501306063e23876b771vboxsync */
f910333674d7dd65ca746ec010ef354fd239cea4vboxsyncVMMR3DECL(int) VMMR3Init(PVM pVM);
f910333674d7dd65ca746ec010ef354fd239cea4vboxsyncVMMR3DECL(int) VMMR3InitFinalize(PVM pVM);
e7f5b62e52275099a4d14501306063e23876b771vboxsyncVMMR3DECL(int) VMMR3InitR0(PVM pVM);
e7f5b62e52275099a4d14501306063e23876b771vboxsyncVMMR3DECL(int) VMMR3InitRC(PVM pVM);
f910333674d7dd65ca746ec010ef354fd239cea4vboxsyncVMMR3DECL(int) VMMR3Term(PVM pVM);
f910333674d7dd65ca746ec010ef354fd239cea4vboxsyncVMMR3DECL(void) VMMR3Relocate(PVM pVM, RTGCINTPTR offDelta);
f910333674d7dd65ca746ec010ef354fd239cea4vboxsyncVMMR3DECL(int) VMMR3UpdateLoggers(PVM pVM);
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) VMMR3DisableSwitcher(PVM pVM);
f910333674d7dd65ca746ec010ef354fd239cea4vboxsyncVMMR3DECL(int) VMMR3RawRunGC(PVM pVM);
f910333674d7dd65ca746ec010ef354fd239cea4vboxsyncVMMR3DECL(int) VMMR3HwAccRunGC(PVM pVM);
f910333674d7dd65ca746ec010ef354fd239cea4vboxsyncVMMR3DECL(int) VMMR3CallGC(PVM pVM, RTRCPTR GCPtrEntry, unsigned cArgs, ...);
f910333674d7dd65ca746ec010ef354fd239cea4vboxsyncVMMR3DECL(int) VMMR3CallGCV(PVM pVM, RTRCPTR GCPtrEntry, unsigned cArgs, va_list args);
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsyncVMMR3DECL(int) VMMR3ResumeHyper(PVM pVM);
f910333674d7dd65ca746ec010ef354fd239cea4vboxsyncVMMR3DECL(void) VMMR3FatalDump(PVM pVM, int rcErr);
f910333674d7dd65ca746ec010ef354fd239cea4vboxsyncVMMR3DECL(int) VMMR3Lock(PVM pVM);
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsyncVMMR3DECL(int) VMMR3Unlock(PVM pVM);
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsyncVMMR3DECL(RTNATIVETHREAD) VMMR3LockGetOwner(PVM pVM);
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsyncVMMR3DECL(bool) VMMR3LockIsOwner(PVM pVM);
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsyncVMMR3DECL(void) VMMR3YieldSuspend(PVM pVM);
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsyncVMMR3DECL(void) VMMR3YieldStop(PVM pVM);
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsyncVMMR3DECL(void) VMMR3YieldResume(PVM pVM);
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync/** @} */
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync#endif /* IN_RING3 */
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync
17ffb722f368828e2c8b00f3afd6f4cfad279655vboxsync/** @defgroup grp_vmm_r0 The VMM Host Context Ring 0 API
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync * @ingroup grp_vmm
17ffb722f368828e2c8b00f3afd6f4cfad279655vboxsync * @{
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync */
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync/**
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync * The VMMR0Entry() codes.
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync */
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsynctypedef enum VMMR0OPERATION
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync{
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync /** Run guest context. */
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync VMMR0_DO_RAW_RUN = SUP_VMMR0_DO_RAW_RUN,
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync /** Run guest code using the available hardware acceleration technology. */
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync VMMR0_DO_HWACC_RUN = SUP_VMMR0_DO_HWACC_RUN,
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync /** Official NOP that we use for profiling. */
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync VMMR0_DO_NOP = SUP_VMMR0_DO_NOP,
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync /** Official slow iocl NOP that we use for profiling. */
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync VMMR0_DO_SLOW_NOP,
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync /** Ask the GVMM to create a new VM. */
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync VMMR0_DO_GVMM_CREATE_VM,
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync /** Ask the GVMM to destroy the VM. */
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync VMMR0_DO_GVMM_DESTROY_VM,
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync /** Call GVMMR0SchedHalt(). */
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync VMMR0_DO_GVMM_SCHED_HALT,
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync /** Call GVMMR0SchedWakeUp(). */
e7f5b62e52275099a4d14501306063e23876b771vboxsync VMMR0_DO_GVMM_SCHED_WAKE_UP,
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Call GVMMR0SchedPoll(). */
e7f5b62e52275099a4d14501306063e23876b771vboxsync VMMR0_DO_GVMM_SCHED_POLL,
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Call GVMMR0QueryStatistics(). */
e7f5b62e52275099a4d14501306063e23876b771vboxsync VMMR0_DO_GVMM_QUERY_STATISTICS,
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Call GVMMR0ResetStatistics(). */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync VMMR0_DO_GVMM_RESET_STATISTICS,
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Call VMMR0 Per VM Init. */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync VMMR0_DO_VMMR0_INIT,
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Call VMMR0 Per VM Termination. */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync VMMR0_DO_VMMR0_TERM,
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Setup the hardware accelerated raw-mode session. */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync VMMR0_DO_HWACC_SETUP_VM,
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Attempt to enable or disable hardware accelerated raw-mode. */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync VMMR0_DO_HWACC_ENABLE,
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.
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync VMMR0_DO_CALL_HYPERVISOR,
6cb1a01aaf746e26c5190a7b0fca706393bdf3aevboxsync
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Call PGMR0PhysAllocateHandyPages(). */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync VMMR0_DO_PGM_ALLOCATE_HANDY_PAGES,
e7f5b62e52275099a4d14501306063e23876b771vboxsync
ece9652d971886b99a269656ea4782319637e75avboxsync /** Call GMMR0InitialReservation(). */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMR0_DO_GMM_INITIAL_RESERVATION,
ece9652d971886b99a269656ea4782319637e75avboxsync /** Call GMMR0UpdateReservation(). */
f910333674d7dd65ca746ec010ef354fd239cea4vboxsync VMMR0_DO_GMM_UPDATE_RESERVATION,
1cc6d0ca9b70d90116a4fb8f7e60869cc98ad57cvboxsync /** Call GMMR0AllocatePages(). */
1cc6d0ca9b70d90116a4fb8f7e60869cc98ad57cvboxsync VMMR0_DO_GMM_ALLOCATE_PAGES,
1cc6d0ca9b70d90116a4fb8f7e60869cc98ad57cvboxsync /** Call GMMR0FreePages(). */
e7f5b62e52275099a4d14501306063e23876b771vboxsync VMMR0_DO_GMM_FREE_PAGES,
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync /** Call GMMR0BalloonedPages(). */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync VMMR0_DO_GMM_BALLOONED_PAGES,
ece9652d971886b99a269656ea4782319637e75avboxsync /** Call GMMR0DeflatedBalloon(). */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMR0_DO_GMM_DEFLATED_BALLOON,
ece9652d971886b99a269656ea4782319637e75avboxsync /** Call GMMR0MapUnmapChunk(). */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMR0_DO_GMM_MAP_UNMAP_CHUNK,
ece9652d971886b99a269656ea4782319637e75avboxsync /** Call GMMR0SeedChunk(). */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMR0_DO_GMM_SEED_CHUNK,
ece9652d971886b99a269656ea4782319637e75avboxsync
ece9652d971886b99a269656ea4782319637e75avboxsync /** Set a GVMM or GMM configuration value. */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMR0_DO_GCFGM_SET_VALUE,
ece9652d971886b99a269656ea4782319637e75avboxsync /** Query a GVMM or GMM configuration value. */
e7f5b62e52275099a4d14501306063e23876b771vboxsync VMMR0_DO_GCFGM_QUERY_VALUE,
ece9652d971886b99a269656ea4782319637e75avboxsync
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** The start of the R0 service operations. */
e7f5b62e52275099a4d14501306063e23876b771vboxsync VMMR0_DO_SRV_START,
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Call INTNETR0Open(). */
e7f5b62e52275099a4d14501306063e23876b771vboxsync VMMR0_DO_INTNET_OPEN,
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Call INTNETR0IfClose(). */
e7f5b62e52275099a4d14501306063e23876b771vboxsync VMMR0_DO_INTNET_IF_CLOSE,
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Call INTNETR0IfGetRing3Buffer(). */
e7f5b62e52275099a4d14501306063e23876b771vboxsync VMMR0_DO_INTNET_IF_GET_RING3_BUFFER,
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Call INTNETR0IfSetPromiscuousMode(). */
e7f5b62e52275099a4d14501306063e23876b771vboxsync VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE,
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync /** Call INTNETR0IfSetMacAddress(). */
e7f5b62e52275099a4d14501306063e23876b771vboxsync VMMR0_DO_INTNET_IF_SET_MAC_ADDRESS,
e7f5b62e52275099a4d14501306063e23876b771vboxsync /** Call INTNETR0IfSetActive(). */
e7f5b62e52275099a4d14501306063e23876b771vboxsync VMMR0_DO_INTNET_IF_SET_ACTIVE,
ece9652d971886b99a269656ea4782319637e75avboxsync /** Call INTNETR0IfSend(). */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMR0_DO_INTNET_IF_SEND,
ece9652d971886b99a269656ea4782319637e75avboxsync /** Call INTNETR0IfWait(). */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync VMMR0_DO_INTNET_IF_WAIT,
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** The end of the R0 service operations. */
7966dfd1ed4339ba80cf41be6c8a824921354a91vboxsync VMMR0_DO_SRV_END,
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** Official call we use for testing Ring-0 APIs. */
ece9652d971886b99a269656ea4782319637e75avboxsync VMMR0_DO_TESTS,
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync /** The usual 32-bit type blow up. */
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync VMMR0_DO_32BIT_HACK = 0x7fffffff
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync} VMMR0OPERATION;
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync/**
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 */
ece9652d971886b99a269656ea4782319637e75avboxsynctypedef struct GCFGMVALUEREQ
ece9652d971886b99a269656ea4782319637e75avboxsync{
ece9652d971886b99a269656ea4782319637e75avboxsync /** The request header.*/
ece9652d971886b99a269656ea4782319637e75avboxsync SUPVMMR0REQHDR Hdr;
ece9652d971886b99a269656ea4782319637e75avboxsync /** The support driver session handle. */
ece9652d971886b99a269656ea4782319637e75avboxsync PSUPDRVSESSION pSession;
ece9652d971886b99a269656ea4782319637e75avboxsync /** The value.
36ec4b6f42e209d010ade084a96f46ce763345eavboxsync * This is input for the set request and output for the query. */
ece9652d971886b99a269656ea4782319637e75avboxsync uint64_t u64Value;
ece9652d971886b99a269656ea4782319637e75avboxsync /** The variable name.
ece9652d971886b99a269656ea4782319637e75avboxsync * This is fixed sized just to make things simple for the mock-up. */
ece9652d971886b99a269656ea4782319637e75avboxsync char szName[48];
ece9652d971886b99a269656ea4782319637e75avboxsync} GCFGMVALUEREQ;
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.
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync */
992ef02987d71b2b9f73a50265997c7f8e384886vboxsynctypedef GCFGMVALUEREQ *PGCFGMVALUEREQ;
e7f5b62e52275099a4d14501306063e23876b771vboxsync
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
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync/** @} */
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync
e7f5b62e52275099a4d14501306063e23876b771vboxsync
e7f5b62e52275099a4d14501306063e23876b771vboxsync#ifdef IN_GC
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync/** @defgroup grp_vmm_rc The VMM Raw-Mode Context API
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync * @ingroup grp_vmm
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync * @{
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync */
992ef02987d71b2b9f73a50265997c7f8e384886vboxsyncVMMRCDECL(int) VMMGCEntry(PVM pVM, unsigned uOperation, unsigned uArg, ...);
992ef02987d71b2b9f73a50265997c7f8e384886vboxsyncVMMRCDECL(void) VMMGCGuestToHost(PVM pVM, int rc);
992ef02987d71b2b9f73a50265997c7f8e384886vboxsyncVMMRCDECL(int) VMMGCCallHost(PVM pVM, VMMCALLHOST enmOperation, uint64_t uArg);
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync/** @} */
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync#endif /* IN_RC */
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync/** @} */
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync__END_DECLS
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync#endif
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync
992ef02987d71b2b9f73a50265997c7f8e384886vboxsync