VMInternal.h revision 0030f46ad9598f1af9e85adc03691021e18c5ddf
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync/* $Id$ */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync/** @file
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync * VM - Internal header file.
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync/*
c58f1213e628a545081c70e26c6b67a841cff880vboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync *
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync * available from http://www.virtualbox.org. This file is free software;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync * you can redistribute it and/or modify it under the terms of the GNU
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync * General Public License (GPL) as published by the Free Software
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync *
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync * additional information or have any questions.
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync#ifndef ___VMInternal_h
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync#define ___VMInternal_h
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync#include <VBox/cdefs.h>
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync#include <VBox/vmapi.h>
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync#include <setjmp.h>
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync/** @defgroup grp_vm_int Internals
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync * @ingroup grp_vm
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync * @internal
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync * @{
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync */
230bd8589bba39933ac5ec21482d6186d675e604vboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync/**
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync * At-reset callback type.
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync */
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsynctypedef enum VMATRESETTYPE
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync{
b72d3233df38e3122eda39b39a27b35c27209615vboxsync /** Device callback. */
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync VMATRESETTYPE_DEV = 1,
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync /** Internal callback . */
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync VMATRESETTYPE_INTERNAL,
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync /** External callback. */
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync VMATRESETTYPE_EXTERNAL
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync} VMATRESETTYPE;
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync/** Pointer to at-reset callback. */
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsynctypedef struct VMATRESET *PVMATRESET;
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync/**
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync * At reset callback.
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync */
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsynctypedef struct VMATRESET
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync{
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync /** Pointer to the next one in the list. */
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync PVMATRESET pNext;
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync /** Callback type. */
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync VMATRESETTYPE enmType;
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync /** User argument for the callback. */
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync void *pvUser;
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync /** Description. */
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync const char *pszDesc;
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync /** Type specific data. */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync union
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync {
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync /** VMATRESETTYPE_DEV. */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync struct
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync {
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** Callback. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync PFNVMATRESET pfnCallback;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** Device instance. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync PPDMDEVINS pDevIns;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync } Dev;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync /** VMATRESETTYPE_INTERNAL. */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync struct
230bd8589bba39933ac5ec21482d6186d675e604vboxsync {
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync /** Callback. */
230bd8589bba39933ac5ec21482d6186d675e604vboxsync PFNVMATRESETINT pfnCallback;
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync } Internal;
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync /** VMATRESETTYPE_EXTERNAL. */
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync struct
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync {
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync /** Callback. */
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync PFNVMATRESETEXT pfnCallback;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync } External;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync } u;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync} VMATRESET;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync/**
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync * VM state change callback.
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync */
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsynctypedef struct VMATSTATE
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync{
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync /** Pointer to the next one. */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync struct VMATSTATE *pNext;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync /** Pointer to the callback. */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync PFNVMATSTATE pfnAtState;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync /** The user argument. */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync void *pvUser;
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync} VMATSTATE;
0368e9c310393e82ef37c480b6acbd0f107cf0edvboxsync/** Pointer to a VM state change callback. */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctypedef VMATSTATE *PVMATSTATE;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync/**
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync * VM error callback.
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctypedef struct VMATERROR
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync{
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync /** Pointer to the next one. */
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync struct VMATERROR *pNext;
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync /** Pointer to the callback. */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync PFNVMATERROR pfnAtError;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync /** The user argument. */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync void *pvUser;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync} VMATERROR;
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync/** Pointer to a VM error callback. */
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsynctypedef VMATERROR *PVMATERROR;
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync/**
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync * Chunk of memory allocated off the hypervisor heap in which
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync * we copy the error details.
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync */
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsynctypedef struct VMERROR
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync{
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync /** The size of the chunk. */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync uint32_t cbAllocated;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync /** The current offset into the chunk.
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync * We start by putting the filename and function immediatly
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync * after the end of the buffer. */
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync uint32_t off;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync /** Offset from the start of this structure to the file name. */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync uint32_t offFile;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync /** The line number. */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync uint32_t iLine;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync /** Offset from the start of this structure to the function name. */
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync uint32_t offFunction;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync /** Offset from the start of this structure to the formatted message text. */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync uint32_t offMessage;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync /** The VBox status code. */
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync int32_t rc;
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync} VMERROR, *PVMERROR;
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync/**
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync * VM runtime error callback.
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctypedef struct VMATRUNTIMEERROR
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync{
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync /** Pointer to the next one. */
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync struct VMATRUNTIMEERROR *pNext;
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync /** Pointer to the callback. */
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync PFNVMATRUNTIMEERROR pfnAtRuntimeError;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync /** The user argument. */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync void *pvUser;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync} VMATRUNTIMEERROR;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync/** Pointer to a VM error callback. */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsynctypedef VMATRUNTIMEERROR *PVMATRUNTIMEERROR;
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync/**
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync * Chunk of memory allocated off the hypervisor heap in which
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync * we copy the runtime error details.
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync */
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsynctypedef struct VMRUNTIMEERROR
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync{
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync /** The size of the chunk. */
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync uint32_t cbAllocated;
d1c36fd86d36726777e3d6f9d040573e0aaf30devboxsync /** The current offset into the chunk.
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync * We start by putting the error ID immediatly
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync * after the end of the buffer. */
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync uint32_t off;
84f746c9015f34e9ab096b87e063d0d6ab7fc7aevboxsync /** Offset from the start of this structure to the error ID. */
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync uint32_t offErrorId;
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync /** Offset from the start of this structure to the formatted message text. */
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync uint32_t offMessage;
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync /** Error flags. */
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync uint32_t fFlags;
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync} VMRUNTIMEERROR, *PVMRUNTIMEERROR;
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync/** The halt method. */
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsynctypedef enum
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync{
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync /** The usual invalid value. */
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync VMHALTMETHOD_INVALID = 0,
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync /** Use the method used during bootstrapping. */
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync VMHALTMETHOD_BOOTSTRAP,
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync /** Use the default method. */
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync VMHALTMETHOD_DEFAULT,
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync /** The old spin/yield/block method. */
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync VMHALTMETHOD_OLD,
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync /** The first go at a block/spin method. */
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync VMHALTMETHOD_1,
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync /** The first go at a more global approach. */
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync VMHALTMETHOD_GLOBAL_1,
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync /** The end of valid methods. (not inclusive of course) */
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync VMHALTMETHOD_END,
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync /** The usual 32-bit max value. */
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync VMHALTMETHOD_32BIT_HACK = 0x7fffffff
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync} VMHALTMETHOD;
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync/**
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync * VM Internal Data (part of the VM structure).
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync *
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync * @todo Move this and all related things to VMM. The VM component was, to some
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync * extent at least, a bad ad hoc design which should all have been put in
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync * VMM. @see pg_vm.
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync */
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsynctypedef struct VMINT
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync{
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync /** VM Error Message. */
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync R3PTRTYPE(PVMERROR) pErrorR3;
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync /** VM Runtime Error Message. */
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync R3PTRTYPE(PVMRUNTIMEERROR) pRuntimeErrorR3;
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync /** Set by VMR3SuspendNoSave; cleared by VMR3Resume; signals the VM is in an
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync * inconsistent state and saving is not allowed. */
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync bool fPreventSaveState;
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync} VMINT;
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync/** Pointer to the VM Internal Data (part of the VM structure). */
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsynctypedef VMINT *PVMINT;
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync/**
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync * VM internal data kept in the UVM.
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync */
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsynctypedef struct VMINTUSERPERVM
b72d3233df38e3122eda39b39a27b35c27209615vboxsync{
b72d3233df38e3122eda39b39a27b35c27209615vboxsync /** Head of the request queue. Atomic. */
5981e6935987b08737b730b63a41acc1dd696377vboxsync volatile PVMREQ pReqs;
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync /** The last index used during alloc/free. */
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync volatile uint32_t iReqFree;
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync /** Number of free request packets. */
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync volatile uint32_t cReqFree;
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync /** Array of pointers to lists of free request packets. Atomic. */
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync volatile PVMREQ apReqFree[9];
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync#ifdef VBOX_WITH_STATISTICS
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync /** Number of VMR3ReqAlloc returning a new packet. */
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync STAMCOUNTER StatReqAllocNew;
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync /** Number of VMR3ReqAlloc causing races. */
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync STAMCOUNTER StatReqAllocRaces;
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync /** Number of VMR3ReqAlloc returning a recycled packet. */
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync STAMCOUNTER StatReqAllocRecycled;
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync /** Number of VMR3ReqFree calls. */
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync STAMCOUNTER StatReqFree;
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync /** Number of times the request was actually freed. */
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync STAMCOUNTER StatReqFreeOverflow;
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync#endif
39c2eccedfdb7455c52225543c355e33a65f0c81vboxsync
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync /** Pointer to the support library session.
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync * Mainly for creation and destruction.. */
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync PSUPDRVSESSION pSession;
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync /** Force EMT to terminate. */
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync bool volatile fTerminateEMT;
b35e3948f1287430503b6b432945b8cf4bfd3a23vboxsync /** If set the EMT does the final VM cleanup when it exits.
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync * If clear the VMR3Destroy() caller does so. */
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync bool fEMTDoesTheCleanup;
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync /** List of registered reset callbacks. */
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync PVMATRESET pAtReset;
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync /** List of registered reset callbacks. */
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync PVMATRESET *ppAtResetNext;
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync /** List of registered state change callbacks. */
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync PVMATSTATE pAtState;
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync /** List of registered state change callbacks. */
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync PVMATSTATE *ppAtStateNext;
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync /** List of registered error callbacks. */
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync PVMATERROR pAtError;
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync /** List of registered error callbacks. */
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync PVMATERROR *ppAtErrorNext;
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync /** List of registered error callbacks. */
d8dee9a7ef33d4c705d5fd087d5af9c7cb071f85vboxsync PVMATRUNTIMEERROR pAtRuntimeError;
0612e2adbcc146b9eb7748983c720e35e38d0dc9vboxsync /** List of registered error callbacks. */
e2a73964f463b9e91f6f096f9e15974a3edcc416vboxsync PVMATRUNTIMEERROR *ppAtRuntimeErrorNext;
683eff3070b1b86fe71b71af7fda82766ea19d17vboxsync
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** @name Generic Halt data
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync * @{
683eff3070b1b86fe71b71af7fda82766ea19d17vboxsync */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** The current halt method.
683eff3070b1b86fe71b71af7fda82766ea19d17vboxsync * Can be selected by CFGM option 'VM/HaltMethod'. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync VMHALTMETHOD enmHaltMethod;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** The index into g_aHaltMethods of the current halt method. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync uint32_t volatile iHaltMethod;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** @} */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync
683eff3070b1b86fe71b71af7fda82766ea19d17vboxsync /** @todo Do NOT add new members here or resue the current, we need to store the config for
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync * each halt method seperately because we're racing on SMP guest rigs. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync union
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync {
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /**
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync * Method 1 & 2 - Block whenever possible, and when lagging behind
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync * switch to spinning with regular blocking every 5-200ms (defaults)
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync * depending on the accumulated lag. The blocking interval is adjusted
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync * with the average oversleeping of the last 64 times.
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync *
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync * The difference between 1 and 2 is that we use native absolute
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync * time APIs for the blocking instead of the millisecond based IPRT
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync * interface.
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync */
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync struct
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync {
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** The max interval without blocking (when spinning). */
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync uint32_t u32MinBlockIntervalCfg;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** The minimum interval between blocking (when spinning). */
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync uint32_t u32MaxBlockIntervalCfg;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** The value to divide the current lag by to get the raw blocking interval (when spinning). */
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync uint32_t u32LagBlockIntervalDivisorCfg;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** When to start spinning (lag / nano secs). */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync uint32_t u32StartSpinningCfg;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** When to stop spinning (lag / nano secs). */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync uint32_t u32StopSpinningCfg;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync } Method12;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync } Halt;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** Pointer to the DBGC instance data. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync void *pvDBGC;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** TLS index for the VMINTUSERPERVMCPU pointer. */
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync RTTLS idxTLS;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync} VMINTUSERPERVM;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync/** Pointer to the VM internal data kept in the UVM. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsynctypedef VMINTUSERPERVM *PVMINTUSERPERVM;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync/**
683eff3070b1b86fe71b71af7fda82766ea19d17vboxsync * VMCPU internal data kept in the UVM.
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync *
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync * Almost a copy of VMINTUSERPERVM. Separate data properly later on.
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync */
683eff3070b1b86fe71b71af7fda82766ea19d17vboxsynctypedef struct VMINTUSERPERVMCPU
683eff3070b1b86fe71b71af7fda82766ea19d17vboxsync{
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** Head of the request queue. Atomic. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync volatile PVMREQ pReqs;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** The handle to the EMT thread. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync RTTHREAD ThreadEMT;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** The native of the EMT thread. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync RTNATIVETHREAD NativeThreadEMT;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** Wait event semaphore. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync RTSEMEVENT EventSemWait;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** Wait/Idle indicator. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync bool volatile fWait;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** Force EMT to terminate. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync bool volatile fTerminateEMT;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** If set the EMT does the final VM cleanup when it exits.
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync * If clear the VMR3Destroy() caller does so. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync bool fEMTDoesTheCleanup;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** @name Generic Halt data
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync * @{
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** The average time (ns) between two halts in the last second. (updated once per second) */
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync uint32_t HaltInterval;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** The average halt frequency for the last second. (updated once per second) */
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync uint32_t HaltFrequency;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** The number of halts in the current period. */
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync uint32_t cHalts;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync uint32_t padding; /**< alignment padding. */
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** When we started counting halts in cHalts (RTTimeNanoTS). */
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync uint64_t u64HaltsStartTS;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** @} */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** Union containing data and config for the different halt algorithms. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync union
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync {
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /**
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync * Method 1 & 2 - Block whenever possible, and when lagging behind
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync * switch to spinning with regular blocking every 5-200ms (defaults)
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync * depending on the accumulated lag. The blocking interval is adjusted
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync * with the average oversleeping of the last 64 times.
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync *
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync * The difference between 1 and 2 is that we use native absolute
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync * time APIs for the blocking instead of the millisecond based IPRT
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync * interface.
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync struct
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync {
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** How many times we've blocked while cBlockedNS and cBlockedTooLongNS has been accumulating. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync uint32_t cBlocks;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** Avg. time spend oversleeping when blocking. (Re-calculated every so often.) */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync uint64_t cNSBlockedTooLongAvg;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** Total time spend oversleeping when blocking. */
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync uint64_t cNSBlockedTooLong;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** Total time spent blocking. */
683eff3070b1b86fe71b71af7fda82766ea19d17vboxsync uint64_t cNSBlocked;
683eff3070b1b86fe71b71af7fda82766ea19d17vboxsync /** The timestamp (RTTimeNanoTS) of the last block. */
b72d3233df38e3122eda39b39a27b35c27209615vboxsync uint64_t u64LastBlockTS;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** When we started spinning relentlessly in order to catch up some of the oversleeping.
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync * This is 0 when we're not spinning. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync uint64_t u64StartSpinTS;
b72d3233df38e3122eda39b39a27b35c27209615vboxsync } Method12;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync#if 0
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /**
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync * Method 3 & 4 - Same as method 1 & 2 respectivly, except that we
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync * sprinkle it with yields.
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync */
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync struct
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync {
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** How many times we've blocked while cBlockedNS and cBlockedTooLongNS has been accumulating. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync uint32_t cBlocks;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** Avg. time spend oversleeping when blocking. (Re-calculated every so often.) */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync uint64_t cBlockedTooLongNSAvg;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** Total time spend oversleeping when blocking. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync uint64_t cBlockedTooLongNS;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** Total time spent blocking. */
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync uint64_t cBlockedNS;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** The timestamp (RTTimeNanoTS) of the last block. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync uint64_t u64LastBlockTS;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** How many times we've yielded while cBlockedNS and cBlockedTooLongNS has been accumulating. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync uint32_t cYields;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** Avg. time spend oversleeping when yielding. */
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync uint32_t cYieldTooLongNSAvg;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** Total time spend oversleeping when yielding. */
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync uint64_t cYieldTooLongNS;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** Total time spent yielding. */
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync uint64_t cYieldedNS;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** The timestamp (RTTimeNanoTS) of the last block. */
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync uint64_t u64LastYieldTS;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** When we started spinning relentlessly in order to catch up some of the oversleeping. */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync uint64_t u64StartSpinTS;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync } Method34;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync#endif
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync } Halt;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync /** Profiling the halted state; yielding vs blocking.
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync * @{ */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync STAMPROFILE StatHaltYield;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync STAMPROFILE StatHaltBlock;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync STAMPROFILE StatHaltTimers;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync STAMPROFILE StatHaltPoll;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync /** @} */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync} VMINTUSERPERVMCPU;
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync/** Pointer to the VM internal data kept in the UVM. */
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsynctypedef VMINTUSERPERVMCPU *PVMINTUSERPERVMCPU;
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync__BEGIN_DECLS
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsyncDECLCALLBACK(int) vmR3EmulationThread(RTTHREAD ThreadSelf, void *pvArg);
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsyncint vmR3SetHaltMethodU(PUVM pUVM, VMHALTMETHOD enmHaltMethod);
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsyncDECLCALLBACK(int) vmR3Destroy(PVM pVM);
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsyncDECLCALLBACK(void) vmR3SetErrorUV(PUVM pUVM, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list *args);
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsyncvoid vmSetErrorCopy(PVM pVM, int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list args);
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsyncDECLCALLBACK(int) vmR3SetRuntimeErrorV(PVM pVM, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list *pVa);
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsyncvoid vmSetRuntimeErrorCopy(PVM pVM, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list va);
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsyncvoid vmR3DestroyFinalBitFromEMT(PUVM pUVM);
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsyncvoid vmR3SetState(PVM pVM, VMSTATE enmStateNew);
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync__END_DECLS
6d41476175401a18893ea8cb8a40d125eefa04f3vboxsync
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync/** @} */
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync#endif
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync
9b456547aefb8a2e8f5600eba9ec377dbc9b4475vboxsync