1 | ;; @file
|
---|
2 | ; VM - The Virtual Machine.
|
---|
3 | ;
|
---|
4 |
|
---|
5 | ;
|
---|
6 | ; Copyright (C) 2006-2022 Oracle and/or its affiliates.
|
---|
7 | ;
|
---|
8 | ; This file is part of VirtualBox base platform packages, as
|
---|
9 | ; available from https://www.virtualbox.org.
|
---|
10 | ;
|
---|
11 | ; This program is free software; you can redistribute it and/or
|
---|
12 | ; modify it under the terms of the GNU General Public License
|
---|
13 | ; as published by the Free Software Foundation, in version 3 of the
|
---|
14 | ; License.
|
---|
15 | ;
|
---|
16 | ; This program is distributed in the hope that it will be useful, but
|
---|
17 | ; WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
19 | ; General Public License for more details.
|
---|
20 | ;
|
---|
21 | ; You should have received a copy of the GNU General Public License
|
---|
22 | ; along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
23 | ;
|
---|
24 | ; The contents of this file may alternatively be used under the terms
|
---|
25 | ; of the Common Development and Distribution License Version 1.0
|
---|
26 | ; (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
|
---|
27 | ; in the VirtualBox distribution, in which case the provisions of the
|
---|
28 | ; CDDL are applicable instead of those of the GPL.
|
---|
29 | ;
|
---|
30 | ; You may elect to license modified versions of this file under the
|
---|
31 | ; terms and conditions of either the GPL or the CDDL or both.
|
---|
32 | ;
|
---|
33 | ; SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
|
---|
34 | ;
|
---|
35 |
|
---|
36 | %ifndef ___VBox_vmm_vm_mac
|
---|
37 | %define ___VBox_vmm_vm_mac
|
---|
38 |
|
---|
39 | %include "VBox/vmm/stam.mac"
|
---|
40 | %include "VBox/param.mac"
|
---|
41 |
|
---|
42 | ;/** This action forces the VM to service check and pending interrups on the APIC. */
|
---|
43 | %define VMCPU_FF_INTERRUPT_APIC (1 << 0)
|
---|
44 | ;/** This action forces the VM to service check and pending interrups on the PIC. */
|
---|
45 | %define VMCPU_FF_INTERRUPT_PIC (1 << 1)
|
---|
46 | ;/** This action forces the VM to schedule and run pending timer (TM). */
|
---|
47 | %define VMCPU_FF_TIMER (1 << 2)
|
---|
48 | ;/** This action forces the VM to service pending requests from other
|
---|
49 | ; * thread or requests which must be executed in another context. */
|
---|
50 | %define VMCPU_FF_REQUEST (1 << 9)
|
---|
51 |
|
---|
52 | ;;
|
---|
53 | ; This is part of the VMCPU structure.
|
---|
54 | struc VMCPU
|
---|
55 | .fLocalForcedActions resd 1
|
---|
56 | alignb 8
|
---|
57 | .enmState resd 1
|
---|
58 |
|
---|
59 | alignb 64
|
---|
60 | .iem resb 32832
|
---|
61 |
|
---|
62 | alignb 64
|
---|
63 | .pVMR3 RTR3PTR_RES 1
|
---|
64 | .pVCpuR0ForVtg RTR0PTR_RES 1
|
---|
65 | .pVMRC resq 1
|
---|
66 | .pUVCpu RTR3PTR_RES 1
|
---|
67 | .hNativeThread RTR3PTR_RES 1
|
---|
68 | .hNativeThreadR0 RTR0PTR_RES 1
|
---|
69 | .hThread RTR3PTR_RES 1
|
---|
70 | .idCpu resd 1
|
---|
71 |
|
---|
72 | alignb 64
|
---|
73 | .hm resb 9984
|
---|
74 | alignb 64
|
---|
75 | .nem resb 4608
|
---|
76 | alignb 64
|
---|
77 | .trpm resb 128
|
---|
78 | alignb 64
|
---|
79 | .tm resb 5760
|
---|
80 | alignb 64
|
---|
81 | .vmm resb 9536
|
---|
82 | alignb 64
|
---|
83 | .pdm resb 256
|
---|
84 | alignb 64
|
---|
85 | .iom resb 512
|
---|
86 | alignb 64
|
---|
87 | .dbgf resb 512
|
---|
88 | alignb 64
|
---|
89 | .gim resb 512
|
---|
90 | alignb 64
|
---|
91 | .apic resb 3840
|
---|
92 |
|
---|
93 | alignb 64
|
---|
94 | .fTraceGroups resd 1
|
---|
95 | .cEmtHashCollisions resb 1
|
---|
96 | .abAdHoc resb 3
|
---|
97 | alignb 8
|
---|
98 | .aStatAdHoc resb STAMPROFILEADV_size * 8
|
---|
99 |
|
---|
100 | alignb 4096
|
---|
101 | .pgm resb 4096+28672
|
---|
102 | alignb 4096
|
---|
103 | .cpum resb 102400
|
---|
104 | %define VMCPU.cpum.GstCtx VMCPU.cpum
|
---|
105 | alignb 4096
|
---|
106 | .em resb 40960
|
---|
107 | alignb 16384
|
---|
108 | endstruc
|
---|
109 |
|
---|
110 | ;;
|
---|
111 | ; This is part of the VM structure.
|
---|
112 | struc VM
|
---|
113 | .enmVMState resd 1
|
---|
114 | .fGlobalForcedActions resd 1
|
---|
115 | .paVMPagesR3 RTR3PTR_RES 1
|
---|
116 | .pSession RTR0PTR_RES 1
|
---|
117 | .pUVM RTR3PTR_RES 1
|
---|
118 | .pVMR3 RTR3PTR_RES 1
|
---|
119 | .pVMR0ForCall RTR0PTR_RES 1
|
---|
120 | .pVMRC resq 1
|
---|
121 | %ifdef IN_RING0
|
---|
122 | .hSelfUnsafe resd 1
|
---|
123 | .cCpusUnsafe resd 1
|
---|
124 | %else
|
---|
125 | .hSelf resd 1
|
---|
126 | .cCpus resd 1
|
---|
127 | %endif
|
---|
128 | .uCpuExecutionCap resd 1
|
---|
129 | .cbSelf resd 1
|
---|
130 | .cbVCpu resd 1
|
---|
131 | .uStructVersion resd 1
|
---|
132 | .bMainExecutionEngine resb 1
|
---|
133 | .fHMEnabled resb 1
|
---|
134 |
|
---|
135 | .uPadding1 resb 6
|
---|
136 |
|
---|
137 | .hTraceBufR3 RTR3PTR_RES 1
|
---|
138 | .hTraceBufR0 RTR0PTR_RES 1
|
---|
139 |
|
---|
140 | alignb 64
|
---|
141 | .cpum resb 8832 + 128*8192
|
---|
142 | alignb 16384
|
---|
143 | .pgm resb 53888
|
---|
144 | alignb 64
|
---|
145 | .vmm resb 1600
|
---|
146 | alignb 64
|
---|
147 | .hm resb 5504
|
---|
148 | alignb 64
|
---|
149 | .trpm resb 2048
|
---|
150 | alignb 64
|
---|
151 | .selm resb 768
|
---|
152 | alignb 64
|
---|
153 | .mm resb 192
|
---|
154 | alignb 64
|
---|
155 | .pdm resb 22400
|
---|
156 | alignb 64
|
---|
157 | .iom resb 1152
|
---|
158 | alignb 64
|
---|
159 | .em resb 256
|
---|
160 | alignb 64
|
---|
161 | .nem resb 4608
|
---|
162 | alignb 64
|
---|
163 | .tm resb 10112
|
---|
164 | alignb 64
|
---|
165 | .dbgf resb 2432
|
---|
166 | alignb 64
|
---|
167 | .ssm resb 128
|
---|
168 | alignb 64
|
---|
169 | .gim resb 448
|
---|
170 | alignb 64
|
---|
171 | .apic resb 128
|
---|
172 | alignb 64
|
---|
173 | .vm resb 32
|
---|
174 | .cfgm resb 8
|
---|
175 | .iem resb 16
|
---|
176 | .R0Stats resb 64
|
---|
177 | .gcm resb 32
|
---|
178 |
|
---|
179 | times ((($ + VMM_MAX_CPU_COUNT * RTR0PTR_CB + 16383) & ~16383) - ($ + VMM_MAX_CPU_COUNT * RTR0PTR_CB)) resb 1
|
---|
180 | .apCpusR3 RTR3PTR_RES VMM_MAX_CPU_COUNT
|
---|
181 | alignb 16384
|
---|
182 |
|
---|
183 | endstruc
|
---|
184 |
|
---|
185 |
|
---|
186 | %endif
|
---|
187 |
|
---|