VirtualBox

source: vbox/trunk/include/VBox/vmm/cpum.mac@ 55004

Last change on this file since 55004 was 55004, checked in by vboxsync, 10 years ago

backed out r99268 as it causes serious regressions on Windows hosts

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.7 KB
Line 
1;; @file
2; CPUM - CPU Monitor, Assembly header file.
3;
4
5;
6; Copyright (C) 2006-2015 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_cpum_mac__
27%define ___VBox_vmm_cpum_mac__
28
29%include "iprt/asmdefs.mac"
30
31;;
32; CPUID leaf.
33; @remarks This structure is used by the patch manager and can only be extended
34; by adding to the end of it.
35struc CPUMCPUIDLEAF
36 .uLeaf resd 1
37 .uSubLeaf resd 1
38 .fSubLeafMask resd 1
39 .uEax resd 1
40 .uEbx resd 1
41 .uEcx resd 1
42 .uEdx resd 1
43 .fFlags resd 1
44endstruc
45%define CPUMCPUIDLEAF_F_INTEL_TOPOLOGY_SUBLEAVES RT_BIT_32(0)
46
47;;
48; For the default CPUID leaf value.
49; @remarks This is used by the patch manager and cannot be modified in any way.
50struc CPUMCPUID
51 .uEax resd 1
52 .uEbx resd 1
53 .uEcx resd 1
54 .uEdx resd 1
55endstruc
56
57
58;; @name Method used to deal with unknown CPUID leaves.
59;; @{
60%define CPUMUNKNOWNCPUID_DEFAULTS 1
61%define CPUMUNKNOWNCPUID_LAST_STD_LEAF 2
62%define CPUMUNKNOWNCPUID_LAST_STD_LEAF_WITH_ECX 3
63%define CPUMUNKNOWNCPUID_PASSTHRU 4
64;; @}
65
66
67;;
68; Registers frame.
69; This is used internally in TRPM, VMMSwitcher_GuestToHost_GuestCtx
70; and other places.
71struc CPUMCTXCORE
72 .eax resq 1
73 .ecx resq 1
74 .edx resq 1
75 .ebx resq 1
76 .esp resq 1
77 .ebp resq 1
78 .esi resq 1
79 .edi resq 1
80 .r8 resq 1
81 .r9 resq 1
82 .r10 resq 1
83 .r11 resq 1
84 .r12 resq 1
85 .r13 resq 1
86 .r14 resq 1
87 .r15 resq 1
88 .es.Sel resw 1
89 .es.PaddingSel resw 1
90 .es.ValidSel resw 1
91 .es.fFlags resw 1
92 .es.u64Base resq 1
93 .es.u32Limit resd 1
94 .es.Attr resd 1
95 .cs.Sel resw 1
96 .cs.PaddingSel resw 1
97 .cs.ValidSel resw 1
98 .cs.fFlags resw 1
99 .cs.u64Base resq 1
100 .cs.u32Limit resd 1
101 .cs.Attr resd 1
102 .ss.Sel resw 1
103 .ss.PaddingSel resw 1
104 .ss.ValidSel resw 1
105 .ss.fFlags resw 1
106 .ss.u64Base resq 1
107 .ss.u32Limit resd 1
108 .ss.Attr resd 1
109 .ds.Sel resw 1
110 .ds.PaddingSel resw 1
111 .ds.ValidSel resw 1
112 .ds.fFlags resw 1
113 .ds.u64Base resq 1
114 .ds.u32Limit resd 1
115 .ds.Attr resd 1
116 .fs.Sel resw 1
117 .fs.PaddingSel resw 1
118 .fs.ValidSel resw 1
119 .fs.fFlags resw 1
120 .fs.u64Base resq 1
121 .fs.u32Limit resd 1
122 .fs.Attr resd 1
123 .gs.Sel resw 1
124 .gs.PaddingSel resw 1
125 .gs.ValidSel resw 1
126 .gs.fFlags resw 1
127 .gs.u64Base resq 1
128 .gs.u32Limit resd 1
129 .gs.Attr resd 1
130 .eip resq 1
131 .eflags resq 1
132endstruc
133
134
135%define XSTATE_SIZE 8192
136
137struc CPUMCTX
138 .XState resb XSTATE_SIZE
139 .eax resq 1
140 .ecx resq 1
141 .edx resq 1
142 .ebx resq 1
143 .esp resq 1
144 .ebp resq 1
145 .esi resq 1
146 .edi resq 1
147 .r8 resq 1
148 .r9 resq 1
149 .r10 resq 1
150 .r11 resq 1
151 .r12 resq 1
152 .r13 resq 1
153 .r14 resq 1
154 .r15 resq 1
155 .es.Sel resw 1
156 .es.PaddingSel resw 1
157 .es.ValidSel resw 1
158 .es.fFlags resw 1
159 .es.u64Base resq 1
160 .es.u32Limit resd 1
161 .es.Attr resd 1
162 .cs.Sel resw 1
163 .cs.PaddingSel resw 1
164 .cs.ValidSel resw 1
165 .cs.fFlags resw 1
166 .cs.u64Base resq 1
167 .cs.u32Limit resd 1
168 .cs.Attr resd 1
169 .ss.Sel resw 1
170 .ss.PaddingSel resw 1
171 .ss.ValidSel resw 1
172 .ss.fFlags resw 1
173 .ss.u64Base resq 1
174 .ss.u32Limit resd 1
175 .ss.Attr resd 1
176 .ds.Sel resw 1
177 .ds.PaddingSel resw 1
178 .ds.ValidSel resw 1
179 .ds.fFlags resw 1
180 .ds.u64Base resq 1
181 .ds.u32Limit resd 1
182 .ds.Attr resd 1
183 .fs.Sel resw 1
184 .fs.PaddingSel resw 1
185 .fs.ValidSel resw 1
186 .fs.fFlags resw 1
187 .fs.u64Base resq 1
188 .fs.u32Limit resd 1
189 .fs.Attr resd 1
190 .gs.Sel resw 1
191 .gs.PaddingSel resw 1
192 .gs.ValidSel resw 1
193 .gs.fFlags resw 1
194 .gs.u64Base resq 1
195 .gs.u32Limit resd 1
196 .gs.Attr resd 1
197 .eip resq 1
198 .eflags resq 1
199 .cr0 resq 1
200 .cr2 resq 1
201 .cr3 resq 1
202 .cr4 resq 1
203 .dr resq 8
204 .gdtrPadding resw 3
205 .gdtr resw 0
206 .gdtr.cbGdt resw 1
207 .gdtr.pGdt resq 1
208 .idtrPadding resw 3
209 .idtr resw 0
210 .idtr.cbIdt resw 1
211 .idtr.pIdt resq 1
212 .ldtr.Sel resw 1
213 .ldtr.PaddingSel resw 1
214 .ldtr.ValidSel resw 1
215 .ldtr.fFlags resw 1
216 .ldtr.u64Base resq 1
217 .ldtr.u32Limit resd 1
218 .ldtr.Attr resd 1
219 .tr.Sel resw 1
220 .tr.PaddingSel resw 1
221 .tr.ValidSel resw 1
222 .tr.fFlags resw 1
223 .tr.u64Base resq 1
224 .tr.u32Limit resd 1
225 .tr.Attr resd 1
226 .SysEnter.cs resb 8
227 .SysEnter.eip resb 8
228 .SysEnter.esp resb 8
229 .msrEFER resb 8
230 .msrSTAR resb 8
231 .msrPAT resb 8
232 .msrLSTAR resb 8
233 .msrCSTAR resb 8
234 .msrSFMASK resb 8
235 .msrKERNELGSBASE resb 8
236 .msrApicBase resb 8
237 .au32SizePadding resb 24
238endstruc
239
240
241;;
242; Guest MSR state.
243struc CPUMCTXMSRS
244 .au64 resq 64
245endstruc
246
247
248%endif
249
Note: See TracBrowser for help on using the repository browser.

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