vmapi.h revision 905657c5e5acc4aabaa84d701621b04b101f0ec8
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync/** @file
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * VM - The Virtual Machine, API.
5b281ba489ca18f0380d7efc7a5108b606cce449vboxsync */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync/*
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync *
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * available from http://www.virtualbox.org. This file is free software;
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * you can redistribute it and/or modify it under the terms of the GNU
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * General Public License (GPL) as published by the Free Software
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync *
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * The contents of this file may alternatively be used under the terms
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * of the Common Development and Distribution License Version 1.0
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * VirtualBox OSE distribution, in which case the provisions of the
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * CDDL are applicable instead of those of the GPL.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync *
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * You may elect to license modified versions of this file under the
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * terms and conditions of either the GPL or the CDDL or both.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync *
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * additional information or have any questions.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync#ifndef ___VBox_vmapi_h
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync#define ___VBox_vmapi_h
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync#include <VBox/cdefs.h>
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync#include <VBox/types.h>
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync#include <VBox/stam.h>
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync#include <VBox/cfgm.h>
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync#include <iprt/stdarg.h>
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync__BEGIN_DECLS
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync/** @defgroup grp_vmm_apis VM All Contexts API
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * @ingroup grp_vm
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * @{ */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
c889bbab784ba8552102ce776b6c67b982017861vboxsync/** @def VM_RC_ADDR
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * Converts a current context address of data within the VM structure to the equivalent
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * raw-mode address.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync *
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * @returns raw-mode virtual address.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * @param pVM Pointer to the VM.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * @param pvInVM CC Pointer within the VM.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync#ifdef IN_RING3
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync# define VM_RC_ADDR(pVM, pvInVM) ( (RTRCPTR)((RTRCUINTPTR)pVM->pVMRC + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMR3)) )
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync#elif defined(IN_RING0)
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync# define VM_RC_ADDR(pVM, pvInVM) ( (RTRCPTR)((RTRCUINTPTR)pVM->pVMRC + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMR0)) )
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync#else
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync# define VM_RC_ADDR(pVM, pvInVM) ( (RTRCPTR)(pvInVM) )
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync#endif
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync/** @def VM_R3_ADDR
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * Converts a current context address of data within the VM structure to the equivalent
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * ring-3 host address.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync *
5b281ba489ca18f0380d7efc7a5108b606cce449vboxsync * @returns host virtual address.
ee6e48c229ef52aee5e968d956ebd066073811abvboxsync * @param pVM Pointer to the VM.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * @param pvInVM CC pointer within the VM.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync#ifdef IN_RC
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync# define VM_R3_ADDR(pVM, pvInVM) ( (RTR3PTR)((RTR3UINTPTR)pVM->pVMR3 + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMRC)) )
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync#elif defined(IN_RING0)
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync# define VM_R3_ADDR(pVM, pvInVM) ( (RTR3PTR)((RTR3UINTPTR)pVM->pVMR3 + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMR0)) )
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync#else
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync# define VM_R3_ADDR(pVM, pvInVM) ( (RTR3PTR)(pvInVM) )
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync#endif
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync/** @def VM_R0_ADDR
ee6e48c229ef52aee5e968d956ebd066073811abvboxsync * Converts a current context address of data within the VM structure to the equivalent
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * ring-0 host address.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync *
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @returns host virtual address.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param pVM Pointer to the VM.
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync * @param pvInVM CC pointer within the VM.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync#ifdef IN_RC
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync# define VM_R0_ADDR(pVM, pvInVM) ( (RTR0PTR)((RTR0UINTPTR)pVM->pVMR0 + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMRC)) )
ee6e48c229ef52aee5e968d956ebd066073811abvboxsync#elif defined(IN_RING3)
ee6e48c229ef52aee5e968d956ebd066073811abvboxsync# define VM_R0_ADDR(pVM, pvInVM) ( (RTR0PTR)((RTR0UINTPTR)pVM->pVMR0 + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMR3)) )
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync#else
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync# define VM_R0_ADDR(pVM, pvInVM) ( (RTR0PTR)(pvInVM) )
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync#endif
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync/**
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * VM error callback function.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync *
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param pVM The VM handle. Can be NULL if an error occurred before
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * successfully creating a VM.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param pvUser The user argument.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param rc VBox status code.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param RT_SRC_POS_DECL The source position arguments. See RT_SRC_POS and RT_SRC_POS_ARGS.
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync * @param pszFormat Error message format string.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param args Error message arguments.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsynctypedef DECLCALLBACK(void) FNVMATERROR(PVM pVM, void *pvUser, int rc, RT_SRC_POS_DECL, const char *pszError, va_list args);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync/** Pointer to a VM error callback. */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsynctypedef FNVMATERROR *PFNVMATERROR;
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsyncVMMDECL(int) VMSetError(PVM pVM, int rc, RT_SRC_POS_DECL, const char *pszFormat, ...);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMDECL(int) VMSetErrorV(PVM pVM, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list args);
445661c86e95894713da707c6c9787b7507dfce6vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync/** @def VM_SET_ERROR
445661c86e95894713da707c6c9787b7507dfce6vboxsync * Macro for setting a simple VM error message.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * Don't use '%' in the message!
445661c86e95894713da707c6c9787b7507dfce6vboxsync *
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @returns rc. Meaning you can do:
445661c86e95894713da707c6c9787b7507dfce6vboxsync * @code
445661c86e95894713da707c6c9787b7507dfce6vboxsync * return VM_SET_ERROR(pVM, VERR_OF_YOUR_CHOICE, "descriptive message");
445661c86e95894713da707c6c9787b7507dfce6vboxsync * @endcode
445661c86e95894713da707c6c9787b7507dfce6vboxsync * @param pVM VM handle.
445661c86e95894713da707c6c9787b7507dfce6vboxsync * @param rc VBox status code.
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync * @param pszMessage Error message string.
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync * @thread Any
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync */
445661c86e95894713da707c6c9787b7507dfce6vboxsync#define VM_SET_ERROR(pVM, rc, pszMessage) (VMSetError(pVM, rc, RT_SRC_POS, pszMessage))
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync/**
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * VM runtime error callback function.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync *
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * See VMSetRuntimeError for the detailed description of parameters.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync *
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param pVM The VM handle.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param pvUser The user argument.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param fFlags The error flags.
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync * @param pszErrorId Error ID string.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param pszFormat Error message format string.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param va Error message arguments.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsynctypedef DECLCALLBACK(void) FNVMATRUNTIMEERROR(PVM pVM, void *pvUser, uint32_t fFlags, const char *pszErrorId,
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync const char *pszFormat, va_list va);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync/** Pointer to a VM runtime error callback. */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsynctypedef FNVMATRUNTIMEERROR *PFNVMATRUNTIMEERROR;
ab02aeaf2a0312fe9267a292e3911728e4531332vboxsync
ab02aeaf2a0312fe9267a292e3911728e4531332vboxsyncVMMDECL(int) VMSetRuntimeError(PVM pVM, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, ...);
ab02aeaf2a0312fe9267a292e3911728e4531332vboxsyncVMMDECL(int) VMSetRuntimeErrorV(PVM pVM, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list args);
ab02aeaf2a0312fe9267a292e3911728e4531332vboxsync
ab02aeaf2a0312fe9267a292e3911728e4531332vboxsync/** @name VMSetRuntimeError fFlags
ab02aeaf2a0312fe9267a292e3911728e4531332vboxsync * When no flags are given the VM will continue running and it's up to the front
ab02aeaf2a0312fe9267a292e3911728e4531332vboxsync * end to take action on the error condition.
ab02aeaf2a0312fe9267a292e3911728e4531332vboxsync *
c889bbab784ba8552102ce776b6c67b982017861vboxsync * @{ */
c889bbab784ba8552102ce776b6c67b982017861vboxsync/** The error is fatal.
ab02aeaf2a0312fe9267a292e3911728e4531332vboxsync * The VM is not in a state where it can be saved and will enter a state
ab02aeaf2a0312fe9267a292e3911728e4531332vboxsync * where it can no longer execute code. The caller <b>must</b> propagate status
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * codes. */
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync#define VMSETRTERR_FLAGS_FATAL RT_BIT_32(0)
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync/** Suspend the VM after, or if possible before, raising the error on EMT. The
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * caller <b>must</b> propagate status codes. */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync#define VMSETRTERR_FLAGS_SUSPEND RT_BIT_32(1)
c5d2523548cc57504b829f53f1362b848a84542cvboxsync/** Don't wait for the EMT to handle the request.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * Only valid when on a worker thread and there is a high risk of a dead
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * lock. Be careful not to flood the user with errors. */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync#define VMSETRTERR_FLAGS_NO_WAIT RT_BIT_32(2)
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync/** @} */
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync/**
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * VM reset callback.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync *
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * @returns VBox status code.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * @param pDevInst Device instance of the device which registered the callback.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param pvUser User argument.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsynctypedef DECLCALLBACK(int) FNVMATRESET(PPDMDEVINS pDevInst, void *pvUser);
ee6e48c229ef52aee5e968d956ebd066073811abvboxsync/** VM reset callback. */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsynctypedef FNVMATRESET *PFNVMATRESET;
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync/**
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync * VM reset internal callback.
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync *
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync * @returns VBox status code.
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync * @param pVM The VM which is begin reset.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param pvUser User argument.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsynctypedef DECLCALLBACK(int) FNVMATRESETINT(PVM pVM, void *pvUser);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync/** VM reset internal callback. */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsynctypedef FNVMATRESETINT *PFNVMATRESETINT;
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync/**
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * VM reset external callback.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync *
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param pvUser User argument.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsynctypedef DECLCALLBACK(void) FNVMATRESETEXT(void *pvUser);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync/** VM reset external callback. */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsynctypedef FNVMATRESETEXT *PFNVMATRESETEXT;
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync/**
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * VM state callback function.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync *
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * You are not allowed to call any function which changes the VM state from a
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * state callback, except VMR3Destroy().
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync *
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param pVM The VM handle.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param enmState The new state.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param enmOldState The old state.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param pvUser The user argument.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsynctypedef DECLCALLBACK(void) FNVMATSTATE(PVM pVM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser);
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync/** Pointer to a VM state callback. */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsynctypedef FNVMATSTATE *PFNVMATSTATE;
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMDECL(const char *) VMGetStateName(VMSTATE enmState);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync/**
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * Request type.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsynctypedef enum VMREQTYPE
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync{
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync /** Invalid request. */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync VMREQTYPE_INVALID = 0,
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync /** VM: Internal. */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync VMREQTYPE_INTERNAL,
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync /** Maximum request type (exclusive). Used for validation. */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync VMREQTYPE_MAX
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync} VMREQTYPE;
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync/**
ee6e48c229ef52aee5e968d956ebd066073811abvboxsync * Request state.
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsynctypedef enum VMREQSTATE
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync{
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync /** The state is invalid. */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync VMREQSTATE_INVALID = 0,
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync /** The request have been allocated and is in the process of being filed. */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync VMREQSTATE_ALLOCATED,
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync /** The request is queued by the requester. */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync VMREQSTATE_QUEUED,
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync /** The request is begin processed. */
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync VMREQSTATE_PROCESSING,
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync /** The request is completed, the requester is begin notified. */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync VMREQSTATE_COMPLETED,
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync /** The request packet is in the free chain. (The requester */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync VMREQSTATE_FREE
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync} VMREQSTATE;
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync/**
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * Request flags.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsynctypedef enum VMREQFLAGS
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync{
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync /** The request returns a VBox status code. */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync VMREQFLAGS_VBOX_STATUS = 0,
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync /** The request is a void request and have no status code. */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync VMREQFLAGS_VOID = 1,
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync /** Return type mask. */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync VMREQFLAGS_RETURN_MASK = 1,
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync /** Caller does not wait on the packet, EMT will free it. */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync VMREQFLAGS_NO_WAIT = 2
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync} VMREQFLAGS;
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync/**
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * Request destination
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync */
ee6e48c229ef52aee5e968d956ebd066073811abvboxsynctypedef enum VMREQDEST
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync{
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync /** Request packet for VCPU 0. */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync VMREQDEST_CPU0 = 0,
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
ee6e48c229ef52aee5e968d956ebd066073811abvboxsync /** Request packet for all VMCPU threads. */
ee6e48c229ef52aee5e968d956ebd066073811abvboxsync VMREQDEST_BROADCAST = 0x1000,
ee6e48c229ef52aee5e968d956ebd066073811abvboxsync
ee6e48c229ef52aee5e968d956ebd066073811abvboxsync /** Request packet for any VMCPU thread. */
ee6e48c229ef52aee5e968d956ebd066073811abvboxsync VMREQDEST_ANY = 0x1001
ee6e48c229ef52aee5e968d956ebd066073811abvboxsync} VMREQDEST;
ee6e48c229ef52aee5e968d956ebd066073811abvboxsync
ee6e48c229ef52aee5e968d956ebd066073811abvboxsync/**
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * VM Request packet.
ee6e48c229ef52aee5e968d956ebd066073811abvboxsync *
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * This is used to request an action in the EMT. Usually the requester is
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * another thread, but EMT can also end up being the requester in which case
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * it's carried out synchronously.
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync */
ee6e48c229ef52aee5e968d956ebd066073811abvboxsynctypedef struct VMREQ
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync{
ee6e48c229ef52aee5e968d956ebd066073811abvboxsync /** Pointer to the next request in the chain. */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync struct VMREQ * volatile pNext;
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync /** Pointer to ring-3 VM structure which this request belongs to. */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync PUVM pUVM;
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync /** Request state. */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync volatile VMREQSTATE enmState;
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync /** VBox status code for the completed request. */
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync volatile int iStatus;
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync /** Requester event sem.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * The request can use this event semaphore to wait/poll for completion
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * of the request.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync RTSEMEVENT EventSem;
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync /** Set if the event semaphore is clear. */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync volatile bool fEventSemClear;
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync /** Flags, VMR3REQ_FLAGS_*. */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync unsigned fFlags;
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync /** Request type. */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync VMREQTYPE enmType;
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync /** Request destination. */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync VMREQDEST enmDest;
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync /** Request specific data. */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync union VMREQ_U
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync {
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync /** VMREQTYPE_INTERNAL. */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync struct
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync {
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync /** Pointer to the function to be called. */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync PFNRT pfn;
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync /** Number of arguments. */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync unsigned cArgs;
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync /** Array of arguments. */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync uintptr_t aArgs[64];
c5d2523548cc57504b829f53f1362b848a84542cvboxsync } Internal;
c5d2523548cc57504b829f53f1362b848a84542cvboxsync } u;
c5d2523548cc57504b829f53f1362b848a84542cvboxsync} VMREQ;
98de0a38692b3f817f8c6a0b3b69d3fe6bcbe300vboxsync/** Pointer to a VM request packet. */
c5d2523548cc57504b829f53f1362b848a84542cvboxsynctypedef VMREQ *PVMREQ;
c5d2523548cc57504b829f53f1362b848a84542cvboxsync
c5d2523548cc57504b829f53f1362b848a84542cvboxsync/** @} */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync#ifndef IN_RC
ee6e48c229ef52aee5e968d956ebd066073811abvboxsync/** @defgroup grp_vmm_apis_hc VM Host Context API
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * @ingroup grp_vm
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * @{ */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
ee6e48c229ef52aee5e968d956ebd066073811abvboxsync/** @} */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync#endif
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync#ifdef IN_RING3
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync/** @defgroup grp_vmm_apis_r3 VM Host Context Ring 3 API
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * This interface is a _draft_!
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * @ingroup grp_vm
fa7c9928985ad8dc74ae6931809083c2af135250vboxsync * @{ */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync/**
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * Completion notification codes.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync */
fa7c9928985ad8dc74ae6931809083c2af135250vboxsynctypedef enum VMINITCOMPLETED
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync{
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync /** The Ring3 init is completed. */
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync VMINITCOMPLETED_RING3 = 1,
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync /** The Ring0 init is completed. */
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync VMINITCOMPLETED_RING0,
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync /** The GC init is completed. */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync VMINITCOMPLETED_GC
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync} VMINITCOMPLETED;
ab02aeaf2a0312fe9267a292e3911728e4531332vboxsync
ab02aeaf2a0312fe9267a292e3911728e4531332vboxsync
ab02aeaf2a0312fe9267a292e3911728e4531332vboxsyncVMMR3DECL(int) VMR3Create(uint32_t cCPUs, PFNVMATERROR pfnVMAtError, void *pvUserVM, PFNCFGMCONSTRUCTOR pfnCFGMConstructor, void *pvUserCFGM, PVM *ppVM);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3PowerOn(PVM pVM);
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsyncVMMR3DECL(int) VMR3Suspend(PVM pVM);
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsyncVMMR3DECL(int) VMR3SuspendNoSave(PVM pVM);
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsyncVMMR3DECL(int) VMR3Resume(PVM pVM);
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsyncVMMR3DECL(int) VMR3Reset(PVM pVM);
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync/**
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * Progress callback.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * This will report the completion percentage of an operation.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync *
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * @returns VINF_SUCCESS.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * @returns Error code to cancel the operation with.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * @param pVM The VM handle.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param uPercent Completetion precentage (0-100).
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @param pvUser User specified argument.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsynctypedef DECLCALLBACK(int) FNVMPROGRESS(PVM pVM, unsigned uPercent, void *pvUser);
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync/** Pointer to a FNVMPROGRESS function. */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsynctypedef FNVMPROGRESS *PFNVMPROGRESS;
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3Save(PVM pVM, const char *pszFilename, PFNVMPROGRESS pfnProgress, void *pvUser);
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsyncVMMR3DECL(int) VMR3Load(PVM pVM, const char *pszFilename, PFNVMPROGRESS pfnProgress, void *pvUser);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3PowerOff(PVM pVM);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3Destroy(PVM pVM);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(void) VMR3Relocate(PVM pVM, RTGCINTPTR offDelta);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(PVM) VMR3EnumVMs(PVM pVMPrev);
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsyncVMMR3DECL(int) VMR3WaitForResume(PVM pVM);
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync/**
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * VM destruction callback.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * @param pVM The VM which is about to be destroyed.
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync * @param pvUser The user parameter specified at registration.
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsynctypedef DECLCALLBACK(void) FNVMATDTOR(PVM pVM, void *pvUser);
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsync/** Pointer to a VM destruction callback. */
833f83ce101b6e9168f519decc0dc7a1079d35f7vboxsynctypedef FNVMATDTOR *PFNVMATDTOR;
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3AtDtorRegister(PFNVMATDTOR pfnAtDtor, void *pvUser);
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsyncVMMR3DECL(int) VMR3AtDtorDeregister(PFNVMATDTOR pfnAtDtor);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3AtResetRegister(PVM pVM, PPDMDEVINS pDevInst, PFNVMATRESET pfnCallback, void *pvUser, const char *pszDesc);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3AtResetRegisterInternal(PVM pVM, PFNVMATRESETINT pfnCallback, void *pvUser, const char *pszDesc);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3AtResetRegisterExternal(PVM pVM, PFNVMATRESETEXT pfnCallback, void *pvUser, const char *pszDesc);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3AtResetDeregister(PVM pVM, PPDMDEVINS pDevInst, PFNVMATRESET pfnCallback);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3AtResetDeregisterInternal(PVM pVM, PFNVMATRESETINT pfnCallback);
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsyncVMMR3DECL(int) VMR3AtResetDeregisterExternal(PVM pVM, PFNVMATRESETEXT pfnCallback);
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsyncVMMR3DECL(int) VMR3AtStateRegister(PVM pVM, PFNVMATSTATE pfnAtState, void *pvUser);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3AtStateDeregister(PVM pVM, PFNVMATSTATE pfnAtState, void *pvUser);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(VMSTATE) VMR3GetState(PVM pVM);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(const char *) VMR3GetStateName(VMSTATE enmState);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3AtErrorRegister(PVM pVM, PFNVMATERROR pfnAtError, void *pvUser);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3AtErrorRegisterU(PUVM pVM, PFNVMATERROR pfnAtError, void *pvUser);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3AtErrorDeregister(PVM pVM, PFNVMATERROR pfnAtError, void *pvUser);
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsyncVMMR3DECL(void) VMR3SetErrorWorker(PVM pVM);
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsyncVMMR3DECL(int) VMR3AtRuntimeErrorRegister(PVM pVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser);
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsyncVMMR3DECL(int) VMR3AtRuntimeErrorDeregister(PVM pVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3SetRuntimeErrorWorker(PVM pVM);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3ReqCall(PVM pVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3ReqCallVoidU(PUVM pUVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3ReqCallVoid(PVM pVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, PFNRT pfnFunction, unsigned cArgs, ...);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3ReqCallEx(PVM pVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3ReqCallU(PUVM pUVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, ...);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3ReqCallVU(PUVM pUVM, VMREQDEST enmDest, PVMREQ *ppReq, unsigned cMillies, unsigned fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3ReqAlloc(PVM pVM, PVMREQ *ppReq, VMREQTYPE enmType, VMREQDEST enmDest);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3ReqAllocU(PUVM pUVM, PVMREQ *ppReq, VMREQTYPE enmType, VMREQDEST enmDest);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3ReqFree(PVMREQ pReq);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3ReqQueue(PVMREQ pReq, unsigned cMillies);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3ReqWait(PVMREQ pReq, unsigned cMillies);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3ReqProcessU(PUVM pUVM, VMREQDEST enmDest);
ab02aeaf2a0312fe9267a292e3911728e4531332vboxsyncVMMR3DECL(void) VMR3NotifyFF(PVM pVM, bool fNotifiedREM);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(void) VMR3NotifyFFU(PUVM pUVM, bool fNotifiedREM);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3WaitHalted(PVM pVM, bool fIgnoreInterrupts);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(int) VMR3WaitU(PUVM pUVM);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(RTCPUID) VMR3GetVMCPUId(PVM pVM);
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsyncVMMR3DECL(RTTHREAD) VMR3GetVMCPUThread(PVM pVM);
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsyncVMMR3DECL(RTTHREAD) VMR3GetVMCPUThreadU(PUVM pUVM);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(RTNATIVETHREAD) VMR3GetVMCPUNativeThread(PVM pVM);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsyncVMMR3DECL(RTNATIVETHREAD) VMR3GetVMCPUNativeThreadU(PUVM pUVM);
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync/** @} */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync#endif /* IN_RING3 */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
ab02aeaf2a0312fe9267a292e3911728e4531332vboxsync#ifdef IN_RC
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync/** @defgroup grp_vmm_apis_gc VM Guest Context APIs
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @ingroup grp_vm
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync * @{ */
e5bfc5c34142a7550be3564a8e01a037b1db5b31vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync/** @} */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync#endif
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync__END_DECLS
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync/** @} */
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync#endif
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync
d60d5da33bb93fc7a8717802f21b13aa37914799vboxsync