1 | ;$Id: HMInternal.mac 87330 2021-01-20 19:02:24Z vboxsync $
|
---|
2 | ;; @file
|
---|
3 | ; HM - Internal header file.
|
---|
4 | ;
|
---|
5 |
|
---|
6 | ;
|
---|
7 | ; Copyright (C) 2006-2020 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 |
|
---|
18 | %ifndef VMX_VMCS_GUEST_FIELD_ES
|
---|
19 | %include "VBox/vmm/hm_vmx.mac" ; For VMXRESTOREHOST
|
---|
20 | %endif
|
---|
21 |
|
---|
22 |
|
---|
23 | struc VMXVMCSINFO
|
---|
24 | .pfnStartVM RTR0PTR_RES 1
|
---|
25 | .HCPhysEPTP RTHCPHYS_RES 1
|
---|
26 | .fVmcsState resd 1
|
---|
27 | .fShadowVmcsState resd 1
|
---|
28 | .idHostCpuState resd 1
|
---|
29 | .idHostCpuExec resd 1
|
---|
30 | .cEntryMsrLoad resd 1
|
---|
31 | .cExitMsrStore resd 1
|
---|
32 | .cExitMsrLoad resd 1
|
---|
33 |
|
---|
34 | .u32PinCtls resd 1
|
---|
35 | .u32ProcCtls resd 1
|
---|
36 | .u32ProcCtls2 resd 1
|
---|
37 | .u32EntryCtls resd 1
|
---|
38 | .u32ExitCtls resd 1
|
---|
39 | .u32XcptBitmap resd 1
|
---|
40 | .u32XcptPFMask resd 1
|
---|
41 | .u32XcptPFMatch resd 1
|
---|
42 |
|
---|
43 | alignb 8
|
---|
44 | .u64TscOffset resq 1
|
---|
45 | .u64VmcsLinkPtr resq 1
|
---|
46 | .u64Cr0Mask resq 1
|
---|
47 | .u64Cr4Mask resq 1
|
---|
48 |
|
---|
49 | .pvVmcs RTR0PTR_RES 1
|
---|
50 | .pvShadowVmcs RTR0PTR_RES 1
|
---|
51 | .pbVirtApic RTR0PTR_RES 1
|
---|
52 | .pvMsrBitmap RTR0PTR_RES 1
|
---|
53 | .pvGuestMsrLoad RTR0PTR_RES 1
|
---|
54 | .pvGuestMsrStore RTR0PTR_RES 1
|
---|
55 | .pvHostMsrLoad RTR0PTR_RES 1
|
---|
56 |
|
---|
57 | .fWasInRealMode resb 1
|
---|
58 | .fSwitchedTo64on32Obsolete resb 1
|
---|
59 | alignb 8
|
---|
60 | .RealMode.AttrCS resd 1
|
---|
61 | .RealMode.AttrDS resd 1
|
---|
62 | .RealMode.AttrES resd 1
|
---|
63 | .RealMode.AttrFS resd 1
|
---|
64 | .RealMode.AttrGS resd 1
|
---|
65 | .RealMode.AttrSS resd 1
|
---|
66 | .RealMode.Eflags resd 1 ; should be EFlags?
|
---|
67 | .RealMode.fRealOnV86Active resb 1
|
---|
68 |
|
---|
69 | alignb 8
|
---|
70 | .HCPhysVmcs RTHCPHYS_RES 1
|
---|
71 | .HCPhysShadowVmcs RTHCPHYS_RES 1
|
---|
72 | .HCPhysVirtApic RTHCPHYS_RES 1
|
---|
73 | .HCPhysMsrBitmap RTHCPHYS_RES 1
|
---|
74 | .HCPhysGuestMsrLoad RTHCPHYS_RES 1
|
---|
75 | .HCPhysGuestMsrStore RTHCPHYS_RES 1
|
---|
76 | .HCPhysHostMsrLoad RTHCPHYS_RES 1
|
---|
77 |
|
---|
78 | .hMemObj RTR0PTR_RES 1
|
---|
79 |
|
---|
80 | alignb 8
|
---|
81 | .au64LbrFromIpMsr resq 32
|
---|
82 | .au64LbrToIpMsr resq 32
|
---|
83 | .u64LbrTosMsr resq 1
|
---|
84 | endstruc
|
---|
85 |
|
---|
86 | struc HMCPUVMX
|
---|
87 | .VmcsInfo resb VMXVMCSINFO_size
|
---|
88 | .VmcsInfoNstGst resb VMXVMCSINFO_size
|
---|
89 | .fSwitchedToNstGstVmcs resb 1
|
---|
90 | .fMergedNstGstCtls resb 1
|
---|
91 | .fCopiedNstGstToShadowVmcs resb 1
|
---|
92 | .fSwitchedNstGstFlushTlb resb 1
|
---|
93 |
|
---|
94 | alignb 8
|
---|
95 | .u64GstMsrApicBase resq 1
|
---|
96 |
|
---|
97 | .u64HostMsrLStar resq 1
|
---|
98 | .u64HostMsrStar resq 1
|
---|
99 | .u64HostMsrSfMask resq 1
|
---|
100 | .u64HostMsrKernelGsBase resq 1
|
---|
101 | .fLazyMsrs resd 1
|
---|
102 | .fUpdatedHostAutoMsrs resb 1
|
---|
103 | alignb 4
|
---|
104 | .fRestoreHostFlags resd 1
|
---|
105 | alignb 8
|
---|
106 | .RestoreHost resb VMXRESTOREHOST_size
|
---|
107 |
|
---|
108 | .LastError.idCurrentCpu resd 1
|
---|
109 | .LastError.idEnteredCpu resd 1
|
---|
110 | .LastError.HCPhysCurrentVmcs resq 1
|
---|
111 | .LastError.u32VmcsRev resd 1
|
---|
112 | .LastError.u32InstrError resd 1
|
---|
113 | .LastError.u32ExitReason resd 1
|
---|
114 | .LastError.u32GuestIntrState resd 1
|
---|
115 | endstruc
|
---|
116 |
|
---|
117 | struc HMCPUSVM
|
---|
118 | .pfnVMRun RTR0PTR_RES 1
|
---|
119 | .HCPhysVmcbHost RTHCPHYS_RES 1
|
---|
120 |
|
---|
121 | .hMemObjVmcbHost RTR0PTR_RES 1
|
---|
122 | .pvPadding RTR0PTR_RES 1 ; pointless padding
|
---|
123 |
|
---|
124 | .HCPhysVmcb RTHCPHYS_RES 1
|
---|
125 | .hMemObjVmcb RTR0PTR_RES 1
|
---|
126 | .pVmcb RTR0PTR_RES 1
|
---|
127 |
|
---|
128 | .HCPhysMsrBitmap RTHCPHYS_RES 1
|
---|
129 | .hMemObjMsrBitmap RTR0PTR_RES 1
|
---|
130 | .pvMsrBitmap RTR0PTR_RES 1
|
---|
131 |
|
---|
132 | .fSyncVTpr resb 1
|
---|
133 | .fEmulateLongModeSysEnterExit resb 1
|
---|
134 |
|
---|
135 | alignb 8
|
---|
136 | .u64HostTscAux resq 1
|
---|
137 |
|
---|
138 | .NstGstVmcbCache resb 40
|
---|
139 | endstruc
|
---|
140 |
|
---|
141 | struc HMCPU
|
---|
142 | .fCheckedTLBFlush resb 1
|
---|
143 | .fActive resb 1
|
---|
144 | .fLeaveDone resb 1
|
---|
145 | .fUsingHyperDR7 resb 1
|
---|
146 | .fForceTLBFlush resb 1
|
---|
147 | .fUseDebugLoop resb 1
|
---|
148 | .fUsingDebugLoop resb 1
|
---|
149 | .fDebugWantRdTscExit resb 1
|
---|
150 |
|
---|
151 | .fLoadSaveGuestXcr0 resb 1
|
---|
152 | .fGIMTrapXcptUD resb 1
|
---|
153 | .fTrapXcptGpForLovelyMesaDrv resb 1
|
---|
154 | .fSingleInstruction resb 1
|
---|
155 | .fClearTrapFlag resb 1
|
---|
156 | alignb 8
|
---|
157 |
|
---|
158 | .cWorldSwitchExits resd 1
|
---|
159 | .idLastCpu resd 1
|
---|
160 | .cTlbFlushes resd 1
|
---|
161 | .uCurrentAsid resd 1
|
---|
162 | .u32HMError resd 1
|
---|
163 | .rcLastExitToR3 resd 1
|
---|
164 | alignb 8
|
---|
165 | .fCtxChanged resq 1
|
---|
166 |
|
---|
167 | alignb 8
|
---|
168 | %if HMCPUVMX_size > HMCPUSVM_size
|
---|
169 | .u resb HMCPUVMX_size
|
---|
170 | %else
|
---|
171 | .u resb HMCPUSVM_size
|
---|
172 | %endif
|
---|
173 |
|
---|
174 | .Event.fPending resd 1
|
---|
175 | .Event.u32ErrCode resd 1
|
---|
176 | .Event.cbInstr resd 1
|
---|
177 | alignb 8
|
---|
178 | .Event.u64IntInfo resq 1
|
---|
179 | .Event.GCPtrFaultAddress RTGCPTR_RES 1
|
---|
180 |
|
---|
181 | .idEnteredCpu resd 1
|
---|
182 | .enmShadowMode resd 1
|
---|
183 | alignb 8
|
---|
184 | .aPdpes resq 4
|
---|
185 |
|
---|
186 | ; The remainer is disassembly state and statistics.
|
---|
187 | endstruc
|
---|
188 |
|
---|