VirtualBox

source: vbox/trunk/src/VBox/VMM/include/HMInternal.mac@ 87469

Last change on this file since 87469 was 87469, checked in by vboxsync, 4 years ago

VMM/HMVMX: Moving more stuff to HMR0PERVCPU. bugref:9217

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 8.4 KB
Line 
1;$Id: HMInternal.mac 87469 2021-01-28 17:01:06Z 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
23struc VMXVMCSINFO
24 .HCPhysEPTP RTHCPHYS_RES 1
25 .fVmcsState resd 1
26 .fShadowVmcsState resd 1
27 .idHostCpuState resd 1
28 .idHostCpuExec resd 1
29 .cEntryMsrLoad resd 1
30 .cExitMsrStore resd 1
31 .cExitMsrLoad resd 1
32
33 .u32PinCtls resd 1
34 .u32ProcCtls resd 1
35 .u32ProcCtls2 resd 1
36 .u32EntryCtls resd 1
37 .u32ExitCtls resd 1
38 .u32XcptBitmap resd 1
39 .u32XcptPFMask resd 1
40 .u32XcptPFMatch resd 1
41
42 alignb 8
43 .u64TscOffset resq 1
44 .u64VmcsLinkPtr resq 1
45 .u64Cr0Mask resq 1
46 .u64Cr4Mask resq 1
47
48 .pvVmcs RTR0PTR_RES 1
49 .pvShadowVmcs RTR0PTR_RES 1
50 .pbVirtApic RTR0PTR_RES 1
51 .pvMsrBitmap RTR0PTR_RES 1
52 .pvGuestMsrLoad RTR0PTR_RES 1
53 .pvGuestMsrStore RTR0PTR_RES 1
54 .pvHostMsrLoad RTR0PTR_RES 1
55
56 .fWasInRealMode resb 1
57 .fSwitchedTo64on32Obsolete resb 1
58 alignb 8
59 .RealMode.AttrCS resd 1
60 .RealMode.AttrDS resd 1
61 .RealMode.AttrES resd 1
62 .RealMode.AttrFS resd 1
63 .RealMode.AttrGS resd 1
64 .RealMode.AttrSS resd 1
65 .RealMode.Eflags resd 1 ; should be EFlags?
66 .RealMode.fRealOnV86Active resb 1
67
68 alignb 8
69 .HCPhysVmcs RTHCPHYS_RES 1
70 .HCPhysShadowVmcs RTHCPHYS_RES 1
71 .HCPhysVirtApic RTHCPHYS_RES 1
72 .HCPhysMsrBitmap RTHCPHYS_RES 1
73 .HCPhysGuestMsrLoad RTHCPHYS_RES 1
74 .HCPhysGuestMsrStore RTHCPHYS_RES 1
75 .HCPhysHostMsrLoad RTHCPHYS_RES 1
76
77 .hMemObj RTR0PTR_RES 1
78
79 alignb 8
80 .au64LbrFromIpMsr resq 32
81 .au64LbrToIpMsr resq 32
82 .u64LbrTosMsr resq 1
83endstruc
84
85%define VMX_RESTORE_HOST_SEL_DS 0001h ;RT_BIT(0)
86%define VMX_RESTORE_HOST_SEL_ES 0002h ;RT_BIT(1)
87%define VMX_RESTORE_HOST_SEL_FS 0004h ;RT_BIT(2)
88%define VMX_RESTORE_HOST_SEL_GS 0008h ;RT_BIT(3)
89%define VMX_RESTORE_HOST_SEL_TR 0010h ;RT_BIT(4)
90%define VMX_RESTORE_HOST_GDTR 0020h ;RT_BIT(5)
91%define VMX_RESTORE_HOST_IDTR 0040h ;RT_BIT(6)
92%define VMX_RESTORE_HOST_GDT_READ_ONLY 0080h ;RT_BIT(7)
93%define VMX_RESTORE_HOST_GDT_NEED_WRITABLE 0100h ;RT_BIT(8)
94%define VMX_RESTORE_HOST_CAN_USE_WRFSBASE_AND_WRGSBASE 0200h ;RT_BIT(9)
95%define VMX_RESTORE_HOST_REQUIRED 0400h ;RT_BIT(10) - must be the highest bit!
96struc VMXRESTOREHOST
97 .uHostSelDS resw 1
98 .uHostSelES resw 1
99 .uHostSelFS resw 1
100 .HostGdtr resb 10
101 .uHostSelGS resw 1
102 .uHostSelTR resw 1
103 .uHostSelSS resw 1
104 .HostGdtrRw resb 10
105 .uHostSelCS resw 1
106 .abPadding1 resb 4
107 .HostIdtr resb 10
108 alignb 8
109 .uHostFSBase resq 1
110 .uHostGSBase resq 1
111endstruc
112
113struc HMCPUVMX
114 .VmcsInfo resb VMXVMCSINFO_size
115 .VmcsInfoNstGst resb VMXVMCSINFO_size
116 .fSwitchedToNstGstVmcs resb 1
117 .fMergedNstGstCtls resb 1
118 .fCopiedNstGstToShadowVmcs resb 1
119 .fSwitchedNstGstFlushTlb resb 1
120
121 alignb 8
122 .u64GstMsrApicBase resq 1
123
124 .LastError.idCurrentCpu resd 1
125 .LastError.idEnteredCpu resd 1
126 .LastError.HCPhysCurrentVmcs resq 1
127 .LastError.u32VmcsRev resd 1
128 .LastError.u32InstrError resd 1
129 .LastError.u32ExitReason resd 1
130 .LastError.u32GuestIntrState resd 1
131endstruc
132
133struc HMCPUSVM
134 .HCPhysVmcbHost RTHCPHYS_RES 1
135
136 .hMemObjVmcbHost RTR0PTR_RES 1
137 .pvPadding RTR0PTR_RES 1 ; pointless padding
138
139 .HCPhysVmcb RTHCPHYS_RES 1
140 .hMemObjVmcb RTR0PTR_RES 1
141 .pVmcb RTR0PTR_RES 1
142
143 .HCPhysMsrBitmap RTHCPHYS_RES 1
144 .hMemObjMsrBitmap RTR0PTR_RES 1
145 .pvMsrBitmap RTR0PTR_RES 1
146
147 .fSyncVTpr resb 1
148 .fEmulateLongModeSysEnterExit resb 1
149
150 alignb 8
151 .u64HostTscAux resq 1
152
153 .NstGstVmcbCache resb 40
154endstruc
155
156struc HMCPU
157 .fCheckedTLBFlush resb 1
158 .fActive resb 1
159 .fLeaveDone resb 1
160 .fUsingHyperDR7 resb 1
161 .fForceTLBFlush resb 1
162 .fUseDebugLoop resb 1
163 .fUsingDebugLoop resb 1
164 .fDebugWantRdTscExit resb 1
165
166 .fLoadSaveGuestXcr0 resb 1
167 .fGIMTrapXcptUD resb 1
168 .fTrapXcptGpForLovelyMesaDrv resb 1
169 .fSingleInstruction resb 1
170 .fClearTrapFlag resb 1
171 alignb 8
172
173 .cWorldSwitchExits resd 1
174 .idLastCpu resd 1
175 .cTlbFlushes resd 1
176 .uCurrentAsid resd 1
177 .u32HMError resd 1
178 .rcLastExitToR3 resd 1
179 alignb 8
180 .fCtxChanged resq 1
181
182 alignb 8
183;%if HMCPUVMX_size > HMCPUSVM_size
184 .u resb HMCPUVMX_size
185;%else
186; .u resb HMCPUSVM_size
187;%endif
188
189 .Event.fPending resd 1
190 .Event.u32ErrCode resd 1
191 .Event.cbInstr resd 1
192 alignb 8
193 .Event.u64IntInfo resq 1
194 .Event.GCPtrFaultAddress RTGCPTR_RES 1
195
196 .idEnteredCpu resd 1
197 .enmShadowMode resd 1
198 alignb 8
199 .aPdpes resq 4
200
201 ; The remainer is disassembly state and statistics.
202endstruc
203
204struc HMR0CPUVMX
205 .pfnStartVm RTR0PTR_RES 1
206
207 .u64HostMsrLStar resq 1
208 .u64HostMsrStar resq 1
209 .u64HostMsrSfMask resq 1
210 .u64HostMsrKernelGsBase resq 1
211 .fLazyMsrs resd 1
212 .fUpdatedHostAutoMsrs resb 1
213 alignb 4
214 .fRestoreHostFlags resd 1
215 alignb 8
216 .uHostRIP resq 1
217 .uHostRSP resq 1
218 .RestoreHost resb VMXRESTOREHOST_size
219endstruc
220
221struc HMR0CPUSVM
222 .pfnVMRun RTR0PTR_RES 1
223endstruc
224
225struc HMR0PERVCPU
226 alignb 8
227;%if HMR0CPUVMX_size > HMR0CPUSVM_size
228 .u resb HMR0CPUVMX_size
229;%else
230; .u resb HMR0CPUSVM_size
231;%endif
232endstruc
233
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette