vmapi.h revision 0f81043c307886fc3e8d0479c4e4120b35c6d0b9
00314ca59bb0358d05053ee753174724d82adff4vboxsync * VM - The Virtual Machine, API.
c98fb3e16fcd571a790eab772c0c66173d225205vboxsync * Copyright (C) 2006-2010 Oracle Corporation
c98fb3e16fcd571a790eab772c0c66173d225205vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
c98fb3e16fcd571a790eab772c0c66173d225205vboxsync * available from http://www.virtualbox.org. This file is free software;
c98fb3e16fcd571a790eab772c0c66173d225205vboxsync * you can redistribute it and/or modify it under the terms of the GNU
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * General Public License (GPL) as published by the Free Software
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * The contents of this file may alternatively be used under the terms
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * of the Common Development and Distribution License Version 1.0
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * VirtualBox OSE distribution, in which case the provisions of the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * CDDL are applicable instead of those of the GPL.
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * You may elect to license modified versions of this file under the
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync * terms and conditions of either the GPL or the CDDL or both.
00314ca59bb0358d05053ee753174724d82adff4vboxsync/** @defgroup grp_vmm_apis VM All Contexts API
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @ingroup grp_vm
00314ca59bb0358d05053ee753174724d82adff4vboxsync/** @def VM_RC_ADDR
00314ca59bb0358d05053ee753174724d82adff4vboxsync * Converts a current context address of data within the VM structure to the equivalent
00314ca59bb0358d05053ee753174724d82adff4vboxsync * raw-mode address.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @returns raw-mode virtual address.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param pVM Pointer to the VM.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param pvInVM CC Pointer within the VM.
00314ca59bb0358d05053ee753174724d82adff4vboxsync# define VM_RC_ADDR(pVM, pvInVM) ( (RTRCPTR)((RTRCUINTPTR)pVM->pVMRC + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMR3)) )
00314ca59bb0358d05053ee753174724d82adff4vboxsync# define VM_RC_ADDR(pVM, pvInVM) ( (RTRCPTR)((RTRCUINTPTR)pVM->pVMRC + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMR0)) )
00314ca59bb0358d05053ee753174724d82adff4vboxsync# define VM_RC_ADDR(pVM, pvInVM) ( (RTRCPTR)(pvInVM) )
00314ca59bb0358d05053ee753174724d82adff4vboxsync/** @def VM_R3_ADDR
00314ca59bb0358d05053ee753174724d82adff4vboxsync * Converts a current context address of data within the VM structure to the equivalent
00314ca59bb0358d05053ee753174724d82adff4vboxsync * ring-3 host address.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @returns host virtual address.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param pVM Pointer to the VM.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param pvInVM CC pointer within the VM.
00314ca59bb0358d05053ee753174724d82adff4vboxsync# define VM_R3_ADDR(pVM, pvInVM) ( (RTR3PTR)((RTR3UINTPTR)pVM->pVMR3 + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMRC)) )
00314ca59bb0358d05053ee753174724d82adff4vboxsync# define VM_R3_ADDR(pVM, pvInVM) ( (RTR3PTR)((RTR3UINTPTR)pVM->pVMR3 + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMR0)) )
00314ca59bb0358d05053ee753174724d82adff4vboxsync# define VM_R3_ADDR(pVM, pvInVM) ( (RTR3PTR)(pvInVM) )
00314ca59bb0358d05053ee753174724d82adff4vboxsync/** @def VM_R0_ADDR
00314ca59bb0358d05053ee753174724d82adff4vboxsync * Converts a current context address of data within the VM structure to the equivalent
00314ca59bb0358d05053ee753174724d82adff4vboxsync * ring-0 host address.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @returns host virtual address.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param pVM Pointer to the VM.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param pvInVM CC pointer within the VM.
00314ca59bb0358d05053ee753174724d82adff4vboxsync# define VM_R0_ADDR(pVM, pvInVM) ( (RTR0PTR)((RTR0UINTPTR)pVM->pVMR0 + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMRC)) )
00314ca59bb0358d05053ee753174724d82adff4vboxsync# define VM_R0_ADDR(pVM, pvInVM) ( (RTR0PTR)((RTR0UINTPTR)pVM->pVMR0 + (uint32_t)((uintptr_t)(pvInVM) - (uintptr_t)pVM->pVMR3)) )
00314ca59bb0358d05053ee753174724d82adff4vboxsync# define VM_R0_ADDR(pVM, pvInVM) ( (RTR0PTR)(pvInVM) )
00314ca59bb0358d05053ee753174724d82adff4vboxsync * VM error callback function.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param pUVM The user mode VM handle. Can be NULL if an error
00314ca59bb0358d05053ee753174724d82adff4vboxsync * occurred before successfully creating a VM.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param pvUser The user argument.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param rc VBox status code.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param RT_SRC_POS_DECL The source position arguments. See RT_SRC_POS and RT_SRC_POS_ARGS.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param pszFormat Error message format string.
a74c1d37f653a258a981c18485e9df00b6e86e2evboxsync * @param args Error message arguments.
00314ca59bb0358d05053ee753174724d82adff4vboxsynctypedef DECLCALLBACK(void) FNVMATERROR(PUVM pUVM, void *pvUser, int rc, RT_SRC_POS_DECL, const char *pszError, va_list args);
00314ca59bb0358d05053ee753174724d82adff4vboxsync/** Pointer to a VM error callback. */
00314ca59bb0358d05053ee753174724d82adff4vboxsyncVMMDECL(int) VMSetError(PVM pVM, int rc, RT_SRC_POS_DECL, const char *pszFormat, ...);
00314ca59bb0358d05053ee753174724d82adff4vboxsyncVMMDECL(int) VMSetErrorV(PVM pVM, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list args);
00314ca59bb0358d05053ee753174724d82adff4vboxsync/** @def VM_SET_ERROR
00314ca59bb0358d05053ee753174724d82adff4vboxsync * Macro for setting a simple VM error message.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * Don't use '%' in the message!
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @returns rc. Meaning you can do:
00314ca59bb0358d05053ee753174724d82adff4vboxsync * return VM_SET_ERROR(pVM, VERR_OF_YOUR_CHOICE, "descriptive message");
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param pVM VM handle.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param rc VBox status code.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param pszMessage Error message string.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @thread Any
00314ca59bb0358d05053ee753174724d82adff4vboxsync#define VM_SET_ERROR(pVM, rc, pszMessage) (VMSetError(pVM, rc, RT_SRC_POS, pszMessage))
00314ca59bb0358d05053ee753174724d82adff4vboxsync * VM runtime error callback function.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * See VMSetRuntimeError for the detailed description of parameters.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param pUVM The user mode VM handle.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param pvUser The user argument.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param fFlags The error flags.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param pszErrorId Error ID string.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param pszFormat Error message format string.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param va Error message arguments.
00314ca59bb0358d05053ee753174724d82adff4vboxsynctypedef DECLCALLBACK(void) FNVMATRUNTIMEERROR(PUVM pUVM, void *pvUser, uint32_t fFlags, const char *pszErrorId,
00314ca59bb0358d05053ee753174724d82adff4vboxsync/** Pointer to a VM runtime error callback. */
00314ca59bb0358d05053ee753174724d82adff4vboxsyncVMMDECL(int) VMSetRuntimeError(PVM pVM, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, ...);
00314ca59bb0358d05053ee753174724d82adff4vboxsyncVMMDECL(int) VMSetRuntimeErrorV(PVM pVM, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list args);
00314ca59bb0358d05053ee753174724d82adff4vboxsync/** @name VMSetRuntimeError fFlags
00314ca59bb0358d05053ee753174724d82adff4vboxsync * When no flags are given the VM will continue running and it's up to the front
00314ca59bb0358d05053ee753174724d82adff4vboxsync * end to take action on the error condition.
00314ca59bb0358d05053ee753174724d82adff4vboxsync/** The error is fatal.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * The VM is not in a state where it can be saved and will enter a state
00314ca59bb0358d05053ee753174724d82adff4vboxsync * where it can no longer execute code. The caller <b>must</b> propagate status
00314ca59bb0358d05053ee753174724d82adff4vboxsync * codes. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync/** Suspend the VM after, or if possible before, raising the error on EMT. The
00314ca59bb0358d05053ee753174724d82adff4vboxsync * caller <b>must</b> propagate status codes. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync/** Don't wait for the EMT to handle the request.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * Only valid when on a worker thread and there is a high risk of a dead
00314ca59bb0358d05053ee753174724d82adff4vboxsync * lock. Be careful not to flood the user with errors. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync * VM state change callback function.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * You are not allowed to call any function which changes the VM state from a
00314ca59bb0358d05053ee753174724d82adff4vboxsync * state callback, except VMR3Destroy().
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param pUVM The user mode VM handle.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param enmState The new state.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param enmOldState The old state.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param pvUser The user argument.
00314ca59bb0358d05053ee753174724d82adff4vboxsynctypedef DECLCALLBACK(void) FNVMATSTATE(PUVM pUVM, VMSTATE enmState, VMSTATE enmOldState, void *pvUser);
00314ca59bb0358d05053ee753174724d82adff4vboxsync/** Pointer to a VM state callback. */
00314ca59bb0358d05053ee753174724d82adff4vboxsyncVMMDECL(const char *) VMGetStateName(VMSTATE enmState);
00314ca59bb0358d05053ee753174724d82adff4vboxsync * Request type.
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** Invalid request. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** VM: Internal. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** Maximum request type (exclusive). Used for validation. */
cb13ee8e628d04a773894bf4f9e8047d74f2ee21vboxsync * Request state.
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** The state is invalid. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** The request have been allocated and is in the process of being filed. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** The request is queued by the requester. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** The request is begin processed. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** The request is completed, the requester is begin notified. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** The request packet is in the free chain. (The requester */
00314ca59bb0358d05053ee753174724d82adff4vboxsync * Request flags.
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** The request returns a VBox status code. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** The request is a void request and have no status code. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** Return type mask. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** Caller does not wait on the packet, EMT will free it. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** Poke the destination EMT(s) if executing guest code. Use with care. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** Priority request that can safely be processed while doing async
00314ca59bb0358d05053ee753174724d82adff4vboxsync * suspend and power off. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync * VM Request packet.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * This is used to request an action in the EMT. Usually the requester is
00314ca59bb0358d05053ee753174724d82adff4vboxsync * another thread, but EMT can also end up being the requester in which case
00314ca59bb0358d05053ee753174724d82adff4vboxsync * it's carried out synchronously.
00314ca59bb0358d05053ee753174724d82adff4vboxsynctypedef struct VMREQ
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** Pointer to the next request in the chain. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** Pointer to ring-3 VM structure which this request belongs to. */
cb13ee8e628d04a773894bf4f9e8047d74f2ee21vboxsync /** Request state. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** VBox status code for the completed request. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** Requester event sem.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * The request can use this event semaphore to wait/poll for completion
00314ca59bb0358d05053ee753174724d82adff4vboxsync * of the request.
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** Set if the event semaphore is clear. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync volatile bool fEventSemClear;
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** Flags, VMR3REQ_FLAGS_*. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** Request type. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** Request destination. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** Request specific data. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** VMREQTYPE_INTERNAL. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** Pointer to the function to be called. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** Number of arguments. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** Array of arguments. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync/** Pointer to a VM request packet. */
cb13ee8e628d04a773894bf4f9e8047d74f2ee21vboxsync/** @defgroup grp_vmm_apis_hc VM Host Context API
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @ingroup grp_vm
00314ca59bb0358d05053ee753174724d82adff4vboxsync/** @defgroup grp_vmm_apis_r3 VM Host Context Ring 3 API
00314ca59bb0358d05053ee753174724d82adff4vboxsync * This interface is a _draft_!
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @ingroup grp_vm
00314ca59bb0358d05053ee753174724d82adff4vboxsync * Completion notification codes.
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** The ring-3 init is completed. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** The ring-0 init is completed. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** The hardware accelerated virtualization init is completed.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * Used to make decisision depending on whether HMIsEnabled(). */
00314ca59bb0358d05053ee753174724d82adff4vboxsync /** The GC init is completed. */
00314ca59bb0358d05053ee753174724d82adff4vboxsync * Progress callback.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * This will report the completion percentage of an operation.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @returns VINF_SUCCESS.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @returns Error code to cancel the operation with.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param pUVM The user mode VM handle.
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param uPercent Completion percentage (0-100).
00314ca59bb0358d05053ee753174724d82adff4vboxsync * @param pvUser User specified argument.
00314ca59bb0358d05053ee753174724d82adff4vboxsynctypedef DECLCALLBACK(int) FNVMPROGRESS(PUVM pUVM, unsigned uPercent, void *pvUser);
00314ca59bb0358d05053ee753174724d82adff4vboxsync/** Pointer to a FNVMPROGRESS function. */
00314ca59bb0358d05053ee753174724d82adff4vboxsyncVMMR3DECL(int) VMR3Create(uint32_t cCpus, PCVMM2USERMETHODS pVm2UserCbs,
00314ca59bb0358d05053ee753174724d82adff4vboxsync PFNCFGMCONSTRUCTOR pfnCFGMConstructor, void *pvUserCFGM,
00314ca59bb0358d05053ee753174724d82adff4vboxsyncVMMR3DECL(int) VMR3Save(PUVM pUVM, const char *pszFilename, bool fContinueAfterwards, PFNVMPROGRESS pfnProgress, void *pvUser, bool *pfSuspended);
00314ca59bb0358d05053ee753174724d82adff4vboxsyncVMMR3_INT_DECL(int) VMR3SaveFT(PUVM pUVM, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser, bool *pfSuspended, bool fSkipStateChanges);
00314ca59bb0358d05053ee753174724d82adff4vboxsyncVMMR3DECL(int) VMR3Teleport(PUVM pUVM, uint32_t cMsDowntime, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser, PFNVMPROGRESS pfnProgress, void *pvProgressUser, bool *pfSuspended);
00314ca59bb0358d05053ee753174724d82adff4vboxsyncVMMR3DECL(int) VMR3LoadFromFile(PUVM pUVM, const char *pszFilename, PFNVMPROGRESS pfnProgress, void *pvUser);
00314ca59bb0358d05053ee753174724d82adff4vboxsyncVMMR3DECL(int) VMR3LoadFromStream(PUVM pUVM, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser,
00314ca59bb0358d05053ee753174724d82adff4vboxsyncVMMR3_INT_DECL(int) VMR3LoadFromStreamFT(PUVM pUVM, PCSSMSTRMOPS pStreamOps, void *pvStreamOpsUser);
00314ca59bb0358d05053ee753174724d82adff4vboxsyncVMMR3_INT_DECL(void) VMR3Relocate(PVM pVM, RTGCINTPTR offDelta);
00314ca59bb0358d05053ee753174724d82adff4vboxsyncVMMR3DECL(PRTUUID) VMR3GetUuid(PUVM pUVM, PRTUUID pUuid);
00314ca59bb0358d05053ee753174724d82adff4vboxsyncVMMR3DECL(const char *) VMR3GetStateName(VMSTATE enmState);
VMMR3DECL(int) VMR3AtRuntimeErrorRegister(PUVM pUVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser);
VMMR3DECL(int) VMR3AtRuntimeErrorDeregister(PUVM pUVM, PFNVMATRUNTIMEERROR pfnAtRuntimeError, void *pvUser);
VMMR3DECL(int) VMR3ReqCallU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, RTMSINTERVAL cMillies, uint32_t fFlags, PFNRT pfnFunction, unsigned cArgs, ...);
VMMR3DECL(int) VMR3ReqCallVU(PUVM pUVM, VMCPUID idDstCpu, PVMREQ *ppReq, RTMSINTERVAL cMillies, uint32_t fFlags, PFNRT pfnFunction, unsigned cArgs, va_list Args);
VMMR3_INT_DECL(int) VMR3ReqCallWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
VMMR3DECL(int) VMR3ReqCallWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
VMMR3DECL(int) VMR3ReqCallNoWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
VMMR3DECL(int) VMR3ReqCallNoWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
VMMR3_INT_DECL(int) VMR3ReqCallVoidWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
VMMR3DECL(int) VMR3ReqCallVoidWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
VMMR3DECL(int) VMR3ReqCallVoidNoWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
VMMR3DECL(int) VMR3ReqPriorityCallWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
VMMR3DECL(int) VMR3ReqPriorityCallWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
VMMR3DECL(int) VMR3ReqPriorityCallVoidWaitU(PUVM pUVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...);
VMMR3DECL(int) VMR3GetCpuCoreAndPackageIdFromCpuId(PUVM pUVM, VMCPUID idCpu, uint32_t *pidCpuCore, uint32_t *pidCpuPackage);
#ifdef IN_RC