VirtualBox

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

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

Moved the XState to the end of the CPUMCTX structure, reducing the size of the three VMM modules by ~8KB in a win.amd6/debug build.

  • 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 .eax resq 1
139 .ecx resq 1
140 .edx resq 1
141 .ebx resq 1
142 .esp resq 1
143 .ebp resq 1
144 .esi resq 1
145 .edi resq 1
146 .r8 resq 1
147 .r9 resq 1
148 .r10 resq 1
149 .r11 resq 1
150 .r12 resq 1
151 .r13 resq 1
152 .r14 resq 1
153 .r15 resq 1
154 .es.Sel resw 1
155 .es.PaddingSel resw 1
156 .es.ValidSel resw 1
157 .es.fFlags resw 1
158 .es.u64Base resq 1
159 .es.u32Limit resd 1
160 .es.Attr resd 1
161 .cs.Sel resw 1
162 .cs.PaddingSel resw 1
163 .cs.ValidSel resw 1
164 .cs.fFlags resw 1
165 .cs.u64Base resq 1
166 .cs.u32Limit resd 1
167 .cs.Attr resd 1
168 .ss.Sel resw 1
169 .ss.PaddingSel resw 1
170 .ss.ValidSel resw 1
171 .ss.fFlags resw 1
172 .ss.u64Base resq 1
173 .ss.u32Limit resd 1
174 .ss.Attr resd 1
175 .ds.Sel resw 1
176 .ds.PaddingSel resw 1
177 .ds.ValidSel resw 1
178 .ds.fFlags resw 1
179 .ds.u64Base resq 1
180 .ds.u32Limit resd 1
181 .ds.Attr resd 1
182 .fs.Sel resw 1
183 .fs.PaddingSel resw 1
184 .fs.ValidSel resw 1
185 .fs.fFlags resw 1
186 .fs.u64Base resq 1
187 .fs.u32Limit resd 1
188 .fs.Attr resd 1
189 .gs.Sel resw 1
190 .gs.PaddingSel resw 1
191 .gs.ValidSel resw 1
192 .gs.fFlags resw 1
193 .gs.u64Base resq 1
194 .gs.u32Limit resd 1
195 .gs.Attr resd 1
196 .eip resq 1
197 .eflags resq 1
198 .cr0 resq 1
199 .cr2 resq 1
200 .cr3 resq 1
201 .cr4 resq 1
202 .dr resq 8
203 .gdtrPadding resw 3
204 .gdtr resw 0
205 .gdtr.cbGdt resw 1
206 .gdtr.pGdt resq 1
207 .idtrPadding resw 3
208 .idtr resw 0
209 .idtr.cbIdt resw 1
210 .idtr.pIdt resq 1
211 .ldtr.Sel resw 1
212 .ldtr.PaddingSel resw 1
213 .ldtr.ValidSel resw 1
214 .ldtr.fFlags resw 1
215 .ldtr.u64Base resq 1
216 .ldtr.u32Limit resd 1
217 .ldtr.Attr resd 1
218 .tr.Sel resw 1
219 .tr.PaddingSel resw 1
220 .tr.ValidSel resw 1
221 .tr.fFlags resw 1
222 .tr.u64Base resq 1
223 .tr.u32Limit resd 1
224 .tr.Attr resd 1
225 .SysEnter.cs resb 8
226 .SysEnter.eip resb 8
227 .SysEnter.esp resb 8
228 .msrEFER resb 8
229 .msrSTAR resb 8
230 .msrPAT resb 8
231 .msrLSTAR resb 8
232 .msrCSTAR resb 8
233 .msrSFMASK resb 8
234 .msrKERNELGSBASE resb 8
235 .msrApicBase resb 8
236 .au32SizePadding resb 24
237 .XState resb XSTATE_SIZE
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