1 | ;; @file
|
---|
2 | ; VM - The Virtual Machine.
|
---|
3 | ;
|
---|
4 |
|
---|
5 | ;
|
---|
6 | ; Copyright (C) 2006-2020 Oracle Corporation
|
---|
7 | ;
|
---|
8 | ; This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
9 | ; available from http://www.virtualbox.org. This file is free software;
|
---|
10 | ; you can redistribute it and/or modify it under the terms of the GNU
|
---|
11 | ; General Public License (GPL) as published by the Free Software
|
---|
12 | ; Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
13 | ; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
14 | ; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
15 | ;
|
---|
16 | ; The contents of this file may alternatively be used under the terms
|
---|
17 | ; of the Common Development and Distribution License Version 1.0
|
---|
18 | ; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
19 | ; VirtualBox OSE distribution, in which case the provisions of the
|
---|
20 | ; CDDL are applicable instead of those of the GPL.
|
---|
21 | ;
|
---|
22 | ; You may elect to license modified versions of this file under the
|
---|
23 | ; terms and conditions of either the GPL or the CDDL or both.
|
---|
24 | ;
|
---|
25 |
|
---|
26 | %ifndef ___VBox_vmm_vm_mac
|
---|
27 | %define ___VBox_vmm_vm_mac
|
---|
28 |
|
---|
29 | %include "VBox/vmm/stam.mac"
|
---|
30 | %include "VBox/param.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 VMCPU structure.
|
---|
44 | struc VMCPU
|
---|
45 | .fLocalForcedActions resd 1
|
---|
46 | alignb 8
|
---|
47 | .enmState resd 1
|
---|
48 |
|
---|
49 | alignb 64
|
---|
50 | .iem resb 18496
|
---|
51 |
|
---|
52 | alignb 64
|
---|
53 | .pVMR3 RTR3PTR_RES 1
|
---|
54 | .pVCpuR0ForVtg RTR0PTR_RES 1
|
---|
55 | .pVMRC resq 1
|
---|
56 | .pUVCpu RTR3PTR_RES 1
|
---|
57 | .hNativeThread RTR3PTR_RES 1
|
---|
58 | .hNativeThreadR0 RTR0PTR_RES 1
|
---|
59 | .hThread RTR3PTR_RES 1
|
---|
60 | .idCpu resd 1
|
---|
61 |
|
---|
62 | alignb 64
|
---|
63 | .hm resb 5888
|
---|
64 | alignb 64
|
---|
65 | .nem resb 512
|
---|
66 | alignb 64
|
---|
67 | .trpm resb 128
|
---|
68 | alignb 64
|
---|
69 | .tm resb 5760
|
---|
70 | alignb 64
|
---|
71 | .vmm resb 960
|
---|
72 | alignb 64
|
---|
73 | .pdm resb 256
|
---|
74 | alignb 64
|
---|
75 | .iom resb 512
|
---|
76 | alignb 64
|
---|
77 | .dbgf resb 512
|
---|
78 | alignb 64
|
---|
79 | .gim resb 512
|
---|
80 | alignb 64
|
---|
81 | .apic resb 3840
|
---|
82 |
|
---|
83 | alignb 64
|
---|
84 | .fTraceGroups resd 1
|
---|
85 | .uAdHoc resd 1
|
---|
86 | alignb 8
|
---|
87 | .aStatAdHoc resb STAMPROFILEADV_size * 8
|
---|
88 |
|
---|
89 | alignb 4096
|
---|
90 | .pgm resb 4096
|
---|
91 | alignb 4096
|
---|
92 | .cpum resb 4096
|
---|
93 | %define VMCPU.cpum.GstCtx VMCPU.cpum
|
---|
94 | alignb 4096
|
---|
95 | .em resb 40960
|
---|
96 | alignb 4096
|
---|
97 | endstruc
|
---|
98 |
|
---|
99 | ;;
|
---|
100 | ; This is part of the VM structure.
|
---|
101 | struc VM
|
---|
102 | .enmVMState resd 1
|
---|
103 | .fGlobalForcedActions resd 1
|
---|
104 | .paVMPagesR3 RTR3PTR_RES 1
|
---|
105 | .pSession RTR0PTR_RES 1
|
---|
106 | .pUVM RTR3PTR_RES 1
|
---|
107 | .pVMR3 RTR3PTR_RES 1
|
---|
108 | .pVMR0ForCall RTR0PTR_RES 1
|
---|
109 | .pVMRC resq 1
|
---|
110 | %ifdef IN_RING0
|
---|
111 | .hSelfUnsafe resd 1
|
---|
112 | .cCpusUnsafe resd 1
|
---|
113 | %else
|
---|
114 | .hSelf resd 1
|
---|
115 | .cCpus resd 1
|
---|
116 | %endif
|
---|
117 | .uCpuExecutionCap resd 1
|
---|
118 | .cbSelf resd 1
|
---|
119 | .cbVCpu resd 1
|
---|
120 | .uStructVersion resd 1
|
---|
121 | .bMainExecutionEngine resb 1
|
---|
122 | .fHMEnabled resb 1
|
---|
123 | .fUseLargePages resb 1
|
---|
124 |
|
---|
125 | .uPadding1 resb 5
|
---|
126 |
|
---|
127 | .hTraceBufR3 RTR3PTR_RES 1
|
---|
128 | .hTraceBufR0 RTR0PTR_RES 1
|
---|
129 |
|
---|
130 | alignb 64
|
---|
131 | .cpum resb 1536
|
---|
132 | alignb 64
|
---|
133 | .vmm resb 1600
|
---|
134 | alignb 64
|
---|
135 | .pgm resb 21120
|
---|
136 | alignb 64
|
---|
137 | .hm resb 5504
|
---|
138 | alignb 64
|
---|
139 | .trpm resb 2048
|
---|
140 | alignb 64
|
---|
141 | .selm resb 768
|
---|
142 | alignb 64
|
---|
143 | .mm resb 192
|
---|
144 | alignb 64
|
---|
145 | .pdm resb 8256
|
---|
146 | alignb 64
|
---|
147 | .iom resb 1152
|
---|
148 | alignb 64
|
---|
149 | .em resb 256
|
---|
150 | alignb 64
|
---|
151 | .nem resb 128
|
---|
152 | alignb 64
|
---|
153 | .tm resb 10112
|
---|
154 | alignb 64
|
---|
155 | .dbgf resb 2432
|
---|
156 | alignb 64
|
---|
157 | .ssm resb 128
|
---|
158 | alignb 64
|
---|
159 | .gim resb 448
|
---|
160 | alignb 64
|
---|
161 | .apic resb 128
|
---|
162 | alignb 64
|
---|
163 | .vm resb 32
|
---|
164 | .cfgm resb 8
|
---|
165 | .R0Stats resb 64
|
---|
166 |
|
---|
167 | times ((($ + VMM_MAX_CPU_COUNT * RTR0PTR_CB + 4095) & ~4095) - ($ + VMM_MAX_CPU_COUNT * RTR0PTR_CB)) resb 1
|
---|
168 | .apCpusR3 RTR3PTR_RES VMM_MAX_CPU_COUNT
|
---|
169 | alignb 4096
|
---|
170 |
|
---|
171 | endstruc
|
---|
172 |
|
---|
173 |
|
---|
174 | %endif
|
---|
175 |
|
---|