1 | ;; @file
|
---|
2 | ;
|
---|
3 | ; VM - The Virtual Machine.
|
---|
4 | ;
|
---|
5 |
|
---|
6 | ;
|
---|
7 | ; Copyright (C) 2006-2007 Oracle Corporation
|
---|
8 | ;
|
---|
9 | ; This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | ; available from http://www.virtualbox.org. This file is free software;
|
---|
11 | ; you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | ; General Public License (GPL) as published by the Free Software
|
---|
13 | ; Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | ; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | ; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | ;
|
---|
17 | ; The contents of this file may alternatively be used under the terms
|
---|
18 | ; of the Common Development and Distribution License Version 1.0
|
---|
19 | ; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
20 | ; VirtualBox OSE distribution, in which case the provisions of the
|
---|
21 | ; CDDL are applicable instead of those of the GPL.
|
---|
22 | ;
|
---|
23 | ; You may elect to license modified versions of this file under the
|
---|
24 | ; terms and conditions of either the GPL or the CDDL or both.
|
---|
25 | ;
|
---|
26 |
|
---|
27 | %ifndef __VBox_vm_mac__
|
---|
28 | %define __VBox_vm_mac__
|
---|
29 |
|
---|
30 | %include "VBox/stam.mac"
|
---|
31 |
|
---|
32 | ;/** This action forces the VM to service check and pending interrups on the APIC. */
|
---|
33 | %define VMCPU_FF_INTERRUPT_APIC (1 << 0)
|
---|
34 | ;/** This action forces the VM to service check and pending interrups on the PIC. */
|
---|
35 | %define VMCPU_FF_INTERRUPT_PIC (1 << 1)
|
---|
36 | ;/** This action forces the VM to schedule and run pending timer (TM). */
|
---|
37 | %define VMCPU_FF_TIMER (1 << 2)
|
---|
38 | ;/** This action forces the VM to service pending requests from other
|
---|
39 | ; * thread or requests which must be executed in another context. */
|
---|
40 | %define VMCPU_FF_REQUEST (1 << 9)
|
---|
41 |
|
---|
42 | ;;
|
---|
43 | ; This is part of the VM structure.
|
---|
44 | struc VM
|
---|
45 | .enmVMState resd 1
|
---|
46 | .fGlobalForcedActions resd 1
|
---|
47 | .paVMPagesR3 RTR3PTR_RES 1
|
---|
48 | .pSession RTR0PTR_RES 1
|
---|
49 | .pUVM RTR3PTR_RES 1
|
---|
50 | .pVMR3 RTR3PTR_RES 1
|
---|
51 | .pVMR0 RTR0PTR_RES 1
|
---|
52 | .pVMRC RTRCPTR_RES 1
|
---|
53 | .hSelf resd 1
|
---|
54 | .cCpus resd 1
|
---|
55 | .uCpuPriority resd 1
|
---|
56 | .cbSelf resd 1
|
---|
57 | .offVMCPU resd 1
|
---|
58 | .u32Reserved resd 5
|
---|
59 |
|
---|
60 | .pfnVMMGCGuestToHostAsmGuestCtx RTRCPTR_RES 1
|
---|
61 | .pfnVMMGCGuestToHostAsmHyperCtx RTRCPTR_RES 1
|
---|
62 | .pfnVMMGCGuestToHostAsm RTRCPTR_RES 1
|
---|
63 |
|
---|
64 | .uPadding1 RTHCPTR_RES 1
|
---|
65 | .uPadding2 RTHCPTR_RES 1
|
---|
66 |
|
---|
67 | .fRawR3Enabled resb 1
|
---|
68 | .fRawR0Enabled resb 1
|
---|
69 | .fPATMEnabled resb 1
|
---|
70 | .fCSAMEnabled resb 1
|
---|
71 | .fHWACCMEnabled resb 1
|
---|
72 | .fHwVirtExtForced resb 1
|
---|
73 | .fFaultTolerantMaster resb 1
|
---|
74 | .fUseLargePages resb 1
|
---|
75 |
|
---|
76 | alignb 8
|
---|
77 |
|
---|
78 | .StatTotalQemuToGC resb STAMPROFILEADV_size
|
---|
79 | .StatTotalGCToQemu resb STAMPROFILEADV_size
|
---|
80 | .StatTotalInGC resb STAMPROFILEADV_size
|
---|
81 | .StatTotalInQemu resb STAMPROFILEADV_size
|
---|
82 | .StatSwitcherToGC resb STAMPROFILEADV_size
|
---|
83 | .StatSwitcherToHC resb STAMPROFILEADV_size
|
---|
84 | .StatSwitcherSaveRegs resb STAMPROFILEADV_size
|
---|
85 | .StatSwitcherSysEnter resb STAMPROFILEADV_size
|
---|
86 | .StatSwitcherDebug resb STAMPROFILEADV_size
|
---|
87 | .StatSwitcherCR0 resb STAMPROFILEADV_size
|
---|
88 | .StatSwitcherCR4 resb STAMPROFILEADV_size
|
---|
89 | .StatSwitcherJmpCR3 resb STAMPROFILEADV_size
|
---|
90 | .StatSwitcherRstrRegs resb STAMPROFILEADV_size
|
---|
91 | .StatSwitcherLgdt resb STAMPROFILEADV_size
|
---|
92 | .StatSwitcherLidt resb STAMPROFILEADV_size
|
---|
93 | .StatSwitcherLldt resb STAMPROFILEADV_size
|
---|
94 | .StatSwitcherTSS resb STAMPROFILEADV_size
|
---|
95 |
|
---|
96 | %ifndef HC_ARCH_BITS
|
---|
97 | %error "Missing HC_ARCH_BITS"
|
---|
98 | %endif
|
---|
99 | %if HC_ARCH_BITS == 32
|
---|
100 | .abAlignment1 resb 48
|
---|
101 | %else
|
---|
102 | .abAlignment1 resb 24
|
---|
103 | %endif
|
---|
104 |
|
---|
105 | alignb 64
|
---|
106 | .cpum resb 1472
|
---|
107 | .vmm resb 1536
|
---|
108 |
|
---|
109 | endstruc
|
---|
110 |
|
---|
111 | ;;
|
---|
112 | ; This is part of the VMCPU structure.
|
---|
113 | struc VMCPU
|
---|
114 | .fLocalForcedActions resd 1
|
---|
115 | .enmState resd 1
|
---|
116 | .pUVCpu RTR3PTR_RES 1
|
---|
117 | .pVMR3 RTR3PTR_RES 1
|
---|
118 | .pVMR0 RTR0PTR_RES 1
|
---|
119 | .pvR0Padding RTR0PTR_RES 1
|
---|
120 | .pVMRC RTRCPTR_RES 1
|
---|
121 | .idCpu resd 1
|
---|
122 |
|
---|
123 | .hNativeThread RTR0PTR_RES 1
|
---|
124 | .hNativeThreadR0 RTR0PTR_RES 1
|
---|
125 | .idHostCpu resd 1
|
---|
126 | .uAdHoc resd 1
|
---|
127 | .aStatAdHoc resb STAMPROFILEADV_size * 8
|
---|
128 |
|
---|
129 | %if HC_ARCH_BITS == 32
|
---|
130 | .abAlignment1 resd 16+1
|
---|
131 | %endif
|
---|
132 | alignb 64
|
---|
133 |
|
---|
134 | .cpum resb 4096
|
---|
135 | endstruc
|
---|
136 |
|
---|
137 |
|
---|
138 | %endif
|
---|