VirtualBox

source: vbox/trunk/src/VBox/VMM/include/CPUMInternal.h@ 54985

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

CPUMCTX,CPUMHOST: Replaced the fpu (X86FXSAVE) member with an XState (X86XSAVEAREA) member.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 20.9 KB
Line 
1/* $Id: CPUMInternal.h 54898 2015-03-22 23:47:07Z vboxsync $ */
2/** @file
3 * CPUM - Internal header file.
4 */
5
6/*
7 * Copyright (C) 2006-2015 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 ___CPUMInternal_h
19#define ___CPUMInternal_h
20
21#ifndef VBOX_FOR_DTRACE_LIB
22# include <VBox/cdefs.h>
23# include <VBox/types.h>
24# include <VBox/vmm/stam.h>
25# include <iprt/x86.h>
26#else
27# pragma D depends_on library x86.d
28# pragma D depends_on library cpumctx.d
29
30/* Some fudging. */
31typedef uint32_t CPUMMICROARCH;
32typedef uint32_t CPUMUNKNOWNCPUID;
33typedef struct CPUMCPUIDLEAF *PCPUMCPUIDLEAF;
34typedef struct CPUMMSRRANGE *PCPUMMSRRANGE;
35typedef uint64_t STAMCOUNTER;
36#endif
37
38
39
40
41/** @defgroup grp_cpum_int Internals
42 * @ingroup grp_cpum
43 * @internal
44 * @{
45 */
46
47/** Flags and types for CPUM fault handlers
48 * @{ */
49/** Type: Load DS */
50#define CPUM_HANDLER_DS 1
51/** Type: Load ES */
52#define CPUM_HANDLER_ES 2
53/** Type: Load FS */
54#define CPUM_HANDLER_FS 3
55/** Type: Load GS */
56#define CPUM_HANDLER_GS 4
57/** Type: IRET */
58#define CPUM_HANDLER_IRET 5
59/** Type mask. */
60#define CPUM_HANDLER_TYPEMASK 0xff
61/** If set EBP points to the CPUMCTXCORE that's being used. */
62#define CPUM_HANDLER_CTXCORE_IN_EBP RT_BIT(31)
63/** @} */
64
65
66/** Use flags (CPUM::fUseFlags).
67 * (Don't forget to sync this with CPUMInternal.mac !)
68 * @{ */
69/** Used the FPU, SSE or such stuff. */
70#define CPUM_USED_FPU RT_BIT(0)
71/** Used the FPU, SSE or such stuff since last we were in REM.
72 * REM syncing is clearing this, lazy FPU is setting it. */
73#define CPUM_USED_FPU_SINCE_REM RT_BIT(1)
74/** The XMM state was manually restored. (AMD only) */
75#define CPUM_USED_MANUAL_XMM_RESTORE RT_BIT(2)
76
77/** Host OS is using SYSENTER and we must NULL the CS. */
78#define CPUM_USE_SYSENTER RT_BIT(3)
79/** Host OS is using SYSENTER and we must NULL the CS. */
80#define CPUM_USE_SYSCALL RT_BIT(4)
81
82/** Debug registers are used by host and that DR7 and DR6 must be saved and
83 * disabled when switching to raw-mode. */
84#define CPUM_USE_DEBUG_REGS_HOST RT_BIT(5)
85/** Records that we've saved the host DRx registers.
86 * In ring-0 this means all (DR0-7), while in raw-mode context this means DR0-3
87 * since DR6 and DR7 are covered by CPUM_USE_DEBUG_REGS_HOST. */
88#define CPUM_USED_DEBUG_REGS_HOST RT_BIT(6)
89/** Set to indicate that we should save host DR0-7 and load the hypervisor debug
90 * registers in the raw-mode world switchers. (See CPUMRecalcHyperDRx.) */
91#define CPUM_USE_DEBUG_REGS_HYPER RT_BIT(7)
92/** Used in ring-0 to indicate that we have loaded the hypervisor debug
93 * registers. */
94#define CPUM_USED_DEBUG_REGS_HYPER RT_BIT(8)
95/** Used in ring-0 to indicate that we have loaded the guest debug
96 * registers (DR0-3 and maybe DR6) for direct use by the guest.
97 * DR7 (and AMD-V DR6) are handled via the VMCB. */
98#define CPUM_USED_DEBUG_REGS_GUEST RT_BIT(9)
99
100
101/** Sync the FPU state on next entry (32->64 switcher only). */
102#define CPUM_SYNC_FPU_STATE RT_BIT(16)
103/** Sync the debug state on next entry (32->64 switcher only). */
104#define CPUM_SYNC_DEBUG_REGS_GUEST RT_BIT(17)
105/** Sync the debug state on next entry (32->64 switcher only).
106 * Almost the same as CPUM_USE_DEBUG_REGS_HYPER in the raw-mode switchers. */
107#define CPUM_SYNC_DEBUG_REGS_HYPER RT_BIT(18)
108/** Host CPU requires fxsave/fxrstor leaky bit handling. */
109#define CPUM_USE_FFXSR_LEAKY RT_BIT(19)
110/** Set if the VM supports long-mode. */
111#define CPUM_USE_SUPPORTS_LONGMODE RT_BIT(20)
112/** @} */
113
114/* Sanity check. */
115#ifndef VBOX_FOR_DTRACE_LIB
116#if defined(VBOX_WITH_HYBRID_32BIT_KERNEL) && (HC_ARCH_BITS != 32 || R0_ARCH_BITS != 32)
117# error "VBOX_WITH_HYBRID_32BIT_KERNEL is only for 32 bit builds."
118#endif
119#endif
120
121
122/** @name CPUM Saved State Version.
123 * @{ */
124/** The current saved state version. */
125#define CPUM_SAVED_STATE_VERSION 16
126/** CPUID changes with explode forgetting to update the leaf count on
127 * restore, resulting in garbage being saved restoring+saving old states). */
128#define CPUM_SAVED_STATE_VERSION_BAD_CPUID_COUNT 15
129/** The saved state version before the CPUIDs changes. */
130#define CPUM_SAVED_STATE_VERSION_PUT_STRUCT 14
131/** The saved state version before using SSMR3PutStruct. */
132#define CPUM_SAVED_STATE_VERSION_MEM 13
133/** The saved state version before introducing the MSR size field. */
134#define CPUM_SAVED_STATE_VERSION_NO_MSR_SIZE 12
135/** The saved state version of 3.2, 3.1 and 3.3 trunk before the hidden
136 * selector register change (CPUM_CHANGED_HIDDEN_SEL_REGS_INVALID). */
137#define CPUM_SAVED_STATE_VERSION_VER3_2 11
138/** The saved state version of 3.0 and 3.1 trunk before the teleportation
139 * changes. */
140#define CPUM_SAVED_STATE_VERSION_VER3_0 10
141/** The saved state version for the 2.1 trunk before the MSR changes. */
142#define CPUM_SAVED_STATE_VERSION_VER2_1_NOMSR 9
143/** The saved state version of 2.0, used for backwards compatibility. */
144#define CPUM_SAVED_STATE_VERSION_VER2_0 8
145/** The saved state version of 1.6, used for backwards compatibility. */
146#define CPUM_SAVED_STATE_VERSION_VER1_6 6
147/** @} */
148
149
150
151/**
152 * CPU features and quirks.
153 * This is mostly exploded CPUID info.
154 */
155typedef struct CPUMFEATURES
156{
157 /** The CPU vendor (CPUMCPUVENDOR). */
158 uint8_t enmCpuVendor;
159 /** The CPU family. */
160 uint8_t uFamily;
161 /** The CPU model. */
162 uint8_t uModel;
163 /** The CPU stepping. */
164 uint8_t uStepping;
165 /** The microarchitecture. */
166#ifndef VBOX_FOR_DTRACE_LIB
167 CPUMMICROARCH enmMicroarch;
168#else
169 uint32_t enmMicroarch;
170#endif
171 /** The maximum physical address with of the CPU. */
172 uint8_t cMaxPhysAddrWidth;
173 /** Alignment padding. */
174 uint8_t abPadding[3];
175
176 /** Supports MSRs. */
177 uint32_t fMsr : 1;
178 /** Supports the page size extension (4/2 MB pages). */
179 uint32_t fPse : 1;
180 /** Supports 36-bit page size extension (4 MB pages can map memory above
181 * 4GB). */
182 uint32_t fPse36 : 1;
183 /** Supports physical address extension (PAE). */
184 uint32_t fPae : 1;
185 /** Page attribute table (PAT) support (page level cache control). */
186 uint32_t fPat : 1;
187 /** Supports the FXSAVE and FXRSTOR instructions. */
188 uint32_t fFxSaveRstor : 1;
189 /** Intel SYSENTER/SYSEXIT support */
190 uint32_t fSysEnter : 1;
191 /** First generation APIC. */
192 uint32_t fApic : 1;
193 /** Second generation APIC. */
194 uint32_t fX2Apic : 1;
195 /** Hypervisor present. */
196 uint32_t fHypervisorPresent : 1;
197 /** MWAIT & MONITOR instructions supported. */
198 uint32_t fMonitorMWait : 1;
199 /** MWAIT Extensions present. */
200 uint32_t fMWaitExtensions : 1;
201
202 /** AMD64: Supports long mode. */
203 uint32_t fLongMode : 1;
204 /** AMD64: SYSCALL/SYSRET support. */
205 uint32_t fSysCall : 1;
206 /** AMD64: No-execute page table bit. */
207 uint32_t fNoExecute : 1;
208 /** AMD64: Supports LAHF & SAHF instructions in 64-bit mode. */
209 uint32_t fLahfSahf : 1;
210 /** AMD64: Supports RDTSCP. */
211 uint32_t fRdTscP : 1;
212
213 /** Indicates that FPU instruction and data pointers may leak.
214 * This generally applies to recent AMD CPUs, where the FPU IP and DP pointer
215 * is only saved and restored if an exception is pending. */
216 uint32_t fLeakyFxSR : 1;
217
218 /** Alignment padding. */
219 uint32_t fPadding : 8;
220
221 uint64_t auPadding[2];
222} CPUMFEATURES;
223#ifndef VBOX_FOR_DTRACE_LIB
224AssertCompileSize(CPUMFEATURES, 32);
225#endif
226/** Pointer to a CPU feature structure. */
227typedef CPUMFEATURES *PCPUMFEATURES;
228/** Pointer to a const CPU feature structure. */
229typedef CPUMFEATURES const *PCCPUMFEATURES;
230
231
232/**
233 * CPU info
234 */
235typedef struct CPUMINFO
236{
237 /** The number of MSR ranges (CPUMMSRRANGE) in the array pointed to below. */
238 uint32_t cMsrRanges;
239 /** Mask applied to ECX before looking up the MSR for a RDMSR/WRMSR
240 * instruction. Older hardware has been observed to ignore higher bits. */
241 uint32_t fMsrMask;
242
243 /** The number of CPUID leaves (CPUMCPUIDLEAF) in the array pointed to below. */
244 uint32_t cCpuIdLeaves;
245 /** The index of the first extended CPUID leaf in the array.
246 * Set to cCpuIdLeaves if none present. */
247 uint32_t iFirstExtCpuIdLeaf;
248 /** Alignment padding. */
249 uint32_t uPadding;
250 /** How to handle unknown CPUID leaves. */
251 CPUMUNKNOWNCPUID enmUnknownCpuIdMethod;
252 /** For use with CPUMUNKNOWNCPUID_DEFAULTS (DB & VM),
253 * CPUMUNKNOWNCPUID_LAST_STD_LEAF (VM) and CPUMUNKNOWNCPUID_LAST_STD_LEAF_WITH_ECX (VM). */
254 CPUMCPUID DefCpuId;
255
256 /** Scalable bus frequency used for reporting other frequencies. */
257 uint64_t uScalableBusFreq;
258
259 /** Pointer to the MSR ranges (ring-0 pointer). */
260 R0PTRTYPE(PCPUMMSRRANGE) paMsrRangesR0;
261 /** Pointer to the CPUID leaves (ring-0 pointer). */
262 R0PTRTYPE(PCPUMCPUIDLEAF) paCpuIdLeavesR0;
263
264 /** Pointer to the MSR ranges (ring-3 pointer). */
265 R3PTRTYPE(PCPUMMSRRANGE) paMsrRangesR3;
266 /** Pointer to the CPUID leaves (ring-3 pointer). */
267 R3PTRTYPE(PCPUMCPUIDLEAF) paCpuIdLeavesR3;
268
269 /** Pointer to the MSR ranges (raw-mode context pointer). */
270 RCPTRTYPE(PCPUMMSRRANGE) paMsrRangesRC;
271 /** Pointer to the CPUID leaves (raw-mode context pointer). */
272 RCPTRTYPE(PCPUMCPUIDLEAF) paCpuIdLeavesRC;
273} CPUMINFO;
274/** Pointer to a CPU info structure. */
275typedef CPUMINFO *PCPUMINFO;
276/** Pointer to a const CPU info structure. */
277typedef CPUMINFO const *CPCPUMINFO;
278
279
280/**
281 * The saved host CPU state.
282 *
283 * @remark The special VBOX_WITH_HYBRID_32BIT_KERNEL checks here are for the 10.4.x series
284 * of Mac OS X where the OS is essentially 32-bit but the cpu mode can be 64-bit.
285 */
286typedef struct CPUMHOSTCTX
287{
288 /** FPU state. (16-byte alignment)
289 * @remark On x86, the format isn't necessarily X86FXSTATE (not important). */
290 X86XSAVEAREA XState;
291
292 /** General purpose register, selectors, flags and more
293 * @{ */
294#if HC_ARCH_BITS == 64 || defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
295 /** General purpose register ++
296 * { */
297 /*uint64_t rax; - scratch*/
298 uint64_t rbx;
299 /*uint64_t rcx; - scratch*/
300 /*uint64_t rdx; - scratch*/
301 uint64_t rdi;
302 uint64_t rsi;
303 uint64_t rbp;
304 uint64_t rsp;
305 /*uint64_t r8; - scratch*/
306 /*uint64_t r9; - scratch*/
307 uint64_t r10;
308 uint64_t r11;
309 uint64_t r12;
310 uint64_t r13;
311 uint64_t r14;
312 uint64_t r15;
313 /*uint64_t rip; - scratch*/
314 uint64_t rflags;
315#endif
316
317#if HC_ARCH_BITS == 32
318 /*uint32_t eax; - scratch*/
319 uint32_t ebx;
320 /*uint32_t ecx; - scratch*/
321 /*uint32_t edx; - scratch*/
322 uint32_t edi;
323 uint32_t esi;
324 uint32_t ebp;
325 X86EFLAGS eflags;
326 /*uint32_t eip; - scratch*/
327 /* lss pair! */
328 uint32_t esp;
329#endif
330 /** @} */
331
332 /** Selector registers
333 * @{ */
334 RTSEL ss;
335 RTSEL ssPadding;
336 RTSEL gs;
337 RTSEL gsPadding;
338 RTSEL fs;
339 RTSEL fsPadding;
340 RTSEL es;
341 RTSEL esPadding;
342 RTSEL ds;
343 RTSEL dsPadding;
344 RTSEL cs;
345 RTSEL csPadding;
346 /** @} */
347
348#if HC_ARCH_BITS == 32 && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
349 /** Control registers.
350 * @{ */
351 uint32_t cr0;
352 /*uint32_t cr2; - scratch*/
353 uint32_t cr3;
354 uint32_t cr4;
355 /** @} */
356
357 /** Debug registers.
358 * @{ */
359 uint32_t dr0;
360 uint32_t dr1;
361 uint32_t dr2;
362 uint32_t dr3;
363 uint32_t dr6;
364 uint32_t dr7;
365 /** @} */
366
367 /** Global Descriptor Table register. */
368 X86XDTR32 gdtr;
369 uint16_t gdtrPadding;
370 /** Interrupt Descriptor Table register. */
371 X86XDTR32 idtr;
372 uint16_t idtrPadding;
373 /** The task register. */
374 RTSEL ldtr;
375 RTSEL ldtrPadding;
376 /** The task register. */
377 RTSEL tr;
378 RTSEL trPadding;
379 uint32_t SysEnterPadding;
380
381 /** The sysenter msr registers.
382 * This member is not used by the hypervisor context. */
383 CPUMSYSENTER SysEnter;
384
385 /** MSRs
386 * @{ */
387 uint64_t efer;
388 /** @} */
389
390 /* padding to get 64byte aligned size */
391 uint8_t auPadding[16+32];
392
393#elif HC_ARCH_BITS == 64 || defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
394
395 /** Control registers.
396 * @{ */
397 uint64_t cr0;
398 /*uint64_t cr2; - scratch*/
399 uint64_t cr3;
400 uint64_t cr4;
401 uint64_t cr8;
402 /** @} */
403
404 /** Debug registers.
405 * @{ */
406 uint64_t dr0;
407 uint64_t dr1;
408 uint64_t dr2;
409 uint64_t dr3;
410 uint64_t dr6;
411 uint64_t dr7;
412 /** @} */
413
414 /** Global Descriptor Table register. */
415 X86XDTR64 gdtr;
416 uint16_t gdtrPadding;
417 /** Interrupt Descriptor Table register. */
418 X86XDTR64 idtr;
419 uint16_t idtrPadding;
420 /** The task register. */
421 RTSEL ldtr;
422 RTSEL ldtrPadding;
423 /** The task register. */
424 RTSEL tr;
425 RTSEL trPadding;
426
427 /** MSRs
428 * @{ */
429 CPUMSYSENTER SysEnter;
430 uint64_t FSbase;
431 uint64_t GSbase;
432 uint64_t efer;
433 /** @} */
434
435 /* padding to get 32byte aligned size */
436# ifdef VBOX_WITH_HYBRID_32BIT_KERNEL
437 uint8_t auPadding[16];
438# else
439 uint8_t auPadding[8+32];
440# endif
441
442#else
443# error HC_ARCH_BITS not defined
444#endif
445} CPUMHOSTCTX;
446/** Pointer to the saved host CPU state. */
447typedef CPUMHOSTCTX *PCPUMHOSTCTX;
448
449
450/**
451 * CPUM Data (part of VM)
452 */
453typedef struct CPUM
454{
455 /** Offset from CPUM to CPUMCPU for the first CPU. */
456 uint32_t offCPUMCPU0;
457
458 /** Use flags.
459 * These flags indicates which CPU features the host uses.
460 */
461 uint32_t fHostUseFlags;
462
463 /** Host CPU Features - ECX */
464 struct
465 {
466 /** edx part */
467 X86CPUIDFEATEDX edx;
468 /** ecx part */
469 X86CPUIDFEATECX ecx;
470 } CPUFeatures;
471 /** Host extended CPU features. */
472 struct
473 {
474 /** edx part */
475 uint32_t edx;
476 /** ecx part */
477 uint32_t ecx;
478 } CPUFeaturesExt;
479
480 /** CR4 mask */
481 struct
482 {
483 uint32_t AndMask; /**< @todo Move these to the per-CPU structure and fix the switchers. Saves a register! */
484 uint32_t OrMask;
485 } CR4;
486
487 /** The (more) portable CPUID level. */
488 uint8_t u8PortableCpuIdLevel;
489 /** Indicates that a state restore is pending.
490 * This is used to verify load order dependencies (PGM). */
491 bool fPendingRestore;
492 uint8_t abPadding[HC_ARCH_BITS == 64 ? 6 : 2];
493
494 /** The standard set of CpuId leaves. */
495 CPUMCPUID aGuestCpuIdPatmStd[6];
496 /** The extended set of CpuId leaves. */
497 CPUMCPUID aGuestCpuIdPatmExt[10];
498 /** The centaur set of CpuId leaves. */
499 CPUMCPUID aGuestCpuIdPatmCentaur[4];
500
501#if HC_ARCH_BITS == 32
502 uint8_t abPadding2[4];
503#endif
504
505 /** Guest CPU info. */
506 CPUMINFO GuestInfo;
507 /** Guest CPU feature information. */
508 CPUMFEATURES GuestFeatures;
509 /** Host CPU feature information. */
510 CPUMFEATURES HostFeatures;
511
512 /** @name MSR statistics.
513 * @{ */
514 STAMCOUNTER cMsrWrites;
515 STAMCOUNTER cMsrWritesToIgnoredBits;
516 STAMCOUNTER cMsrWritesRaiseGp;
517 STAMCOUNTER cMsrWritesUnknown;
518 STAMCOUNTER cMsrReads;
519 STAMCOUNTER cMsrReadsRaiseGp;
520 STAMCOUNTER cMsrReadsUnknown;
521 /** @} */
522} CPUM;
523/** Pointer to the CPUM instance data residing in the shared VM structure. */
524typedef CPUM *PCPUM;
525
526/**
527 * CPUM Data (part of VMCPU)
528 */
529typedef struct CPUMCPU
530{
531 /**
532 * Guest context.
533 * Aligned on a 64-byte boundary.
534 */
535 CPUMCTX Guest;
536
537 /**
538 * Guest context - misc MSRs
539 * Aligned on a 64-byte boundary.
540 */
541 CPUMCTXMSRS GuestMsrs;
542
543 /** Use flags.
544 * These flags indicates both what is to be used and what has been used.
545 */
546 uint32_t fUseFlags;
547
548 /** Changed flags.
549 * These flags indicates to REM (and others) which important guest
550 * registers which has been changed since last time the flags were cleared.
551 * See the CPUM_CHANGED_* defines for what we keep track of.
552 */
553 uint32_t fChanged;
554
555 /** Offset from CPUM to CPUMCPU. */
556 uint32_t offCPUM;
557
558 /** Temporary storage for the return code of the function called in the
559 * 32-64 switcher. */
560 uint32_t u32RetCode;
561
562#ifdef VBOX_WITH_VMMR0_DISABLE_LAPIC_NMI
563 /** The address of the APIC mapping, NULL if no APIC.
564 * Call CPUMR0SetLApic to update this before doing a world switch. */
565 RTHCPTR pvApicBase;
566 /** Used by the world switcher code to store which vectors needs restoring on
567 * the way back. */
568 uint32_t fApicDisVectors;
569 /** Set if the CPU has the X2APIC mode enabled.
570 * Call CPUMR0SetLApic to update this before doing a world switch. */
571 bool fX2Apic;
572#else
573 uint8_t abPadding3[(HC_ARCH_BITS == 64 ? 8 : 4) + 4 + 1];
574#endif
575
576 /** Have we entered raw-mode? */
577 bool fRawEntered;
578 /** Have we entered the recompiler? */
579 bool fRemEntered;
580
581 /** Align the next member on a 64-bit boundrary. */
582 uint8_t abPadding2[64 - 16 - (HC_ARCH_BITS == 64 ? 8 : 4) - 4 - 1 - 2];
583
584 /** Saved host context. Only valid while inside RC or HM contexts.
585 * Must be aligned on a 64-byte boundary. */
586 CPUMHOSTCTX Host;
587 /** Hypervisor context. Must be aligned on a 64-byte boundary. */
588 CPUMCTX Hyper;
589
590#ifdef VBOX_WITH_CRASHDUMP_MAGIC
591 uint8_t aMagic[56];
592 uint64_t uMagic;
593#endif
594} CPUMCPU;
595/** Pointer to the CPUMCPU instance data residing in the shared VMCPU structure. */
596typedef CPUMCPU *PCPUMCPU;
597
598#ifndef VBOX_FOR_DTRACE_LIB
599RT_C_DECLS_BEGIN
600
601PCPUMCPUIDLEAF cpumCpuIdGetLeaf(PVM pVM, uint32_t uLeaf);
602PCPUMCPUIDLEAF cpumCpuIdGetLeafEx(PVM pVM, uint32_t uLeaf, uint32_t uSubLeaf, bool *pfExactSubLeafHit);
603
604#ifdef IN_RING3
605int cpumR3DbgInit(PVM pVM);
606int cpumR3CpuIdExplodeFeatures(PCCPUMCPUIDLEAF paLeaves, uint32_t cLeaves, PCPUMFEATURES pFeatures);
607int cpumR3InitCpuIdAndMsrs(PVM pVM);
608void cpumR3SaveCpuId(PVM pVM, PSSMHANDLE pSSM);
609int cpumR3LoadCpuId(PVM pVM, PSSMHANDLE pSSM, uint32_t uVersion);
610DECLCALLBACK(void) cpumR3CpuIdInfo(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs);
611
612int cpumR3DbGetCpuInfo(const char *pszName, PCPUMINFO pInfo);
613int cpumR3MsrRangesInsert(PVM pVM, PCPUMMSRRANGE *ppaMsrRanges, uint32_t *pcMsrRanges, PCCPUMMSRRANGE pNewRange);
614int cpumR3MsrApplyFudge(PVM pVM);
615int cpumR3MsrRegStats(PVM pVM);
616int cpumR3MsrStrictInitChecks(void);
617PCPUMMSRRANGE cpumLookupMsrRange(PVM pVM, uint32_t idMsr);
618#endif
619
620#ifdef IN_RC
621DECLASM(int) cpumHandleLazyFPUAsm(PCPUMCPU pCPUM);
622#endif
623
624#ifdef IN_RING0
625DECLASM(int) cpumR0SaveHostRestoreGuestFPUState(PCPUMCPU pCPUM);
626DECLASM(int) cpumR0SaveGuestRestoreHostFPUState(PCPUMCPU pCPUM);
627DECLASM(int) cpumR0SaveHostFPUState(PCPUMCPU pCPUM);
628DECLASM(int) cpumR0RestoreHostFPUState(PCPUMCPU pCPUM);
629DECLASM(void) cpumR0LoadFPU(PCPUMCTX pCtx);
630DECLASM(void) cpumR0SaveFPU(PCPUMCTX pCtx);
631DECLASM(void) cpumR0LoadXMM(PCPUMCTX pCtx);
632DECLASM(void) cpumR0SaveXMM(PCPUMCTX pCtx);
633DECLASM(void) cpumR0SetFCW(uint16_t u16FCW);
634DECLASM(uint16_t) cpumR0GetFCW(void);
635DECLASM(void) cpumR0SetMXCSR(uint32_t u32MXCSR);
636DECLASM(uint32_t) cpumR0GetMXCSR(void);
637DECLASM(void) cpumR0LoadDRx(uint64_t const *pa4Regs);
638DECLASM(void) cpumR0SaveDRx(uint64_t *pa4Regs);
639#endif
640
641RT_C_DECLS_END
642#endif /* !VBOX_FOR_DTRACE_LIB */
643
644/** @} */
645
646#endif
647
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