VirtualBox

source: vbox/trunk/include/VBox/vmm/cpumctx-v1_6.h@ 72327

Last change on this file since 72327 was 69107, checked in by vboxsync, 7 years ago

include/VBox/: (C) year

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
  • Property svn:mergeinfo set to (toggle deleted branches)
    /branches/VBox-3.0/include/VBox/vmm/cpumctx.h58652,​70973
    /branches/VBox-3.2/include/VBox/vmm/cpumctx.h66309,​66318
    /branches/VBox-4.0/include/VBox/vmm/cpumctx.h70873
    /branches/VBox-4.1/include/VBox/vmm/cpumctx.h74233
    /branches/VBox-4.2/include/VBox/vmm/cpumctx-v1_6.h91503-91504,​91506-91508,​91510,​91514-91515,​91521
    /branches/VBox-4.3/include/VBox/vmm/cpumctx-v1_6.h91223
    /branches/VBox-4.3/trunk/include/VBox/vmm/cpumctx-v1_6.h91223
    /branches/dsen/gui/include/VBox/vmm/cpumctx-v1_6.h79076-79078,​79089,​79109-79110,​79112-79113,​79127-79130,​79134,​79141,​79151,​79155,​79157-79159,​79193,​79197
    /branches/dsen/gui2/include/VBox/vmm/cpumctx-v1_6.h79224,​79228,​79233,​79235,​79258,​79262-79263,​79273,​79341,​79345,​79354,​79357,​79387-79388,​79559-79569,​79572-79573,​79578,​79581-79582,​79590-79591,​79598-79599,​79602-79603,​79605-79606,​79632,​79635,​79637,​79644
    /branches/dsen/gui3/include/VBox/vmm/cpumctx-v1_6.h79645-79692
File size: 6.3 KB
Line 
1/** @file
2 * CPUM - CPU Monitor(/ Manager), Context Structures from v1.6 (saved state).
3 */
4
5/*
6 * Copyright (C) 2006-2017 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_cpumctx_v1_6_h
27#define ___VBox_vmm_cpumctx_v1_6_h
28
29#include <iprt/x86.h>
30#include <VBox/vmm/cpumctx.h>
31
32
33RT_C_DECLS_BEGIN
34
35/** @defgroup grp_cpum_ctx_v1_6 The CPUM Context Structures from v1.6
36 * @ingroup grp_cpum
37 * @{
38 */
39
40#pragma pack(1)
41/** IDTR from version 1.6 */
42typedef struct VBOXIDTR_VER1_6
43{
44 /** Size of the IDT. */
45 uint16_t cbIdt;
46 /** Address of the IDT. */
47 uint32_t pIdt;
48} VBOXIDTR_VER1_6;
49#pragma pack()
50
51#pragma pack(1)
52/** GDTR from version 1.6 */
53typedef struct VBOXGDTR_VER1_6
54{
55 /** Size of the GDT. */
56 uint16_t cbGdt;
57 /** Address of the GDT. */
58 uint32_t pGdt;
59} VBOXGDTR_VER1_6;
60#pragma pack()
61
62
63/**
64 * Selector hidden registers, for version 1.6 saved state.
65 */
66typedef struct CPUMSELREGHID_VER1_6
67{
68 /** Base register. */
69 uint32_t u32Base;
70 /** Limit (expanded). */
71 uint32_t u32Limit;
72 /** Flags.
73 * This is the high 32-bit word of the descriptor entry.
74 * Only the flags, dpl and type are used. */
75 X86DESCATTR Attr;
76} CPUMSELREGHID_VER1_6;
77
78/**
79 * CPU context, for version 1.6 saved state.
80 * @remarks PATM uses this, which is why it has to be here.
81 */
82# pragma pack(1)
83typedef struct CPUMCTX_VER1_6
84{
85 /** FPU state. (16-byte alignment)
86 * @todo This doesn't have to be in X86FXSTATE on CPUs without fxsr - we need a type for the
87 * actual format or convert it (waste of time). */
88 X86FXSTATE fpu;
89
90 /** CPUMCTXCORE Part.
91 * @{ */
92 union
93 {
94 uint32_t edi;
95 uint64_t rdi;
96 } CPUM_UNION_NM(rdi);
97 union
98 {
99 uint32_t esi;
100 uint64_t rsi;
101 } CPUM_UNION_NM(rsi);
102 union
103 {
104 uint32_t ebp;
105 uint64_t rbp;
106 } CPUM_UNION_NM(rbp);
107 union
108 {
109 uint32_t eax;
110 uint64_t rax;
111 } CPUM_UNION_NM(rax);
112 union
113 {
114 uint32_t ebx;
115 uint64_t rbx;
116 } CPUM_UNION_NM(rbx);
117 union
118 {
119 uint32_t edx;
120 uint64_t rdx;
121 } CPUM_UNION_NM(rdx);
122 union
123 {
124 uint32_t ecx;
125 uint64_t rcx;
126 } CPUM_UNION_NM(rcx);
127 /** @note We rely on the exact layout, because we use lss esp, [] in the
128 * switcher. */
129 uint32_t esp;
130 RTSEL ss;
131 RTSEL ssPadding;
132 /* Note: no overlap with esp here. */
133 uint64_t rsp_notused;
134
135 RTSEL gs;
136 RTSEL gsPadding;
137 RTSEL fs;
138 RTSEL fsPadding;
139 RTSEL es;
140 RTSEL esPadding;
141 RTSEL ds;
142 RTSEL dsPadding;
143 RTSEL cs;
144 RTSEL csPadding[3]; /**< 3 words to force 8 byte alignment for the remainder. */
145
146 union
147 {
148 X86EFLAGS eflags;
149 X86RFLAGS rflags;
150 } CPUM_UNION_NM(rflags);
151 union
152 {
153 uint32_t eip;
154 uint64_t rip;
155 } CPUM_UNION_NM(rip);
156
157 uint64_t r8;
158 uint64_t r9;
159 uint64_t r10;
160 uint64_t r11;
161 uint64_t r12;
162 uint64_t r13;
163 uint64_t r14;
164 uint64_t r15;
165
166 /** Hidden selector registers.
167 * @{ */
168 CPUMSELREGHID_VER1_6 esHid;
169 CPUMSELREGHID_VER1_6 csHid;
170 CPUMSELREGHID_VER1_6 ssHid;
171 CPUMSELREGHID_VER1_6 dsHid;
172 CPUMSELREGHID_VER1_6 fsHid;
173 CPUMSELREGHID_VER1_6 gsHid;
174 /** @} */
175
176 /** @} */
177
178 /** Control registers.
179 * @{ */
180 uint64_t cr0;
181 uint64_t cr2;
182 uint64_t cr3;
183 uint64_t cr4;
184 uint64_t cr8;
185 /** @} */
186
187 /** Debug registers.
188 * @{ */
189 uint64_t dr0;
190 uint64_t dr1;
191 uint64_t dr2;
192 uint64_t dr3;
193 uint64_t dr4; /**< @todo remove dr4 and dr5. */
194 uint64_t dr5;
195 uint64_t dr6;
196 uint64_t dr7;
197 /* DR8-15 are currently not supported */
198 /** @} */
199
200 /** Global Descriptor Table register. */
201 VBOXGDTR_VER1_6 gdtr;
202 uint16_t gdtrPadding;
203 uint32_t gdtrPadding64;/** @todo fix this hack */
204 /** Interrupt Descriptor Table register. */
205 VBOXIDTR_VER1_6 idtr;
206 uint16_t idtrPadding;
207 uint32_t idtrPadding64;/** @todo fix this hack */
208 /** The task register.
209 * Only the guest context uses all the members. */
210 RTSEL ldtr;
211 RTSEL ldtrPadding;
212 /** The task register.
213 * Only the guest context uses all the members. */
214 RTSEL tr;
215 RTSEL trPadding;
216
217 /** The sysenter msr registers.
218 * This member is not used by the hypervisor context. */
219 CPUMSYSENTER SysEnter;
220
221 /** System MSRs.
222 * @{ */
223 uint64_t msrEFER;
224 uint64_t msrSTAR;
225 uint64_t msrPAT;
226 uint64_t msrLSTAR;
227 uint64_t msrCSTAR;
228 uint64_t msrSFMASK;
229 uint64_t msrFSBASE;
230 uint64_t msrGSBASE;
231 uint64_t msrKERNELGSBASE;
232 /** @} */
233
234 /** Hidden selector registers.
235 * @{ */
236 CPUMSELREGHID_VER1_6 ldtrHid;
237 CPUMSELREGHID_VER1_6 trHid;
238 /** @} */
239
240 /** padding to get 32byte aligned size. */
241 uint32_t padding[2];
242} CPUMCTX_VER1_6;
243# pragma pack()
244
245/** @} */
246
247RT_C_DECLS_END
248
249#endif
250
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