vm.mac revision 0b74a2f80aba476dc8be8bc1c63891fc53945986
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony;; @file
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony; VM - The Virtual Machine.
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony;
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony;
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony; Copyright (C) 2006-2010 Oracle Corporation
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony;
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony; This file is part of VirtualBox Open Source Edition (OSE), as
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony; available from http://www.virtualbox.org. This file is free software;
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony; you can redistribute it and/or modify it under the terms of the GNU
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony; General Public License (GPL) as published by the Free Software
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony; Foundation, in version 2 as it comes in the "COPYING" file of the
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony;
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony; The contents of this file may alternatively be used under the terms
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony; of the Common Development and Distribution License Version 1.0
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony; VirtualBox OSE distribution, in which case the provisions of the
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony; CDDL are applicable instead of those of the GPL.
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony;
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony; You may elect to license modified versions of this file under the
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony; terms and conditions of either the GPL or the CDDL or both.
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony;
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony%ifndef ___VBox_vmm_vm_mac__
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony%define ___VBox_vmm_vm_mac__
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony%include "VBox/vmm/stam.mac"
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony;/** This action forces the VM to service check and pending interrups on the APIC. */
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony%define VMCPU_FF_INTERRUPT_APIC (1 << 0)
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony;/** This action forces the VM to service check and pending interrups on the PIC. */
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony%define VMCPU_FF_INTERRUPT_PIC (1 << 1)
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony;/** This action forces the VM to schedule and run pending timer (TM). */
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony%define VMCPU_FF_TIMER (1 << 2)
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony;/** This action forces the VM to service pending requests from other
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony; * thread or requests which must be executed in another context. */
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony%define VMCPU_FF_REQUEST (1 << 9)
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony;;
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony; This is part of the VM structure.
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctonystruc VM
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .enmVMState resd 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .fGlobalForcedActions resd 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .paVMPagesR3 RTR3PTR_RES 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .pSession RTR0PTR_RES 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .pUVM RTR3PTR_RES 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .pVMR3 RTR3PTR_RES 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .pVMR0 RTR0PTR_RES 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .pVMRC RTRCPTR_RES 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .hSelf resd 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .cCpus resd 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .uCpuExecutionCap resd 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .cbSelf resd 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .offVMCPU resd 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .u32Reserved resd 5
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .pfnVMMGCGuestToHostAsmGuestCtx RTRCPTR_RES 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .pfnVMMGCGuestToHostAsmHyperCtx RTRCPTR_RES 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .pfnVMMGCGuestToHostAsm RTRCPTR_RES 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .uPadding1 RTHCPTR_RES 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .uPadding2 RTHCPTR_RES 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .fRawR3Enabled resb 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .fRawR0Enabled resb 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .fPATMEnabled resb 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .fCSAMEnabled resb 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .fHWACCMEnabled resb 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .fHwVirtExtForced resb 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .fFaultTolerantMaster resb 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .fUseLargePages resb 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony alignb 8
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .StatTotalQemuToGC resb STAMPROFILEADV_size
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .StatTotalGCToQemu resb STAMPROFILEADV_size
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .StatTotalInGC resb STAMPROFILEADV_size
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .StatTotalInQemu resb STAMPROFILEADV_size
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .StatSwitcherToGC resb STAMPROFILEADV_size
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .StatSwitcherToHC resb STAMPROFILEADV_size
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .StatSwitcherSaveRegs resb STAMPROFILEADV_size
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .StatSwitcherSysEnter resb STAMPROFILEADV_size
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .StatSwitcherDebug resb STAMPROFILEADV_size
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .StatSwitcherCR0 resb STAMPROFILEADV_size
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .StatSwitcherCR4 resb STAMPROFILEADV_size
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .StatSwitcherJmpCR3 resb STAMPROFILEADV_size
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .StatSwitcherRstrRegs resb STAMPROFILEADV_size
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .StatSwitcherLgdt resb STAMPROFILEADV_size
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .StatSwitcherLidt resb STAMPROFILEADV_size
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .StatSwitcherLldt resb STAMPROFILEADV_size
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .StatSwitcherTSS resb STAMPROFILEADV_size
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony%ifndef HC_ARCH_BITS
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony %error "Missing HC_ARCH_BITS"
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony%endif
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony%if HC_ARCH_BITS == 32
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .abAlignment1 resb 48
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony%else
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .abAlignment1 resb 24
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony%endif
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony alignb 64
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .cpum resb 1472
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .vmm resb 1536
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctonyendstruc
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony;;
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony; This is part of the VMCPU structure.
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctonystruc VMCPU
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .fLocalForcedActions resd 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .enmState resd 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .pUVCpu RTR3PTR_RES 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .pVMR3 RTR3PTR_RES 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .pVMR0 RTR0PTR_RES 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .pvR0Padding RTR0PTR_RES 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .pVMRC RTRCPTR_RES 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .idCpu resd 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .hNativeThread RTR0PTR_RES 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .hNativeThreadR0 RTR0PTR_RES 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .idHostCpu resd 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .uAdHoc resd 1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .aStatAdHoc resb STAMPROFILEADV_size * 8
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony%if HC_ARCH_BITS == 32
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .abAlignment1 resd 16+1
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony%endif
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony alignb 64
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony .cpum resb 4096
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctonyendstruc
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony%endif
0f6bc9e2c8229996a73fb57ec6c45841346ebcb1pctony